`
javababy1
  • 浏览: 1219625 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

仿百度贴吧项目实战错误分析

 
阅读更多


项目开发错误分析

这个错误是我在项目开发中遇到的次数最多的一个bug

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting foridle object

at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)

at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

at cn.csdn.clb.changliaoba.util.JdbcUtil.getConn(JdbcUtil.java:32)

at cn.csdn.clb.changliaoba.dao.ManagerDaoImpl.findCountRecord(ManagerDaoImpl.java:222)

at cn.csdn.clb.changliaoba.service.ManagerServiceImpl.findCountRecord(ManagerServiceImpl.java:53)

at cn.csdn.clb.changliaoba.servlet.ManagerListServlet.doGet(ManagerListServlet.java:33)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)

atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1824)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

Caused by: java.util.NoSuchElementException: Timeout waiting for idle object

at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825)

at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)

... 23 more

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting foridle object

at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)

at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)

at cn.csdn.clb.changliaoba.util.JdbcUtil.getConn(JdbcUtil.java:32)

at cn.csdn.clb.changliaoba.dao.ManagerDaoImpl.findCountRecord(ManagerDaoImpl.java:222)

at cn.csdn.clb.changliaoba.dao.ManagerDaoImpl.findCountPage(ManagerDaoImpl.java:237)

at cn.csdn.clb.changliaoba.service.ManagerServiceImpl.findCountPage(ManagerServiceImpl.java:59)

at cn.csdn.clb.changliaoba.servlet.ManagerListServlet.doGet(ManagerListServlet.java:35)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)

atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1824)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

Caused by: java.util.NoSuchElementException: Timeout waiting for idle object

at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:825)

at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)

... 24 more

2011-12-1 11:08:35org.apache.catalina.core.StandardWrapperValve invoke

严重:Servlet.service() for servlet [ManagerListServlet] in context with path [/CLB]threw exception

java.lang.NullPointerException

at cn.csdn.clb.changliaoba.dao.ManagerDaoImpl.findCountPage(ManagerDaoImpl.java:238)

at cn.csdn.clb.changliaoba.service.ManagerServiceImpl.findCountPage(ManagerServiceImpl.java:59)

at cn.csdn.clb.changliaoba.servlet.ManagerListServlet.doGet(ManagerListServlet.java:35)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)

atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)

at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1824)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

连接池被占满了,解决这个问题可以增加连接池连接个数,但如果程序有问题,没有释放连接,那你增加多少最终还是会有这错。发现在释放资源的时候没有释放connection对象。

插入错误

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:Table 'changliaoba.book' doesn't exist

atsun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

atsun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

atjava.lang.reflect.Constructor.newInstance(Unknown Source)

atcom.mysql.jdbc.Util.handleNewInstance(Util.java:411)

atcom.mysql.jdbc.Util.getInstance(Util.java:386)

atcom.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

atcom.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)

atcom.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)

atcom.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)

atcom.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)

atcom.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)

atcom.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)

atorg.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

atcn.csdn.clb.changliaoba.dao.ManagerDaoImpl.regeister(ManagerDaoImpl.java:37)

atcn.csdn.clb.changliaoba.junit.ManagerTest.register(ManagerTest.java:22)

atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

atjava.lang.reflect.Method.invoke(Unknown Source)

atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

atorg.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

atorg.junit.runners.ParentRunner.run(ParentRunner.java:236)

atorg.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

插入失败

Table 'changliaoba.book' doesn't exist

把changliaoba改成manager

java.lang.NullPointerException

atcn.csdn.clb.changliaoba.dao.TieziDaoImpl.findById(TieziDaoImpl.java:165)

atcn.csdn.clb.changliaoba.service.TieziServiceImpl.findById(TieziServiceImpl.java:34)

atcn.csdn.clb.changliaoba.junit.TieziTest.findById(TieziTest.java:38)

atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

atjava.lang.reflect.Method.invoke(Unknown Source)

atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

atorg.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

atorg.junit.runners.ParentRunner.run(ParentRunner.java:236)

atorg.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

java.lang.NullPointerException

atcn.csdn.clb.changliaoba.dao.TieziDaoImpl.findAll(TieziDaoImpl.java:125)

atcn.csdn.clb.changliaoba.service.TieziServiceImpl.findAll(TieziServiceImpl.java:28)

atcn.csdn.clb.changliaoba.junit.TieziTest.findAll(TieziTest.java:50)

atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

atjava.lang.reflect.Method.invoke(Unknown Source)

atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

atorg.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

atorg.junit.runners.ParentRunner.run(ParentRunner.java:236)

atorg.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

记录更新失败

获取连接对象

conn = pstmt.getConnection(); 改成 conn = JdbcUtil.getConn();

这个错误是数据库连接错误相信很多同学在插入向数据库中插入错误时,都会或多或少的出现这个问题,其实出现这个错误并不意味着你代码写的有问题,而是在你向这个表中插入数据时,外键关联的表中没有数据,所以解决方法很简单就是现在关联表中插入数据。

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:Cannot add or update a child row: a foreign key constraint fails(`changliaoba`.`baruser`, CONSTRAINT `baruser_ibfk_1` FOREIGN KEY (`barid`)REFERENCES `bar` (`id`))

atsun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

atsun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(UnknownSource)

atcom.mysql.jdbc.Util.handleNewInstance(Util.java:411)

atcom.mysql.jdbc.Util.getInstance(Util.java:386)

atcom.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)

atcom.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)

atcom.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)

atcom.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)

atcom.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)

atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)

atorg.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)

atcn.csdn.clb.changliaoba.dao.BarUserDaoImpl.insert(BarUserDaoImpl.java:38)

atcn.csdn.clb.changliaoba.service.BarUserServiceImpl.insert(BarUserServiceImpl.java:15)

atcn.csdn.clb.changliaoba.junit.BarUserTest.insert(BarUserTest.java:26)

atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(UnknownSource)

atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

atorg.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

atorg.junit.runners.ParentRunner.run(ParentRunner.java:236)

atorg.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

空指针问题是最我们组在项目开发中经常遇到的问题,如下我们就出现了这种很简单的小问题,解决这种小问题就需要我们认真仔细的检查一下是不是拼写错误,因为拼写错误导致空指针的几率是最大的。

java.lang.NullPointerException

at cn.csdn.clb.changliaoba.junit.BarUserTest.findById(BarUserTest.java:38)

atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

atsun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(UnknownSource)

atorg.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

atorg.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

atorg.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

atorg.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

atorg.junit.runners.ParentRunner.run(ParentRunner.java:236)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)

atorg.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

atorg.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

下面这种错误,如果你在启动tomcat未完成时,就又重启了,就很容易造成这种问题了,所以很简单重新启动一下tomcat吧~

Èý

¾¯¸æ:Error during context [/CLB] restart

org.apache.catalina.LifecycleException:Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/CLB]]

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)

atorg.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1279)

atorg.apache.catalina.startup.HostConfig.check(HostConfig.java:1367)

atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)

atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

atorg.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

atorg.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1242)

atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1400)

atorg.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1410)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1389)

at java.lang.Thread.run(Thread.java:662)

Causedby: java.lang.NoClassDefFoundError: javax/faces/webapp/FacesServlet

atcom.sun.faces.config.FacesInitializer.<clinit>(FacesInitializer.java:103)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:247)

atorg.apache.catalina.startup.ContextConfig.getServletContainerInitializer(ContextConfig.java:1543)

at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1466)

atorg.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1285)

atorg.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:896)

at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:322)

atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

atorg.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)

atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)

... 10 more

Causedby: java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)

atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)

... 22 more

j

错误比较简单,仅供初学者参考。
分享到:
评论

相关推荐

    仿百度贴吧php版

    【标签】"仿百度贴吧"表明了这个项目的主题和目标,即模仿百度贴吧的界面设计和功能特性。百度贴吧是中国最大的网络论坛之一,拥有众多用户和讨论话题。通过"仿百度贴吧",开发者可以了解并实践如何构建一个大型的、...

    仿百度贴吧HTieBa v1.2

    因为它是仿百度贴吧。 后面版本将集成仿百度搜索引擎 功能更加丰富。 支持多数据库 支持主流数据库(excel,access,sqlserver,mysql,oracle),满足用户不同需求。 集成了通行证系统 支持多个网站用同一个...

    python爬取百度贴吧项目实战

    python爬取百度贴吧项目实战,实战小项目:百度贴吧爬虫。

    仿百度贴吧源码 仿百度源码

    【标签】"仿百度贴吧源码"进一步确认了这个项目的目标是创建一个类似百度贴吧的网站,这涉及到的技术可能包括: 1. **Web框架**:为了构建这样的平台,开发者可能会使用PHP、Python的Django或Flask、Java的Spring ...

    php linux apache mysql仿百度贴吧项目

    【标题】"php linux apache mysql仿百度贴吧项目"是一个典型的Web开发实践,它结合了四种核心技术:Linux操作系统、MySQL数据库、Apache服务器以及PHP编程语言,用于构建一个类似于百度贴吧的在线论坛系统。这个项目...

    仿百度贴吧程序(后续待开发)-9

    标题中的“仿百度贴吧程序(后续待开发)-9”表明这是一个模仿百度贴吧功能的程序项目,目前可能处于开发的第九个阶段或者版本。在IT领域,这样的项目通常涉及到Web开发,尤其是论坛或社区类应用的构建。这类程序...

    仿百度贴吧代码程序代码

    相比论坛,最大优点是网友们都很熟悉操作(因为它是仿百度贴吧),而且后面版本还将集成仿百度搜索引擎 HTieBa很适合用于公司内部员工交流 地方门户网站网友交流 后台登录地址 admin/index.ashx 后台登录账号 admin ...

    tieba123仿百度贴吧20111113_3.51免费版

    总的来说,"tieba123仿百度贴吧20111113_3.51免费版"是一个开源的论坛软件项目,它反映了2011年时期的网络社区构建技术。对于想学习历史Web开发技术、论坛系统设计或者对百度贴吧运作感兴趣的开发者来说,这是一个...

    仿百度贴吧ASP源码适合学习

    【工控老马出品,必属精品,亲测校正,质量保证】 资源名:仿百度贴吧ASP源码适合学习 资源类型:程序源代码 源码说明: 仿百度贴吧ASP源码 有详细的注释说明 适合借鉴学习 适合人群:新手及有一定经验的开发人员

    仿百度贴吧验证码 php版

    仿百度贴吧验证码 9宫格 字符变形 色差识别困难。可以用于防止他人刷票

    Android仿百度贴吧APP源码

    【Android仿百度贴吧APP源码】是一个专门为Android平台开发的应用程序源代码,旨在模仿和实现百度贴吧的功能。这个源码项目对于Android开发者来说是一个宝贵的参考资料,可以帮助他们学习和理解如何构建一个类似社交...

    discuz仿百度贴吧手机模版

    discuz仿百度贴吧手机模版,附有安装说明,送个大家使用

    dz模板仿百度贴吧手机模板.rar

    【标题】"dz模板仿百度贴吧手机模板.rar"是一个压缩包文件,其中包含了用于Discuz! 论坛系统的模板,该模板设计模仿了百度贴吧的移动版界面。Discuz! 是一个广泛使用的开源社区论坛软件,它允许用户创建和管理互动的...

    民院贴吧1.0正式版(仿百度贴吧)

    模拟百度贴吧系统,MVC+structs结构、本系统类似于百度贴吧,用户可以发帖,回帖,查看帖子内容,查看发帖人信息及其发过的所有帖子,创建贴吧等功能。 匿名用户只可以回帖,不可以发帖及创建贴吧。 搜索帖子时可以...

    Andorid例子源码仿百度贴吧APP应用的Fragment

    通过分析和学习这个“Andorid例子源码仿百度贴吧APP应用的Fragment”,开发者可以深入理解Fragment在实际项目中的应用,学习如何创建、管理、通信以及优化Fragment的使用,提升自己的Android开发技能。

    仿百度贴吧的源码,很好玩

    【标题】:“仿百度贴吧的源码,很好玩” 这个标题揭示了我们即将探讨的是一个模仿百度贴吧功能的源代码项目。百度贴吧是中国一个非常流行的在线社区,用户可以在其中创建和参与各种主题的讨论,分享信息,进行互动...

    仿百度贴吧的留言板asp+access

    【标签】:“仿百度贴吧的留言板asp+access”这一标签清晰地指出了项目的特性,即使用ASP编程语言和Access数据库来创建一个模仿百度贴吧功能的留言板系统。ASP是一种服务器端脚本环境,常用于构建动态网页应用;...

    phpwind仿百度贴吧模板

    精仿百度贴吧首页,让自己的论坛与百度媲美,欢迎大家使用哈!!

    Android仿百度贴吧TAB选项卡菜单和悬浮式顶部效果

    MyTitleBar源代码,在Android定义Tab选项卡,实现了仿百度贴吧中的悬浮顶部和底部的标题栏效果,项目中含:源码+效果图+项目结构图,很不错的Android界面设计效果,代码中ISIBLE:0的意思是可见的;INVISIBILITY:4 ...

    海狸贴吧HTieBa(仿百度贴吧系统) v1.7.zip

    因为它是仿百度贴吧。 后面版本将集成仿百度搜索引擎 功能更加丰富。 支持多数据库 支持主流数据库(excel,access,sqlserver,mysql,oracle),满足用户不同需求。 集成了通行证系统 支持多个网站用同一个...

Global site tag (gtag.js) - Google Analytics