You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Manu George <ma...@gmail.com> on 2006/08/04 10:14:43 UTC

Regarding Exploded Deployments

Hi,
       Does Geronimo support exploded deployments of ear's that
contain wars and jars using --inPlace Argument? When I try to deploy
daytrader by extracting it  to a directory and passing the path to the
directory as an argument to deploy along with --inPlace it is giving
an error

java.lang.Error: Only local file jars are supported jar:file:/C:/1.1samples/samp
les/applications/daytrader/target/test/daytrader-ear-1.1/web.war!/WEB-INF/lib/st
andard-1.1.1.jar
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.cacheUrl(Url
ResourceFinder.java:229)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.rebuildClass
Path(UrlResourceFinder.java:190)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.addUrls(UrlR
esourceFinder.java:143)
        at org.apache.geronimo.kernel.classloader.UrlResourceFinder.addUrl(UrlRe
sourceFinder.java:114)
        at org.apache.geronimo.kernel.classloader.JarFileClassLoader$1.run(JarFi
leClassLoader.java:123)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.geronimo.kernel.classloader.JarFileClassLoader.addURL(JarF
ileClassLoader.java:121)
        at org.apache.geronimo.kernel.config.Configuration.addToClassPath(Config
uration.java:499)
        at org.apache.geronimo.deployment.InPlaceResourceContext.addInclude(InPl
aceResourceContext.java:68)
        at org.apache.geronimo.deployment.DeploymentContext.addInclude(Deploymen
tContext.java:220)
        at org.apache.geronimo.web.deployment.AbstractWebModuleBuilder.installMo
dule(AbstractWebModuleBuilder.java:223)
        at org.apache.geronimo.web.deployment.AbstractWebModuleBuilder$$FastClas
sByCGLIB$$459e0cc.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:96)
        at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$d
55e2eca.installModule(<generated>)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.installMod
ule(SwitchingModuleBuilder.java:150)
        at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClass
ByCGLIB$$d0c31844.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:96)
        at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$d
55e2eca.installModule(<generated>)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurati
on(EARConfigBuilder.java:496)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLI
B$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:817)
        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
7)
        at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperat
ionInvoker.java:35)
        at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(Pro
xyMethodInterceptor.java:96)
        at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$
$e14b373c.buildConfiguration(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:302)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.i
nvoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
239)
        at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:338)
        at org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.in
voke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
Invoker.java:38)
        at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
n.java:122)
        at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
java:852)
        at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
239)
        at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBrid
ge.java:168)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerM
BeanServerInterceptor.java:221)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:120)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(Securit
yMBeanServerInterceptor.java:84)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:120)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultM
BeanServerInterceptor.java:120)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invo
ke(ContextClassLoaderMBeanServerInterceptor.java:203)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1043)
        at mx4j.remote.rmi.RMIConnectionInvoker.invoke(RMIConnectionInvoker.java
:219)
        at sun.reflect.GeneratedMethodAccessor300.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at mx4j.remote.rmi.RMIConnectionProxy.invoke(RMIConnectionProxy.java:34)

        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(RMIConnectionSubjec
tInvoker.java:99)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(RMIConnectionS
ubjectInvoker.java:31)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run(RMIConnectionSubjec
tInvoker.java:90)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
        at mx4j.remote.MX4JRemoteUtils.subjectInvoke(MX4JRemoteUtils.java:163)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(RMIConnecti
onSubjectInvoker.java:86)
        at mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(RMIConnectionSubje
ctInvoker.java:80)
        at $Proxy0.invoke(Unknown Source)
        at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImp
l.java:221)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at sun.rmi.transport.Transport$1.run(Transport.java:148)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
        at java.lang.Thread.run(Thread.java:534)

What is the correct format of an exploded EAR. Will it have the
ejb-jar and webapp-war exploded as well? OR will geronimo support non
exploded format as well?

Regards
Manu

Re: Regarding Exploded Deployments

Posted by Gianny Damour <gi...@optusnet.com.au>.
Hi Manu,

Thanks for having a look at this piece of code. EJB modules do not need 
to be auto-exploded as they are JAR modules and the classloader used to 
load EJB classes (a MulitParentClassLoader) can directly load classes 
from JARs. In the case of WEB modules, they need to be exploded as, 
AFAIK, Jetty and Tomcat do not support packed WAR modules.

Also, while re-reading my email, I spotted a potential 
mis-interpretation. The problem you are raising only happens when an EAR 
module contains a non-exploded WAR module. In other words, if you unjar 
web.war within a web.war sub-folder, then everything should be OK.

Thanks,
Gianny

Manu George wrote:

