You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by gersek <ge...@gmail.com> on 2008/01/02 18:24:17 UTC

Unable to add jar to Geronimo classpath

Hi,
    I am trying to deploy an ejb/web project and my ejb uses some utility
classes from realMethodsFramework.jar.   Below mentioned class 
FrameworkDAOSessionBean(com/framework/business/ejb/FrameworkDAOSessionBean) 
is inside the jar mentioned above.

1. I have added realMethodsFramework.jar to EJB project as J2EE module
dependency.
2. It is in EAR root folder.
3. Tried to add to geronimo.bat as part of the classpath
but no luck, I still get classnot found error.  Can you please help me.

Thanks
Sekhar


Geronimo Application Server started
11:29:19,226 ERROR [Deployer] Deployment failed due to 
java.lang.NoClassDefFoundError:
com/framework/business/ejb/FrameworkDAOSessionBean
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
	at
org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:118)
	at
org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:62)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
	at
org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:118)
	at
org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:62)
	at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:424)
	at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:330)
	at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:152)
	at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:118)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:332)
	at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:614)
	at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:551)
	at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:473)
	at
org.apache.geronimo.openejb.deployment.EjbModuleBuilder$$FastClassByCGLIB$$cd80af20.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
	at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
	at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
	at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
	at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$418759ca.initContext(<generated>)
	at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:576)
	at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
	at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
	at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
	at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
	at
org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$42ad36bd.buildConfiguration(<generated>)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:304)
	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
	at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
	at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
	at
org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
	at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
	at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
	at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
	at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
	at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
	at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
	at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
	at java.security.AccessController.doPrivileged(Native Method)
	at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
	at
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
	at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)

-- 
View this message in context: http://www.nabble.com/Unable-to-add-jar-to-Geronimo-classpath-tp14582076s134p14582076.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Unable to add jar to Geronimo classpath

Posted by Sekhar Komirisetti <ge...@gmail.com>.
Viet and David Thanks for your reply. I was under impression that this forum
is for developers using geronimo.
I will add my next questions to the other forum.

I have add jar file to the EAR/lib directory as you suggested.
I am using geronimo 2.x. I am not adding any thing to geronimo lib directory
or bin directory.

Still not able to get it to working. I am getting same class not found
exception.  I am also using eclipse 3.3.0.
Your help is greatly appreciated.

Thanks
Sekhar




