JBoss 4.0.5 GA + JDK6开发EJB3时的调用问题

萧少聪 [Scott Siu]
E-Mail:[email protected]

    在进行EJB3开发时,我用到了JDK6+NetBeans5.5,服务器选用JBoss(Jboss已经被RedHat收购了,作为RHCE我当然最支持它了)!NetBeans5.5中Swing得好了很大的加强,但需要JDK6的支持!

在测试中发现,JBoss4.0.5在JDK6下会出现以下错误

java.lang.reflect.UndeclaredThrowableException
at $Proxy6.updateAddress(Unknown Source)
at com.qualitype.testcase.client.RemoteClientTestCase.test(RemoteClientTestCase.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


其实这是jboss-remoting的一个bug!

以下是解决方法,十分简单:)
下载以下jar
http://repository.jboss.com/jboss/remoting/1.4.6.GA/lib/jboss-remoting.jar
复盖$jboss_home/server/default/lib中相应的文件就OK了!
 

你可能感兴趣的:(程序设计交流)