> Hi Gianny,
>              Thanks for the explanation. Are ejb modules also auto
> exploded? I saw that war's are exploded but ejb modules don't seem to
> be auto exploded. Any reason for this?
>
> Thanks
> Manu
>
> On 8/5/06, Gianny Damour <gi...@optusnet.com.au> wrote:
>
>> Manu George wrote:
>>
>> > Hi,
>> >       Does Geronimo support exploded deployments of ear's that
>> > contain wars and jars using --inPlace Argument? When I try to deploy
>> > daytrader by extracting it  to a directory and passing the path to the
>> > directory as an argument to deploy along with --inPlace it is giving
>> > an error
>> >
>> > java.lang.Error: Only local file jars are supported
>> > jar:file:/C:/1.1samples/samp
>> > 
>> les/applications/daytrader/target/test/daytrader-ear-1.1/web.war!/WEB-INF/lib/st 
>>
>> >
>> > andard-1.1.1.jar
>>
>> There is a bug in the deployment of war module defining libraries within
>> WEB-INF/lib/ when this module is inside an ear module. I will fix this
>> problem.
>>
>> > What is the correct format of an exploded EAR. Will it have the
>> > ejb-jar and webapp-war exploded as well? OR will geronimo support non
>> > exploded format as well?
>>
>> In the case of an in-place deployment, nested modules are auto-exploded
>> upon deployment, if need be. For instance, if there is a non-exploded
>> war module mywar.war within an ear, then the war is renamed
>> mywar.war.saved, a sub-directory mywar.war is created and
>> mywar.war.saved is unjarred within it.
>>
>> Thanks,
>> Gianny
>>
>> >
>> > Regards
>> > Manu
>> >
>>
>>
>>
>
>



Re: Regarding Exploded Deployments

Posted by Manu George <ma...@gmail.com>.
Hi Gianny,
              Thanks for the explanation. Are ejb modules also auto
exploded? I saw that war's are exploded but ejb modules don't seem to
be auto exploded. Any reason for this?

Thanks
Manu

On 8/5/06, Gianny Damour <gi...@optusnet.com.au> wrote:
> Manu George wrote:
>
> > Hi,
> >       Does Geronimo support exploded deployments of ear's that
> > contain wars and jars using --inPlace Argument? When I try to deploy
> > daytrader by extracting it  to a directory and passing the path to the
> > directory as an argument to deploy along with --inPlace it is giving
> > an error
> >
> > java.lang.Error: Only local file jars are supported
> > jar:file:/C:/1.1samples/samp
> > les/applications/daytrader/target/test/daytrader-ear-1.1/web.war!/WEB-INF/lib/st
> >
> > andard-1.1.1.jar
>
> There is a bug in the deployment of war module defining libraries within
> WEB-INF/lib/ when this module is inside an ear module. I will fix this
> problem.
>
> > What is the correct format of an exploded EAR. Will it have the
> > ejb-jar and webapp-war exploded as well? OR will geronimo support non
> > exploded format as well?
>
> In the case of an in-place deployment, nested modules are auto-exploded
> upon deployment, if need be. For instance, if there is a non-exploded
> war module mywar.war within an ear, then the war is renamed
> mywar.war.saved, a sub-directory mywar.war is created and
> mywar.war.saved is unjarred within it.
>
> Thanks,
> Gianny
>
> >
> > Regards
> > Manu
> >
>
>
>

Re: Regarding Exploded Deployments

Posted by Gianny Damour <gi...@optusnet.com.au>.
Manu George wrote:

> Hi,
>       Does Geronimo support exploded deployments of ear's that
> contain wars and jars using --inPlace Argument? When I try to deploy
> daytrader by extracting it  to a directory and passing the path to the
> directory as an argument to deploy along with --inPlace it is giving
> an error
>
> java.lang.Error: Only local file jars are supported 
> jar:file:/C:/1.1samples/samp
> les/applications/daytrader/target/test/daytrader-ear-1.1/web.war!/WEB-INF/lib/st 
>
> andard-1.1.1.jar

There is a bug in the deployment of war module defining libraries within 
WEB-INF/lib/ when this module is inside an ear module. I will fix this 
problem.

> What is the correct format of an exploded EAR. Will it have the
> ejb-jar and webapp-war exploded as well? OR will geronimo support non
> exploded format as well?

In the case of an in-place deployment, nested modules are auto-exploded 
upon deployment, if need be. For instance, if there is a non-exploded 
war module mywar.war within an ear, then the war is renamed 
mywar.war.saved, a sub-directory mywar.war is created and 
mywar.war.saved is unjarred within it.

Thanks,
Gianny

>
> Regards
> Manu
>