On 1/2/08, David Jencks <da...@yahoo.com> wrote:
>
> This type of question should be asked on the geronimo user list, not
> the dev list.
>
> On Jan 2, 2008, at 12:21 PM, Viet Nguyen wrote:
>
> > On Jan 2, 2008 12:24 PM, gersek <ge...@gmail.com> wrote:
> >>
> >> Hi,
> >>     I am trying to deploy an ejb/web project and my ejb uses some
> >> utility
> >> classes from realMethodsFramework.jar.   Below mentioned class
> >> FrameworkDAOSessionBean(com/framework/business/ejb/
> >> FrameworkDAOSessionBean)
> >> is inside the jar mentioned above.
> >>
> >> 1. I have added realMethodsFramework.jar to EJB project as J2EE
> >> module
> >> dependency.
>
> What do you mean by this?
>
> >> 2. It is in EAR root folder.
> >> 3. Tried to add to geronimo.bat as part of the classpath
>
> Don't do this.
>
> >> but no luck, I still get classnot found error.  Can you please
> >> help me.
> >>
> >> Thanks
> >> Sekhar
> >
> > Hi Sekhar,
> >
> > Try moving the realMethodsFramework.jar to the <root_dir>/lib folder.
> > It will make it into the classloader.
>
> I find this a bit ambiguous :-) -- is the root dir the geronimo root
> or the ear root?  If you are using a geronimo 2.x version, anything
> in the ear lib directory will be in the ear classloader.  Don't try
> adding stuff the the geronimo lib directory.
>
> If you are using an earlier geronimo version, you need to mention the
> jar you want in the ejb module's manifest classpath.  If you don't
> want to use the ear's lib directory, this will also work for geronimo
> 2.x.
>
> thanks
> david jencks
>
>
> >
> > Hope this helps,
> > Viet
> >
> >>
> >>
> >> Geronimo Application Server started
> >> 11:29:19,226 ERROR [Deployer] Deployment failed due to
> >> java.lang.NoClassDefFoundError:
> >> com/framework/business/ejb/FrameworkDAOSessionBean
> >>         at java.lang.ClassLoader.defineClass1(Native Method)
> >>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> >>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
> >>         at
> >> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass
> >> (TemporaryClassLoader.java:118)
> >>         at
> >> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass
> >> (TemporaryClassLoader.java:62)
> >>         at java.lang.ClassLoader.loadClassInternal
> >> (ClassLoader.java:319)
> >>         at java.lang.ClassLoader.defineClass1(Native Method)
> >>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
> >>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
> >>         at
> >> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass
> >> (TemporaryClassLoader.java:118)
> >>         at
> >> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass
> >> (TemporaryClassLoader.java:62)
> >>         at
> >> org.apache.openejb.config.AnnotationDeployer
> >> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:424)
> >>         at
> >> org.apache.openejb.config.AnnotationDeployer
> >> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:330)
> >>         at
> >> org.apache.openejb.config.AnnotationDeployer.deploy
> >> (AnnotationDeployer.java:152)
> >>         at
> >> org.apache.openejb.config.ConfigurationFactory$Chain.deploy
> >> (ConfigurationFactory.java:118)
> >>         at
> >> org.apache.openejb.config.ConfigurationFactory.configureApplication
> >> (ConfigurationFactory.java:332)
> >>         at
> >> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureAppl
> >> ication(EjbModuleBuilder.java:614)
> >>         at
> >> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo
> >> (EjbModuleBuilder.java:551)
> >>         at
> >> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext
> >> (EjbModuleBuilder.java:473)
> >>         at
> >> org.apache.geronimo.openejb.deployment.EjbModuleBuilder$
> >> $FastClassByCGLIB$$cd80af20.invoke(<generated>)
> >>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> >>         at
> >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> >> (FastMethodInvoker.java:38)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> >> (GBeanOperation.java:124)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
> >> (GBeanInstance.java:830)
> >>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke
> >> (RawInvoker.java:57)
> >>         at
> >> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke
> >> (RawOperationInvoker.java:35)
> >>         at
> >> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept
> >> (ProxyMethodInterceptor.java:96)
> >>         at
> >> org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$
> >> $418759ca.initContext(<generated>)
> >>         at
> >> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurati
> >> on(EARConfigBuilder.java:576)
> >>         at
> >> org.apache.geronimo.j2ee.deployment.EARConfigBuilder$
> >> $FastClassByCGLIB$$38e56ec6.invoke(<generated>)
> >>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> >>         at
> >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> >> (FastMethodInvoker.java:38)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> >> (GBeanOperation.java:124)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
> >> (GBeanInstance.java:830)
> >>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke
> >> (RawInvoker.java:57)
> >>         at
> >> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke
> >> (RawOperationInvoker.java:35)
> >>         at
> >> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept
> >> (ProxyMethodInterceptor.java:96)
> >>         at
> >> org.apache.geronimo.deployment.ConfigurationBuilder$
> >> $EnhancerByCGLIB$$42ad36bd.buildConfiguration(<generated>)
> >>         at org.apache.geronimo.deployment.Deployer.deploy
> >> (Deployer.java:304)
> >>         at org.apache.geronimo.deployment.Deployer.deploy
> >> (Deployer.java:126)
> >>         at
> >> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$
> >> $734a235d.invoke(<generated>)
> >>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> >>         at
> >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> >> (FastMethodInvoker.java:38)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> >> (GBeanOperation.java:124)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
> >> (GBeanInstance.java:865)
> >>         at
> >> org.apache.geronimo.kernel.basic.BasicKernel.invoke
> >> (BasicKernel.java:239)
> >>         at org.apache.geronimo.kernel.KernelGBean.invoke
> >> (KernelGBean.java:342)
> >>         at
> >> org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$
> >> $1cccefc9.invoke(<generated>)
> >>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
> >>         at
> >> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke
> >> (FastMethodInvoker.java:38)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke
> >> (GBeanOperation.java:124)
> >>         at
> >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke
> >> (GBeanInstance.java:865)
> >>         at
> >> org.apache.geronimo.kernel.basic.BasicKernel.invoke
> >> (BasicKernel.java:239)
> >>         at
> >> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke
> >> (MBeanGBeanBridge.java:168)
> >>         at
> >> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke
> >> (DefaultMBeanServerInterceptor.java:836)
> >>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke
> >> (JmxMBeanServer.java:761)
> >>         at
> >> javax.management.remote.rmi.RMIConnectionImpl.doOperation
> >> (RMIConnectionImpl.java:1426)
> >>         at
> >> javax.management.remote.rmi.RMIConnectionImpl.access$200
> >> (RMIConnectionImpl.java:72)
> >>         at
> >> javax.management.remote.rmi.RMIConnectionImpl
> >> $PrivilegedOperation.run(RMIConnectionImpl.java:1264)
> >>         at java.security.AccessController.doPrivileged(Native Method)
> >>         at
> >> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation
> >> (RMIConnectionImpl.java:1366)
> >>         at
> >> javax.management.remote.rmi.RMIConnectionImpl.invoke
> >> (RMIConnectionImpl.java:788)
> >>         at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown
> >> Source)
> >>         at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke
> >> (DelegatingMethodAccessorImpl.java:25)
> >>         at java.lang.reflect.Method.invoke(Method.java:597)
> >>         at sun.rmi.server.UnicastServerRef.dispatch
> >> (UnicastServerRef.java:305)
> >>         at sun.rmi.transport.Transport$1.run(Transport.java:159)
> >>         at java.security.AccessController.doPrivileged(Native Method)
> >>         at sun.rmi.transport.Transport.serviceCall(Transport.java:
> >> 155)
> >>         at sun.rmi.transport.tcp.TCPTransport.handleMessages
> >> (TCPTransport.java:535)
> >>         at
> >> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0
> >> (TCPTransport.java:790)
> >>         at
> >> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
> >> (TCPTransport.java:649)
> >>         at
> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask
> >> (ThreadPoolExecutor.java:885)
> >>         at
> >> java.util.concurrent.ThreadPoolExecutor$Worker.run
> >> (ThreadPoolExecutor.java:907)
> >>         at java.lang.Thread.run(Thread.java:619)
> >>
> >> --
> >> View this message in context: http://www.nabble.com/Unable-to-add-
> >> jar-to-Geronimo-classpath-tp14582076s134p14582076.html
> >> Sent from the Apache Geronimo - Dev mailing list archive at
> >> Nabble.com.
> >>
> >>
>
>

