java.lang.ReflectiveOperationException returned to JDK 6 EJB client when calling JBoss EAP 6 running on JDK 7
Issue
I compiled the client JARs with Java 6. When executing the client with Java 6, I get the following:
javax.ejb.EJBException: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:236)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)
at com.sun.proxy.$Proxy0.test(Unknown Source)
at invoker.TheCall2.run(TheCall2.java:30)
Caused by: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
....
When running with Java 7, I get:
javax.ejb.EJBException: java.lang.ClassNotFoundException: com.examples.MiddleDate from [Module "deployment.example.ear.example-ejb.jar:main" from Service Module Loader]
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:236)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)
at com.sun.proxy.$Proxy0.test(Unknown Source)
at example.client.Client.run(TheCall2.java:30)
Caused by: java.lang.ClassNotFoundException: com.examples.MiddleDate from [Module "deployment.example.ear.example.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
....
Environment
Red Hat JBoss Enterprise Application Platform 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.