I find (with latest nightly or my own latest build of V3) that when I
<Run> (in NetBeans) a web app against a non-running V3 server (forcing
NB to start the server, doesn't matter if app is deployed yet or not), I
get the following stack trace in the server log and the index.jsp fails
to load.
SEVERE: PWC3989: An exception or error occurred in the container during
the request processing
java.lang.ClassCastException:
com.sun.enterprise.v3.services.impl.ContainerMapper$ContextRootInfo
cannot be cast to org.apache.catalina.Context
at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:530)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:297)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:249)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:147)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746)
at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:655)
at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:905)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:161)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:136)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
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:619)
The work around is
1) Keep server running.
2) Undeploy app
3) <run> app again (forces fresh deploy, which appears to resolve the
issue).
This issue appears to be the same as
https://glassfish.dev.java.net/issues/show_bug.cgi?id=6163 which was
allegedly fixed last fall. I don't get this behavior with promoted B47.
Do I have a bad build or is this a recent regression? Is it possible
NetBeans is too aggressive in passing the index.jsp URL to the browser?
-Peter