Application compiles succesfully, but when running in JBoss EAP throws NoSuchMethodError

Solution Verified - Updated -

Issue

  • Our team developed a new MDB, and it was tested in JBoss EAP developmeent server and worked fine, but when it was deployed to our QA's JBoss EAP server, it reported "NotSuchMethod" error when calling some function in the lib/jar file. The error message is
java.lang.NoSuchMethodError: com.jboss.examples.ExampleDAO.test(Lcom/jboss/examples/MyDO;)V
    at com.jboss.examples.mdb.ExampleMDB.onMessage(ExampleMDB.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content