请求大侠帮助,小弟先说声谢谢啦!急!急!急!

问题描述

typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionjavax.servlet.ServletException:java.lang.NullPointerExceptionorg.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)javax.servlet.http.HttpServlet.service(HttpServlet.java:710)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)com.struts.filter.MyFilter.doFilter(MyFilter.java:24)rootcausejava.lang.NullPointerExceptioncom.Hibernate.util.HibernateUtil.findUser(HibernateUtil.java:41)com.struts.action.FindUserAction.finUser(FindUserAction.java:24)sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)sun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)sun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)java.lang.reflect.Method.invoke(UnknownSource)org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)javax.servlet.http.HttpServlet.service(HttpServlet.java:710)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)com.struts.filter.MyFilter.doFilter(MyFilter.java:24)noteThefullstacktraceoftherootcauseisavailableintheApacheTomcat/6.0.13logs.

解决方案

解决方案二:
控制台输出的信息如下:18:55:20,609WARNSettingsFactory:103-Couldnotobtainconnectionmetadatajava.sql.SQLException:NetworkerrorIOException:Connectionrefused:connectatnet.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)atnet.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)atnet.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)atjava.sql.DriverManager.getConnection(UnknownSource)atjava.sql.DriverManager.getConnection(UnknownSource)atorg.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)atorg.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)atcom.Hibernate.util.GetHibernate.<clinit>(GetHibernate.java:37)atcom.Hibernate.util.HibernateUtil.<clinit>(HibernateUtil.java:24)atcom.struts.action.FindUserAction.finUser(FindUserAction.java:24)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)atorg.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.struts.filter.MyFilter.doFilter(MyFilter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)Causedby:java.net.ConnectException:Connectionrefused:connectatjava.net.PlainSocketImpl.socketConnect(NativeMethod)atjava.net.PlainSocketImpl.doConnect(UnknownSource)atjava.net.PlainSocketImpl.connectToAddress(UnknownSource)atjava.net.PlainSocketImpl.connect(UnknownSource)atjava.net.SocksSocketImpl.connect(UnknownSource)atjava.net.Socket.connect(UnknownSource)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atnet.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:289)atnet.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:250)atnet.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:297)...38more
解决方案三:
18:55:20,796WARNConfigurator:126-Noconfigurationfound.Configuringehcachefromehcache-failsafe.xmlfoundintheclasspath:jar:file:/D:/Workspaces/MyEclipse%207.0/.metadata/.me_tcat/webapps/zrg/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml18:55:22,609WARNJDBCExceptionReporter:71-SQLError:0,SQLState:08S0118:55:22,609ERRORJDBCExceptionReporter:72-NetworkerrorIOException:Connectionrefused:connectorg.hibernate.exception.JDBCConnectionException:Cannotopenconnectionatorg.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)atorg.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)atorg.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)atorg.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:129)atorg.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)atorg.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1290)atcom.Hibernate.util.HibernateUtil.findUser(HibernateUtil.java:32)atcom.struts.action.FindUserAction.finUser(FindUserAction.java:24)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)atorg.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.struts.filter.MyFilter.doFilter(MyFilter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)Causedby:java.sql.SQLException:NetworkerrorIOException:Connectionrefused:connectatnet.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)atnet.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)atnet.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)atjava.sql.DriverManager.getConnection(UnknownSource)atjava.sql.DriverManager.getConnection(UnknownSource)atorg.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)atorg.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)...33moreCausedby:java.net.ConnectException:Connectionrefused:connectatjava.net.PlainSocketImpl.socketConnect(NativeMethod)atjava.net.PlainSocketImpl.doConnect(UnknownSource)atjava.net.PlainSocketImpl.connectToAddress(UnknownSource)atjava.net.PlainSocketImpl.connect(UnknownSource)atjava.net.SocksSocketImpl.connect(UnknownSource)atjava.net.Socket.connect(UnknownSource)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atnet.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:289)atnet.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:250)atnet.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:297)...39more18:55:22,625WARNRequestProcessor:538-UnhandledExceptionthrown:classjava.lang.NullPointerException2009-5-1718:55:22org.apache.catalina.core.StandardWrapperValveinvoke严重:Servlet.service()forservletactionthrewexceptionjava.lang.NullPointerExceptionatcom.Hibernate.util.HibernateUtil.findUser(HibernateUtil.java:41)atcom.struts.action.FindUserAction.finUser(FindUserAction.java:24)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(UnknownSource)atsun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)atjava.lang.reflect.Method.invoke(UnknownSource)atorg.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)atorg.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)atorg.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)atorg.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)atorg.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)atorg.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:710)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:803)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atcom.struts.filter.MyFilter.doFilter(MyFilter.java:24)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)atorg.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)atjava.lang.Thread.run(UnknownSource)
解决方案四:
org.hibernate.exception.JDBCConnectionException:CannotopenconnectionJDBC连接打不开,你的配置正确吗?
解决方案五:
数据库连接问题!检查一下用户名和密码是否正确!!
解决方案六:
rootcausejava.lang.NullPointerException空指针异常呀,java.sql.SQLException:NetworkerrorIOException:Connectionrefused:connect数据库连接的相关配置有问题,确定所连接数据库的用户有权限进行相关操作~~
解决方案七:
小弟的配置没错,我用的数据库是sqlserver2000装的时候设置的用户名是:sa密码为空可是连接数据库的时候好像都没有提示输入用户名和密码啊!sql的用户名和密码是在你哪用的啊?请求高手给解决下!小弟先谢谢啦!
解决方案八:
来源http://yanchao90.blog.163.com/blog/static/1794602520092202461501/首先从sun的官方网站下载一个jdbc的jar包。注意:我使用的是1.4的版本,各个版本的jdbc在加载驱动的时候,字符串可能是不一样的。首先将这个jar包添加到eclipse工程的构建路径中,具体步骤:右键单击项目->构建路径(BuildPath)->添加外部归档...(AddExternalArchives...)然后选择下载好的jar包。接下来就可以写代码了try{Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");Connectioncon=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=;user=sa;password=");}catch(ClassNotFoundExceptione){System.out.println("驱动加载失败");}catch(SQLExceptione){e.printStackTrace();}这里我用的链接字符串是getConnection方法的一个重载,省略了getConnection方法的后两个参数,其实是把这两个参数放到了链接字符串里。localhost是指本机1433是使用的端口,sql2000需要安装SP4补丁,网上下载一个。
解决方案九:
楼上的说的很正确啊,就是getConnection()这个地方出错了,DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=;user=sa;password=");看看括号里面的东西对不对,然后确认你的包是不是都有,连接sql2000需要三个包,msbase.jar,mssqlserver.jar,mautil.jar。再看看补丁打了没有
解决方案十:
引用8楼haolisdk1的回复:

