-
1. Re: EJB Project: Class not found
jaikiran May 31, 2012 10:08 PM (in response to sd_rc)You'll have to add more details including the exact version of JBoss AS7 and the entire exception stacktrace.
-
2. Re: EJB Project: Class not found
sd_rc May 31, 2012 11:43 PM (in response to jaikiran)Thanks jaikiran.
Here are the details you asked for:
JBoss version: 7.1.1
Stack trace:
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/dbutils/ResultSetHandler
at com.message_consumer.Queue_Listen.onMessage(Queue_Listen.java:60
[Queue_List.jar:]
) [rt.jar:1.6.0_10]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_10]
) [rt.jar:1.6.0_10]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_10]
) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]at java.lang.reflect.Method.invoke(Method.java:597
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as.jar:7.1.1.Final]
) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)[jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)[jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)[jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]
... 37 more
Caused by:
java.lang.ClassNotFoundException: org.apache.commons.dbutils.ResultSetHandler from [Module "deployment.EAR_Project.ear.Queue_List.jar:main" from Service Module Loader]at org.jboss.modules.ModuleClassLoader.findClass(
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [rt.jar:1.6.0_10]
... 55 more
ModuleClassLoader.java:190) -
3. Re: EJB Project: Class not found
navurinv Jun 1, 2012 12:25 AM (in response to sd_rc)commons-beanutils
commons-logging-1.1 etc like some jar missing i think these jars we can found make sure these type of jar set runtime classpath
-
4. Re: EJB Project: Class not found
jaikiran Jun 1, 2012 1:06 AM (in response to navurinv)1 of 1 people found this helpfulnavuri prasad wrote:
commons-beanutils
commons-logging-1.1 etc like some jar missing i think these jars we can found make sure these type of jar set runtime classpath
Let's keep the IDE out of this. Ultimately this is a runtime exception that you are seeing on the server. All you have to do is package those jars within your application. If it's a .ear, then just package those in .ear/lib folder or if it's a war then package them in .war/WEB-INF/lib folder.
-
5. Re: EJB Project: Class not found
sd_rc Jun 1, 2012 7:09 AM (in response to jaikiran)It is an EJB project. the jar files are in a lib folder. i have also added them in the build path.
-
6. Re: EJB Project: Class not found
jaikiran Jun 1, 2012 7:24 AM (in response to sd_rc)sd_rc wrote:
It is an EJB project. the jar files are in a lib folder. i have also added them in the build path.
I don't use IDEs to build my deployments, so I have no idea how to get that right. Ultimately, the application package that you are deploying isn't having the necessary jars in it. Someone with IDE packaging experience might be able to help.
-
7. Re: EJB Project: Class not found
sd_rc Jun 1, 2012 9:02 AM (in response to jaikiran)thanks guys. i hope someone can help me out with this!
-
8. Re: EJB Project: Class not found
sd_rc Jun 1, 2012 11:15 AM (in response to sd_rc)Solved the issue. Packaged the EJB project into an EAR package. Then added jar files to the EAR/lib folder.