Hello,
I am developping a ZK 6 (web framework) application in WebLogic 10.3 using Idea 11.1, I get a NPE in ZK when I redeploy the War from IntelliJ.
To detail the problem, here is a sample scenario
- Run Application from Idea: WebLogic starts and the application is properly deployed and started
- Fix application
- Redeploy application from Idea: when ZK restarts a NPE is raised (see below), application is broken
- Stop WebLogic
- Re-start the whole WebLogic app server from Idea: WebLogic starts and the application is properly deployed and started --> the problem is not related to the application
- Fix application
- Use WebLogic Web Console to update Web app: application is properly redeployed and restarted --> the problem is not related to WebLogic
java.lang.NullPointerException at org.zkoss.zk.ui.http.WebManager.setUpdateUri(WebManager.java:327) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.init(DHtmlLayoutServlet.java:104) at javax.servlet.GenericServlet.init(GenericServlet.java:241) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539) at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:240) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
WebManager class is instantied by DHtmlLayoutServlet is initialized, it contains an _cwr field which is marked private final and only set in WebManager's constructor. Yet it's null on redeployment, and trigger the NPE when setUpdateUri method is invoked.
Is there something I can do to make redeployment work from IntelliJ without restarting the whole app server (very long) or using web console?
Thanks,