楼上的说的很正确啊,就是getConnection()这个地方出错了,DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=;user=sa;password=");看看括号里面的东西对不对,然后确认你的包是不是都有,连接sql2000需要三个包,msbase.jar,mssqlserver.jar,mautil.jar。再看看补丁打了没有

楼上的说的很对,我想是你密码处写错了
解决方案十一:
该回复于2009-05-20 13:43:18被版主删除
解决方案十二:
你使用的是Hibernate吧?看哈配置文件里*.cfg.xml面有没有问题~~查询的时候配置文件有没有错,hibernate一般式不会出错的,配置出错很多~~
解决方案十三:
引用7楼witlili的回复:

来源http://yanchao90.blog.163.com/blog/static/1794602520092202461501/首先从sun的官方网站下载一个jdbc的jar包。注意:我使用的是1.4的版本,各个版本的jdbc在加载驱动的时候,字符串可能是不一样的。首先将这个jar包添加到eclipse工程的构建路径中,具体步骤:右键单击项目->构建路径(BuildPath)->添加外部归档...(AddExternalArchives...)然后选择下载好的jar包。接下来就可以写代码了try{…

谢谢大侠,问题已经解决。我下载了一个SP4补丁。
解决方案十四:
谢谢你们这些热心人,小弟再次表示感谢!

时间: 2025-01-21 00:19:55

请求大侠帮助,小弟先说声谢谢啦!急!急!急!的相关文章

关于java boolean类型if判断,一个小问题。刚注册实在没有c币,只能说声谢谢了。

问题描述 关于java boolean类型if判断,一个小问题.刚注册实在没有c币,只能说声谢谢了. 截的图里面_if(bool)_里的bool什么意思?是_bool=true_吗? 为什么我把_bool_换成_bool=true_ 编译后输入_40_会把_-1_也打印出来? 先谢好心人解答了,刚学java,好多都不懂 解决方案 这个方法表示如果n与a数组里面的所有值都不相等的话,那么bool变量的值就一直是true,就输出-1: 如: n输入的是5,那么a与1,4,6,9,40都不相等,所以为