Re: Unable to add jar to Geronimo classpath

Posted by David Jencks <da...@yahoo.com>.
This type of question should be asked on the geronimo user list, not  
the dev list.

On Jan 2, 2008, at 12:21 PM, Viet Nguyen wrote:

> On Jan 2, 2008 12:24 PM, gersek <ge...@gmail.com> wrote:
>>
>> Hi,
>>     I am trying to deploy an ejb/web project and my ejb uses some  
>> utility
>> classes from realMethodsFramework.jar.   Below mentioned class
>> FrameworkDAOSessionBean(com/framework/business/ejb/ 
>> FrameworkDAOSessionBean)
>> is inside the jar mentioned above.
>>
>> 1. I have added realMethodsFramework.jar to EJB project as J2EE  
>> module
>> dependency.

What do you mean by this?

>> 2. It is in EAR root folder.
>> 3. Tried to add to geronimo.bat as part of the classpath

Don't do this.

>> but no luck, I still get classnot found error.  Can you please  
>> help me.
>>
>> Thanks
>> Sekhar
>
> Hi Sekhar,
>
> Try moving the realMethodsFramework.jar to the <root_dir>/lib folder.
> It will make it into the classloader.

I find this a bit ambiguous :-) -- is the root dir the geronimo root  
or the ear root?  If you are using a geronimo 2.x version, anything  
in the ear lib directory will be in the ear classloader.  Don't try  
adding stuff the the geronimo lib directory.

