dev@glassfish.java.net

Re: Glassfish V3 : IllegalStateException while trying to deploy a war

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 10 Dec 2007 10:53:15 -0500

Hi, Karthik
    The web container currently in use for v3 (which is mostly Tomcat
container) has quite limited capability. The web team is working to
bring the true web container into v3 now, once that's done, web
application which runs on v2 should be able to run on v3.

- Hong

Karthik Sudarshan wrote:

> Hi all,
> I've downloaded the glassfish v3 preview1-b3 distribution. The
> installation and the starting of the server went through fine (as
> expected :) ). I have an application which has been running on
> Glassfish V2 and its structure is like below :
>
> 1. jars in the server classpath by being placed in domain1\lib
> 2. a properties file in domain1\lib\classes directory
> 3. a war file which is deployed.
>
>
> I wanted to get this working on Glassfish V3. So I did the following :
>
> 1. placed the jars in the server classpath (glassfish\lib since
> domain1\lib doesn't exist any more, although this would mean
> that it is available to all domains, but I'm not sure whether we
> can create new domains as of now)
> 2. properties file also in the glassfish\lib directory (is this the
> right place?)
> 3. Now I use "asadmin.bat deploy --path <path to my war>" when I
> get the following Exception (any ideas?)
>
>
> LifecycleException: start: : java.lang.IllegalAccessError: tried to
> access method
> org.apache.catalina.loader.WebappClassLoader.addJar(Ljava/lang/String;Ljava/
> util/jar/JarFile;Ljava/io/File;)V from class
> org.apache.catalina.loader.WebappLoader
> at
> org.apache.catalina.loader.WebappLoader.start(WebappLoader.java:755)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5053)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
> at
> com.sun.enterprise.v3.web.WebDeployer.load(WebDeployer.java:185)
> at com.sun.enterprise.v3.web.WebDeployer.load(WebDeployer.java:67)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.load(ApplicationLifecycle.java:224)
> at
> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:196)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:246)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:162)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:110)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
> at
> com.sun.enterprise.v3.services.impl.GrizzlyAdapter.service(GrizzlyAdapter.java:251)
> at
> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:598)
> at
> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:529)
> at
> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:773)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:130)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:90)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:68)
> at
> com.sun.grizzly.http.SelectorThread$1.execute(SelectorThread.java:628)
> at com.sun.grizzly.Context.call(Context.java:266)
> at
> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:179)
> Dec 8, 2007 11:02:30 PM
> com.sun.enterprise.v3.server.ApplicationLifecycle failure
> SEVERE: Exception while invoking class
> com.sun.enterprise.v3.web.WebDeployer prepare method
> java.lang.IllegalStateException: ContainerBase.addChild: start:
> LifecycleException: start: : java.lang.IllegalAccessError: tried to
> access method org.apache.c
> atalina.loader.WebappClassLoader.addJar(Ljava/lang/String;Ljava/util/jar/JarFile;Ljava/io/File;)V
> from class org.apache.catalina.loader.WebappLoader
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:976)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688)
> at
> com.sun.enterprise.v3.web.WebDeployer.load(WebDeployer.java:185)
> at com.sun.enterprise.v3.web.WebDeployer.load(WebDeployer.java:67)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.load(ApplicationLifecycle.java:224)
> at
> com.sun.enterprise.v3.deployment.DeployCommand.execute(DeployCommand.java:196)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:246)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:162)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:110)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
> at
> com.sun.enterprise.v3.services.impl.GrizzlyAdapter.service(GrizzlyAdapter.java:251)
> at
> com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:598)
> at
> com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:529)
> at
> com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:773)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:130)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:90)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:68)
> at
> com.sun.grizzly.http.SelectorThread$1.execute(SelectorThread.java:628)
> at com.sun.grizzly.Context.call(Context.java:266)
> at
> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:179)
> Dec 8, 2007 11:02:30 PM com.sun.grizzly.Controller doSelect
> FINE: OP_READ on sun.nio.ch.SelectionKeyImpl_at_6f50a8
>
>
> Regards,
> Karthik