2

私は netbean 6.7.1 Glassfish v2.1 を使用しています ... メッセージ駆動型 Bean を作成しようとしています。

アプリ A (セッション Bean を使用してマップ メッセージを作成) --> アプリ B (メッセージ駆動型 Bean はここにあります)。

@Stateless
public class AManagerBean implements AManagerRemote {
....
}

@Remote
public interface AManagerRemote {
...
}

Aのメインクラスでは、

@EJB
public static AManagerRemote AManager;
AManager.requestFineAmt(memberID);

requestFineAmt メソッドでは、これらすべてのキュー接続のもので構成されます。

実行しようとすると。ステートレス EJB を作成できないというエラーを受け取りました。どうして???

WARNING: ACC003: Application threw an exception.
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException     occurred in server thread; nested exception is: 

java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception   is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 

javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not      create stateless EJB
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
    javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:243)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:205)
    at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
    at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
    at ejb.__AManagerRemote_Remote_DynamicStub.requestFineAmt(ejb/__AManagerRemote_Remote_DynamicStub.java)
    at ejb._AManagerRemote_Wrapper.requestFineAmt(ejb/_AManagerRemote_Wrapper.java)
    at lps.Main.main(Main.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
    at com.sun.enterprise.appclient.Main.main(Main.java:200) 


Caused by: java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 

javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not   create stateless EJB
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:251)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1420)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1325)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
    at $Proxy110.requestFineAmt(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)

Caused by: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(StatelessSessionContainer.java:785)
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(NonBlockingPool.java:199)
    at com.sun.ejb.containers.StatelessSessionContainer._getContext(StatelessSessionContainer.java:489)
    at com.sun.ejb.containers.BaseContainer.getContext(BaseContainer.java:1709)
    at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1238)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:202)
    ... 17 more


javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
    at ejb._LPSManagerRemote_Wrapper.requestFineAmt(ejb/_LPSManagerRemote_Wrapper.java)
    at lps.Main.main(Main.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
    at com.sun.enterprise.appclient.Main.main(Main.java:200)

Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:462)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:260)
    at com.sun.enterprise.appclient.Main.main(Main.java:200)


Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
    at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:450)
    ... 2 more


Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.RemoteException: nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB; nested exception is: 
    javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB
    at ejb._AManagerRemote_Wrapper.requestFineAmt(ejb/_AManagerRemote_Wrapper.java)
    at lps.Main.main(Main.java:23)
    ... 8 more

Java 結果: 1

4

1 に答える 1

1

SerializableEJB クラスとそこで使用されるすべてのクラスがインターフェースを実装していることを確認してください。

関連: EJB3 を使用する場合、いつエンティティをシリアライズ可能にする必要がありますか?

于 2013-03-28T17:13:52.150 に答える