I have a method on a Session Bean with takes as an argument an Entity Bean (its remote interface.)  I have constructed two test programs.  One test program is another Session Bean and one is a client application invoked via the command line (JBoss version 2.2 under Linux.)
 
The functionality in the Test Session Bean and the Command Line Client is identical (cut and paste basically.)  The test consists of locating the Home for both the Entity and Session Beans, creating an instance of each type and invoking methods on each newly created bean.  One of the methods on the Session Bean I am testing takes as an argument the Entity Bean's remote object.  This method, along with other methods which take simple types, work fine in the Test Session Bean.  In the Command Line Client test the method which take the Entity Bean's remote object fails with the following traceback...
 
java.lang.reflect.UndeclaredThrowableException: java.lang.ClassNotFoundException: com.wallabysoft.ejbe.company.Company
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
        at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown Source)
        at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:188)
        at $Proxy5.relate(Unknown Source)
        at RelationTest.test1(RelationTest.java:84)
        at java.lang.reflect.Method.invoke(Native Method)
        at RelationTest.main(RelationTest.java:238)
 
 
The test I am conducting is not without precedent.  For instance the foundation for this test is not much different than the QuoteLineItem Bean in Mastering Enterprise JavaBeans (Ed Roman.) In addition I have successfully execute these tests under WebLogic and Sun's J2EE Reference Server.  I therefore can only conclude that I have improperly configured my JBoss Server but have yet to find to solution.
 
Brian Farrar

Reply via email to