NoClassDefFoundError jboss依赖项 - ejb

时间:2013-03-18 16:38:03

标签: jboss7.x

我有一个调用jar中包含的方法的ejb。我在jboss 7.1中添加了一个新模块来配置这个jar的依赖项,我可以正确调用这个类。

问题是在这个类中我创建了一个对象,该对象存在于同一个jar中,但存在于另一个包中。

这导致异常“NoClassDefoundError。”

这是堆栈跟踪:

Exception in thread "main" javax.ejb.EJBException: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx (CMTTxInterceptor.java: 166)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx (CMTTxInterceptor.java: 230)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required (CMTTxInterceptor.java: 304)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation (CMTTxInterceptor.java: 190)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation (TCCLInterceptor.java: 45)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.invocation.ChainedInterceptor.processInvocation (ChainedInterceptor.java: 61)
at org.jboss.as.ee.component.ViewService $ View.invoke (ViewService.java: 165)
at
at
at
at java.util.concurrent.Executors $ RunnableAdapter.call (Unknown Source)
at java.util.concurrent.FutureTask $ Sync.innerRun (Unknown Source)
at java.util.concurrent.FutureTask.run (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor $ Worker.run (Unknown Source)
at java.lang.Thread.run (Unknown Source)
at org.jboss.threads.JBossThread.run (JBossThread.java: 122)
at ... asynchronous invocation ... (Unknown Source)
at
at org.jboss.ejb.client.EJBClientInvocationContext.getResult (EJBClientInvocationContext.java: 270)
at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult (TransactionInterceptor.java: 47)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult (EJBClientInvocationContext.java: 272)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocationResult (ReceiverInterceptor.java: 132)
at org.jboss.ejb.client.EJBClientInvocationContext.getResult (EJBClientInvocationContext.java: 260)
at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse (EJBClientInvocationContext.java: 399)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke (EJBInvocationHandler.java: 140)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke (EJBInvocationHandler.java: 121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke (EJBInvocationHandler.java: 104)
at sun.proxy. $ Proxy0.test (Unknown Source)
at EJBApplicationClient.main (EJBApplicationClient.java: 25)
Caused by: java.lang.IllegalStateException: JBAS011048: Failed to construct component instance
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance (BasicComponent.java: 163)
at org.jboss.as.ee.component.BasicComponent.createInstance (BasicComponent.java: 85)
at
at
at org.jboss.as.ejb3.pool.AbstractPool.create (AbstractPool.java: 60)
at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get (StrictMaxPool.java: 123)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx (CMTTxInterceptor.java: 228)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required (CMTTxInterceptor.java: 304)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation (CMTTxInterceptor.java: 190)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation (TCCLInterceptor.java: 45)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.invocation.ChainedInterceptor.processInvocation (ChainedInterceptor.java: 61)
at org.jboss.as.ee.component.ViewService $ View.invoke (ViewService.java: 165)
at
at
at
at java.util.concurrent.Executors $ RunnableAdapter.call (Unknown Source)
at java.util.concurrent.FutureTask $ Sync.innerRun (Unknown Source)
at java.util.concurrent.FutureTask.run (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown Source)
at java.util.concurrent.ThreadPoolExecutor $ Worker.run (Unknown Source)
at java.lang.Thread.run (Unknown Source)
at org.jboss.threads.JBossThread.run (JBossThread.java: 122)
Caused by: java.lang.IllegalStateException: Failed to invoke constructor
at org.jboss.msc.value.ConstructedValue.getValue (ConstructedValue.java: 65)
at org.jboss.as.naming.ValueManagedReferenceFactory.getReference (ValueManagedReferenceFactory.java: 49)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.invocation.WeavedInterceptor.processInvocation (WeavedInterceptor.java: 53)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation (TCCLInterceptor.java: 45)
at org.jboss.invocation.InterceptorContext.proceed (InterceptorContext.java: 288)
at org.jboss.invocation.ChainedInterceptor.processInvocation (ChainedInterceptor.java: 61)
at org.jboss.as.ee.component.BasicComponent.constructComponentInstance (BasicComponent.java: 161)
... More December 35
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance (Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Unknown Source)
at java.lang.reflect.Constructor.newInstance (Unknown Source)
at org.jboss.msc.value.ConstructedValue.getValue (ConstructedValue.java: 61)
... More December 48
Caused by: java.lang.NoClassDefFoundError: locator / PersoneLocator
at client.RicercaSchedaPersona.doRicercaSchedaPersonaWS (RicercaSchedaPersona.java: 18)
at ejb.RicercaAnagraficaEJB.test (RicercaAnagraficaEJB.java: 30)
at ejb.RicercaAnagraficaEJB. <init> (RicercaAnagraficaEJB.java: 23)

module.xml内容

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.consodata.ws">
    <dependencies>
        <module name="javax.xml.bind.api"/>
        <module name="javax.xml.rpc.api"/>
    </dependencies>
    <resources>
        <resource-root path="consodataws.jar"/>
    </resources> 
</module>

提前致谢并对不起英语。

0 个答案:

没有答案