Hello folks,
I've got a cIass cast Exception when I want to deploy under glassfish 3.1 a
simple STS created with the netbeans 7.0 wizard.
Error is:
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild:
start: org.apache.catalina.LifecycleException:
org.apache.catalina.LifecycleException: java.lang.ClassCastException:
toto.STS2_Nb7Ide cannot be cast to javax.servlet.Servlet
Here below my steps:
I'm using the distrib with netbeans 7.0 + glassfish 3.1.1 bundled together
(the installed jdk is 1.6.0_23 and the glassfish was installed without any
problems).
1. create new web app project (not a maven one)
2. create the most simple STS
3. build it -> ok
4. attempt to deploy the war under glassfish 3.1.1 with the web admin
console and get a class cast exception
But if I attempt to deploy the same STS war under a glassfish v 3.0.1
everything works fine and i'm able to reach the wsdl in a browser.
Could someone tell me why I can deploy my simple STS under GF 3.0.1. but not
under GF 3.1.1 ?
Here the extract from the server log:
[#|2011-05-20T18:37:41.268+0200|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=35;_ThreadName=Thread-1;|Exception
while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild:
start: org.apache.catalina.LifecycleException:
org.apache.catalina.LifecycleException: java.lang.ClassCastException:
toto.STS2_Nb7Ide cannot be cast to javax.servlet.Servlet
at
com.sun.enterprise.web.WebApplication.start(WebApplication.java:130)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:370)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
...
|#]
--
[Message sent by forum member 'jamesdoo']
View Post: http://forums.java.net/node/804683