- This topic has 5 replies, 3 voices, and was last updated 21 years, 5 months ago by
support-michael.
-
AuthorPosts
-
jcorbin4607MemberI am getting this error when I try to run a JUnit TestSuite.
I cannot seem to find the class org.jboss.ejb.plugins.local.LocalHomeProxy.
Where is this class?
javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.local.LocalHomeProxy (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:368)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:159)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:30)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:522)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:479)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.availability.test.RateScheduleTestCase.setUp(RateScheduleTestCase.java:54)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:395)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:279)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:171)
Scott AndersonParticipantI cannot seem to find the class org.jboss.ejb.plugins.local.LocalHomeProxy.
Where is this class?
In JBoss 3.2.1, it’s in jboss.jar.
–Scott
MyEclipse Support
jcorbin4607MemberHi Scott,
I verified it is in the same jar in my installation. Now for the fun. I have an EAR deployment (one EJB Module, no Web Module ) that has some JUnit test cases that attempt to lookup a bean in the deployment I get the exception I posted in the first message in this thread. Why would I get a ClassNotFoundException from a class that is obviously part of the JBOSS deployment?
As you know, this file resides in the ../server/default/lib directory which should get picked up my JBOSS integration within MyEclipseIDE. Wouldn’t you agree?
Maybe something else is going on that I am missing.
J.D.
jcorbin4607MemberIt appears this problem only shows up when I try to use EJB2.0 Local Interfaces. Remote interfaces work just fine.
I imagine, the problem is that an eclipse debug session starts in its own JVM, which would explain the problem with Local Interfaces. My question, and I think this is more appropriate to the Eclipse folks but will ask anyway, is how do you test Local Interfaces in MyEclipseIDE. I will look to see if there is an Eclipse setting that allows the sharing of the JVM.
J.D.
Scott AndersonParticipantJD,
I imagine, the problem is that an eclipse debug session starts in its own JVM, which would explain the problem with Local Interfaces.
Correct. Local interfaces can only be called within the same VM.
how do you test Local Interfaces in MyEclipseIDE
Actually, this has nothing to do with MyEclipse, but rather within an application server in general. Although I haven’t used it myself, you might want to look at the Cactus framework from Apache, which is a JUnit extension that facilitates J2EE application testing. It may do what you want, or it may not.
I will look to see if there is an Eclipse setting that allows the sharing of the JVM.
There is not. Such a setting would be very dangerous since the debugger would be running in the same process as the “debuggee”. This could crash everything very easily and is not supported.
–Scott
MyEclipse Support
support-michaelKeymasterHi JD,
The problem is that your JUnit tests run as a client-application to your EJBs. Client-applications don’t run in the same JVM as their server-side components. Local interfaces are meant to be accessed by other server-side components. So you must use remote interfaces for this scenario.
Michael
MyEclipse Support -
AuthorPosts