当前位置: 代码迷 >> Java Web开发 >> 关于Tomcat的一个问题,运行时只能显示index.html,再点其他的时候就出现这 ...
  详细解决方案

关于Tomcat的一个问题,运行时只能显示index.html,再点其他的时候就出现这 ...

热度:223   发布时间:2012-03-28 17:58:44.0
关于Tomcat的一个问题,运行时只能显示index,再点其他的时候就出现这样的问题
2012-3-28 17:55:29 org.apache.catalina.core.AprLifecycleListener init
信息: Loaded APR based Apache Tomcat Native library 1.1.19.
2012-3-28 17:55:29 org.apache.catalina.core.AprLifecycleListener init
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2012-3-28 17:55:30 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Photo_1' did not find a matching property.
2012-3-28 17:55:30 org.apache.coyote.http11.Http11AprProtocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-3-28 17:55:30 org.apache.coyote.ajp.AjpAprProtocol init
信息: Initializing Coyote AJP/1.3 on ajp-8009
2012-3-28 17:55:30 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 871 ms
2012-3-28 17:55:30 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-3-28 17:55:30 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.33
2012-3-28 17:55:30 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(D:\tomcat\webapps\Photo_1\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2012-3-28 17:55:30 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
2012-3-28 17:55:30 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor manager.xml
2012-3-28 17:55:30 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory docs
2012-3-28 17:55:31 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory examples
2012-3-28 17:55:31 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2012-3-28 17:55:31 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-3-28 17:55:31 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2012-3-28 17:55:31 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2012-3-28 17:55:31 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-8009
2012-3-28 17:55:31 org.apache.catalina.startup.Catalina start
信息: Server startup in 513 ms
javax.naming.NameNotFoundException: Name onlinealbumJNDI is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
    at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at com.album.AlbumDAOBean.getConnection(AlbumDAOBean.java:363)
    at com.album.AlbumDAOBean.<clinit>(AlbumDAOBean.java:34)
    at AlbumServlet.doPost(AlbumServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:619)
2012-3-28 17:55:43 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet AlbumServlet threw exception
java.lang.NullPointerException
    at com.album.AlbumDAOBean.<clinit>(AlbumDAOBean.java:36)
    at AlbumServlet.doPost(AlbumServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:619)
搜索更多相关主题的帖子: 信息  其他  property  library  source  

----------------解决方案--------------------------------------------------------
程序代码:

java.lang.NullPointerException
    at com.album.AlbumDAOBean.<clinit>(AlbumDAOBean.java:36)
    at AlbumServlet.doPost(AlbumServlet.java:38)

看一下你的代码 出现空指针异常了 是不是有没有传值进去
----------------解决方案--------------------------------------------------------
  相关解决方案