c++-Clist中包含Clist的变量,无法初始化 “很有意思的一个题目” 大侠路过请留步,谢谢

问题描述 Clist中包含Clist的变量,无法初始化 "很有意思的一个题目" 大侠路过请留步,谢谢 最外层:typedef Clist MOUDLE; structA{ type A; ... MAC mac; } MAC的定义为:typedef Clist MAC; 在全局或局部定义MOUDLE md:时报错: 1>D:Program Files (x86)Microsoft Visual Studio 10.0VCatlmfcincludeafxtempl.h(771):

spring-Spring配置事务后不回滚,麻烦各位大侠帮小弟看看

问题描述 Spring配置事务后不回滚,麻烦各位大侠帮小弟看看 ****Spring 配置文件:**** <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="close"> <!-- 注册驱动配置 --> <property name="driver

五子棋-请大侠帮助,提供思路,谢谢

问题描述 请大侠帮助,提供思路,谢谢 关于数组判断的问题,如何判断对角线上的数组是否是连续的,现在五子棋的判断遇到困难了 解决方案 虽然这是C语言写的,但是思路是一样的http://blog.csdn.net/mzlogin/article/details/5546204 解决方案二: 当前点,横坐标+1格并且纵坐标+1格或者横坐标-1格并且纵坐标-1格就是当前点的连续对角线点.

线程 读写-各位大侠,小弟练习写了个代码,求解答

问题描述 各位大侠,小弟练习写了个代码,求解答 为什么运行的结果不能输出">",而且当我在终端输入quit时 出现不停打印">"的死循环 代码如下: #include #include #include #include #include #include #include #include #define MAX 1024 pthread_mutex_t rwlock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_

诸位大侠,小弟求解决,ssh播放音乐,分分不多,略表诚心(&amp;amp;gt;&amp;amp;lt;)

问题描述 诸位大侠.小弟请教下.SSH怎么实现播放音乐功能啊..麻烦哪位大侠给贴个action和配置什么的么??拜托...我原来想的挺楞的...给音乐属性添加一个状态...播放的话,.通过修改那个状态把挑选的音乐添加到播放列表.再通过页面JS播放....如果..如果这样可以实现的话那么换个用户登录.那个音乐状态还在播放列表中..诸位大侠麻烦教教SSH怎么播放音乐啊??诸位大侠麻烦教教SSH怎么播放音乐啊??诸位大侠麻烦教教SSH怎么播放音乐啊??分分不多,略表诚心(><) 解决方案 这和SSH

紧急求助:各位大侠,给小弟一个支持Office2007风格的VS2005控件包,跪求!!!

问题描述 老板要一个支持Office2007风格的VS2005控件包,限定今晚,小弟跪求了!!! 解决方案 解决方案二:这个~~现在有了吗?还在用旧的~~解决方案三:跪求????解决方案四:听老板的口气,好象有了,各位大侠,帮帮小弟吧:(解决方案五:dotnetbar去搜索一下 看楼主有没有用的上解决方案六:.net中的winformUI本来就慢,还用第三方控件.解决方案七:找一下Dev系列的.

查询-急!急!急,怎么样能最快速的判断大批量数据的剩余次数,具体请看需要,谢谢

问题描述 急!急!急,怎么样能最快速的判断大批量数据的剩余次数,具体请看需要,谢谢 现在项目有需求如下: 数据结构:号码 次数,现在有1万个,如:0000 2次.0001 3次.0002 4次.0003 3次--,每个号码计数只能固定次数,如5次,如何最快速判断这批号码的每个剩余数:1.每个号码的剩余次数等于限制次数-已存总数-重复出现次数,如果超过剩余数,则按剩余数存储:2.现在采用多线程循环查询判断方式,瞬间查询数据库太频繁,有时需要好几分钟,如何优化:3.是否有新的解决方案,判断时间能优化

求高手kindeditor富文本编辑器,使用源码及详解,谢谢各位,急,急,急,急,急急

问题描述 求高手kindeditor富文本编辑器,使用源码及详解,谢谢各位,急,急,急,急,急急 求高手kindeditor富文本编辑器,使用源码及详解,谢谢各位,急,急,急,急,急急 解决方案 参考:http://blog.csdn.net/thinkhlin_down/article/details/6065619http://www.poluoluo.com/jzxy/201306/214700.htmlhttp://cshbbrain.iteye.com/blog/1892698 解决方