If you are using an earlier geronimo version, you need to mention the  
jar you want in the ejb module's manifest classpath.  If you don't  
want to use the ear's lib directory, this will also work for geronimo  
2.x.

thanks
david jencks


>
> Hope this helps,
> Viet
>
>>
>>
>> Geronimo Application Server started
>> 11:29:19,226 ERROR [Deployer] Deployment failed due to
>> java.lang.NoClassDefFoundError:
>> com/framework/business/ejb/FrameworkDAOSessionBean
>>         at java.lang.ClassLoader.defineClass1(Native Method)
>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
>>         at
>> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass 
>> (TemporaryClassLoader.java:118)
>>         at
>> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass 
>> (TemporaryClassLoader.java:62)
>>         at java.lang.ClassLoader.loadClassInternal 
>> (ClassLoader.java:319)
>>         at java.lang.ClassLoader.defineClass1(Native Method)
>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
>>         at
>> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass 
>> (TemporaryClassLoader.java:118)
>>         at
>> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass 
>> (TemporaryClassLoader.java:62)
>>         at
>> org.apache.openejb.config.AnnotationDeployer 
>> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:424)
>>         at
>> org.apache.openejb.config.AnnotationDeployer 
>> $ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:330)
>>         at
>> org.apache.openejb.config.AnnotationDeployer.deploy 
>> (AnnotationDeployer.java:152)
>>         at
>> org.apache.openejb.config.ConfigurationFactory$Chain.deploy 
>> (ConfigurationFactory.java:118)
>>         at
>> org.apache.openejb.config.ConfigurationFactory.configureApplication 
>> (ConfigurationFactory.java:332)
>>         at
>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureAppl 
>> ication(EjbModuleBuilder.java:614)
>>         at
>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo 
>> (EjbModuleBuilder.java:551)
>>         at
>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext 
>> (EjbModuleBuilder.java:473)
>>         at
>> org.apache.geronimo.openejb.deployment.EjbModuleBuilder$ 
>> $FastClassByCGLIB$$cd80af20.invoke(<generated>)
>>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>         at
>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:124)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:830)
>>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>> (RawInvoker.java:57)
>>         at
>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>> (RawOperationInvoker.java:35)
>>         at
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>> (ProxyMethodInterceptor.java:96)
>>         at
>> org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$ 
>> $418759ca.initContext(<generated>)
>>         at
>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfigurati 
>> on(EARConfigBuilder.java:576)
>>         at
>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder$ 
>> $FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>         at
>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:124)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:830)
>>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
>> (RawInvoker.java:57)
>>         at
>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
>> (RawOperationInvoker.java:35)
>>         at
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
>> (ProxyMethodInterceptor.java:96)
>>         at
>> org.apache.geronimo.deployment.ConfigurationBuilder$ 
>> $EnhancerByCGLIB$$42ad36bd.buildConfiguration(<generated>)
>>         at org.apache.geronimo.deployment.Deployer.deploy 
>> (Deployer.java:304)
>>         at org.apache.geronimo.deployment.Deployer.deploy 
>> (Deployer.java:126)
>>         at
>> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$ 
>> $734a235d.invoke(<generated>)
>>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>         at
>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:124)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:865)
>>         at
>> org.apache.geronimo.kernel.basic.BasicKernel.invoke 
>> (BasicKernel.java:239)
>>         at org.apache.geronimo.kernel.KernelGBean.invoke 
>> (KernelGBean.java:342)
>>         at
>> org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$ 
>> $1cccefc9.invoke(<generated>)
>>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>>         at
>> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke 
>> (FastMethodInvoker.java:38)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
>> (GBeanOperation.java:124)
>>         at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
>> (GBeanInstance.java:865)
>>         at
>> org.apache.geronimo.kernel.basic.BasicKernel.invoke 
>> (BasicKernel.java:239)
>>         at
>> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke 
>> (MBeanGBeanBridge.java:168)
>>         at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke 
>> (DefaultMBeanServerInterceptor.java:836)
>>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke 
>> (JmxMBeanServer.java:761)
>>         at
>> javax.management.remote.rmi.RMIConnectionImpl.doOperation 
>> (RMIConnectionImpl.java:1426)
>>         at
>> javax.management.remote.rmi.RMIConnectionImpl.access$200 
>> (RMIConnectionImpl.java:72)
>>         at
>> javax.management.remote.rmi.RMIConnectionImpl 
>> $PrivilegedOperation.run(RMIConnectionImpl.java:1264)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at
>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation 
>> (RMIConnectionImpl.java:1366)
>>         at
>> javax.management.remote.rmi.RMIConnectionImpl.invoke 
>> (RMIConnectionImpl.java:788)
>>         at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown  
>> Source)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke 
>> (DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at sun.rmi.server.UnicastServerRef.dispatch 
>> (UnicastServerRef.java:305)
>>         at sun.rmi.transport.Transport$1.run(Transport.java:159)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at sun.rmi.transport.Transport.serviceCall(Transport.java: 
>> 155)
>>         at sun.rmi.transport.tcp.TCPTransport.handleMessages 
>> (TCPTransport.java:535)
>>         at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0 
>> (TCPTransport.java:790)
>>         at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 
>> (TCPTransport.java:649)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
>> (ThreadPoolExecutor.java:885)
>>         at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run 
>> (ThreadPoolExecutor.java:907)
>>         at java.lang.Thread.run(Thread.java:619)
>>
>> --
>> View this message in context: http://www.nabble.com/Unable-to-add- 
>> jar-to-Geronimo-classpath-tp14582076s134p14582076.html
>> Sent from the Apache Geronimo - Dev mailing list archive at  
>> Nabble.com.
>>
>>


Re: Unable to add jar to Geronimo classpath

Posted by Viet Nguyen <vh...@gmail.com>.
On Jan 2, 2008 12:24 PM, gersek <ge...@gmail.com> wrote:
>
> Hi,
>     I am trying to deploy an ejb/web project and my ejb uses some utility
> classes from realMethodsFramework.jar.   Below mentioned class
> FrameworkDAOSessionBean(com/framework/business/ejb/FrameworkDAOSessionBean)
> is inside the jar mentioned above.
>
> 1. I have added realMethodsFramework.jar to EJB project as J2EE module
> dependency.
> 2. It is in EAR root folder.
> 3. Tried to add to geronimo.bat as part of the classpath
> but no luck, I still get classnot found error.  Can you please help me.
>
> Thanks
> Sekhar

Hi Sekhar,

Try moving the realMethodsFramework.jar to the <root_dir>/lib folder.
It will make it into the classloader.

Hope this helps,
Viet

>
>
> Geronimo Application Server started
> 11:29:19,226 ERROR [Deployer] Deployment failed due to
> java.lang.NoClassDefFoundError:
> com/framework/business/ejb/FrameworkDAOSessionBean
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
>         at
> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:118)
>         at
> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:62)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
>         at
> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:118)
>         at
> org.apache.geronimo.kernel.classloader.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:62)
>         at
> org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:424)
>         at
> org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:330)
>         at
> org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:152)
>         at
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:118)
>         at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:332)
>         at
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:614)
>         at
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:551)
>         at
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:473)
>         at
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder$$FastClassByCGLIB$$cd80af20.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$418759ca.initContext(<generated>)
>         at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:576)
>         at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
>         at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>         at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>         at
> org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$42ad36bd.buildConfiguration(<generated>)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:304)
>         at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
>         at
> org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>         at
> org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(<generated>)
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
>         at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>         at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>         at
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:168)
>         at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
>         at
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
>         at
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
>         at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
>         at sun.rmi.transport.Transport$1.run(Transport.java:159)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>         at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>         at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>         at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)
>
> --
> View this message in context: http://www.nabble.com/Unable-to-add-jar-to-Geronimo-classpath-tp14582076s134p14582076.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>