jboss 4.2.x EJB3远程调用错误解决方法

: 

javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:109
9 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exce
ption is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.Communi
cationException: Failed to connect to server localhost:1099 [Root exception is java.lang.ClassNotFou
ndException: org.jnp.server.NamingServer_Stub (no security manager: RMI class loader disabled)]]
	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1727)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:680)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
	at javax.naming.InitialContext.lookup(InitialContext.java:351)
	at org.jboss.test.bmp.test.SmallCacheBmpUnitTestCase.testBMP(SmallCacheBmpUnitTestCase.java:46)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
	at junit.extensions.TestSetup.run(TestSetup.java:23)
	at org.jboss.test.compatibility.test.matrix.MatrixTestContainer$TestProxy.run(MatrixTestContainer.j
ava:185)
	at org.jboss.test.compatibility.test.matrix.MatrixTestContainer$TestSuiteProxy.run(MatrixTestContai
ner.java:85)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exc
eption is java.lang.ClassNotFoundException: org.jnp.server.NamingServer_Stub (no security manager: R
MI class loader disabled)]
	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:311)
	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1698)
	... 29 more
Caused by: java.lang.ClassNotFoundException: org.jnp.server.NamingServer_Stub (no security manager: 
RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
	at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:290)
	 


jboss启动服务器参数后追加 -Djava.rmi.server.ignoreStubClasses=true

你可能感兴趣的:(java,jboss,JUnit,Security,sun)