1

Im having a problem when reading libraries from jar within EAR file. This is my project tree:

https://i.stack.imgur.com/FgVs2.jpg

In my MANIFEST.MF file (of the jar) I have this: Manifest-Version: 1.0 Class-Path: lib/jboss-logging-spi.jar lib/jboss-messaging-client.jar

but when I use this EJB it throws an error:

java.lang.NoClassDefFoundError: org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is: java.lang.NoClassDefFoundError: org/jboss/jms/client/delegate/ClientConnectionFactoryDelegate

I dont know what to do I have tried different ways of the MANIFEST file but with no results. any help would be appreciated!!

user1352643
  • 39
  • 2
  • 5

1 Answers1

0

Make sure you have configured the EJB module into META-INF/application.xml

<application>
  <display-name>My Application</display-name>

  <module>
    <ejb>ejbModule.jar</ejb>
  </module>      

  <library-directory>lib</library-directory>
</application>

Furthermore, try to add jboss-all-client.jar too:

The client/jbossall-client.jar library that used to bundle the majority of jboss client libraries, is now referencing them instead through the Class-Path manifest entry. This allows swapping included libraries (e.g. jboss-javaee.jar) without having to re-package jbossall-client.jar. On the other hand, it requires that you have jbossall-client.jar together with the other client/*.jar libraries, so they can be found.

Marcelo Keiti
  • 1,200
  • 9
  • 10