0

Error on startUp WebSpheare with zk 5.0.8

asked 2011-09-02 01:50:09 +0800

ziccardi gravatar image ziccardi
321 7

Aug 24, 2010
Hi,
I have a web application running with ZK 5.0.8 deployed on WebSpehare 5.1,
when startup the server will generate this error :

Did not realize init() exception thrown by servlet zkLoader: javax.servlet.ServletException
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:99)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1442)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:304)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:413)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:217)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:287)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
at java.lang.Thread.run(Thread.java:838)
---- Begin backtrace for Nested Throwables
java.lang.NullPointerException
at javax.servlet.GenericServlet.log(GenericServlet.java:300)
at javax.servlet.GenericServlet.init(GenericServlet.java:257)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:91)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1442)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:304)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:413)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:217)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:287)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
at java.lang.Thread.run(Thread.java:838)

[9/2/11 8:44:21:109 CEST] 41684168 WebGroup E SRVE0020E: [Servlet Error]-: Failed to load servlet: java.lang.NullPointerException
at javax.servlet.GenericServlet.log(GenericServlet.java:300)
at javax.servlet.GenericServlet.init(GenericServlet.java:257)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:91)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1442)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:304)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:413)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:217)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:287)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
at java.lang.Thread.run(Thread.java:838)

Can anyone help me with this issue?

Thank you
Marco

delete flag offensive retag edit

14 Replies

Sort by ยป oldest newest

answered 2011-09-02 04:32:05 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

updated 2011-09-02 04:34:51 +0800

very weird, the NPE comes from GenericServlet log.
do you running in cluster environment, can you help us to reduce to old version of zk and check again, thanks

link publish delete flag offensive edit

answered 2011-09-02 04:36:46 +0800

ziccardi gravatar image ziccardi
321 7

Hi,
with ZK 5.0.7 the error not verified.

Thanks

link publish delete flag offensive edit

answered 2011-09-02 04:47:40 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

hi, please follow this http://tracker.zkoss.org/browse/ZK-389

link publish delete flag offensive edit

answered 2011-09-02 05:16:37 +0800

tomyeh gravatar image tomyeh
610 1 3
http://blog.zkoss.org ZK Team

We added the callback of GenericServlet's init() in 5.0.8 (since some users want to extend from DHtmlLayoutServlet and access getServletConfig()). However, the invocation is very typical as shown below. Could you clean up the environment and try again?

public void init(ServletConfig config) throws ServletException {
	super.init(config);

link publish delete flag offensive edit

answered 2011-09-02 05:47:56 +0800

tomyeh gravatar image tomyeh
610 1 3
http://blog.zkoss.org ZK Team

updated 2011-09-02 05:51:59 +0800

What is Java Servlet's version that Websphere 5.1 supports?

Anyway, I check the source code shipped with Tomcat 5.5/6.0. The implementation of GenericServlet is straightforward:

public void init(ServletConfig config) throws ServletException {
this.config = config;
this.init();
}
public void init() throws ServletException {

}

How does it cause NPE? Does WS 5.1 has its own implementation?

link publish delete flag offensive edit

answered 2011-09-02 06:01:20 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

I checked tomcat servlet source too, no reason could throws NPE in the very simple, code.

zicardi, could you provide jar file that contains GenericServlet in websphere? I can do de-compile to see what is going.

link publish delete flag offensive edit

answered 2011-09-02 06:12:58 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi zicardi,

Could you tell us which Java version are you using?
For the error log, it seems like to write some log caused the error exception.

java.lang.NullPointerException
at javax.servlet.GenericServlet.log(GenericServlet.java:300)
at javax.servlet.GenericServlet.init(GenericServlet.java:257)

I search from google with the same error line, here is the one matched the error. tomcat 3.2.1 on Windows NT as a service, using JDK 1.2.1

link publish delete flag offensive edit

answered 2011-09-02 06:59:36 +0800

ziccardi gravatar image ziccardi
321 7

Hi,

@tomyeh :
I cleaned environment but don't work correctly.
Websphere 5.1 support Java 1.4

@dennis :
Yes, is possible to send a jar. How can I send it?

thanks all

link publish delete flag offensive edit

answered 2011-09-02 08:14:45 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

please mail to dennischen at zkoss dot org

link publish delete flag offensive edit

answered 2011-09-02 08:55:36 +0800

ziccardi gravatar image ziccardi
321 7

Hi Dennis.
i send you a file

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-09-02 01:50:09 +0800

Seen: 509 times

Last updated: Sep 05 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More