• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB client app deployment error

 
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to deploy a really simple EJB app-client jar to glassfish but keep seeing the following error in regard to my jar file:

The following extensions or libraries are referenced from the manifest of C:\Users\asmith\AppData\Local\Temp\Client-18654884305939595801.0.jar but were not found where indicated: lib\RemoteInterfaces-1.0.jar lib\javaee-api-7.0.jar ; ignoring and continuing

My jar is set up as follows:

Client-1.0.jar ->
->META-INF
MANIFEST.MF
application-client.xml
sun-application-client.xml
->com.alan.client
Main.class
->lib
RemoteInterfaces-1.0.jar
javaee-api-7.0.jar

My MANIFEST.MF contains:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: asmith
Build-Jdk: 1.8.0_25
Main-Class: com.alan.client.Main
Class-Path: lib/RemoteInterfaces-1.0.jar lib/javaee-api-7.0.jar

What is the issue? Any help appreciated.

edit: I've tried to indent the jar contents correctly but not sure how to do it! Hopefully you can understand it's content layout.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't load classes from JAR files within another JAR files, unless you use a custom class loader. With that manifest, the JVM is looking for these JAR files in a folder called lib that is in the same folder as the main JAR file. It's not looking in a lib folder inside the main JAR file.
 
Alan Smith
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Spoor wrote:With that manifest, the JVM is looking for these JAR files in a folder called lib that is in the same folder as the main JAR file. It's not looking in a lib folder inside the main JAR file.



I did not know this! I guess I'm confusing jar, war and ear packaging! I believe you can do this in the latter two. I'll try that out. Thanks for the help.
 
Alan Smith
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still not working I have updated the manifest to point to a jar outside the jarfile but glassfish still isn't picking it up when I deploy the jar. I have the jar in every lib directory I can find in glassfish as well! Dunno what is going on at this stage.

Manifest:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: alan
Build-Jdk: 1.7.0_45
Main-Class: com.alan.client.Main
Class-Path: /home/alan/jars/RemoteInterfaces-1.0.jar <- this contains a remote interface called SessionBeanRemote

Glassfish error on deployment:
SEVERE: Class [ Lcom/alan/SessionBeanRemote; ] not found. Error while loading [ class com.alan.client.Main]
 
Rob Spoor
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Alan Smith wrote:

Rob Spoor wrote:With that manifest, the JVM is looking for these JAR files in a folder called lib that is in the same folder as the main JAR file. It's not looking in a lib folder inside the main JAR file.



I did not know this! I guess I'm confusing jar, war and ear packaging! I believe you can do this in the latter two.


WAR files indeed support nested JAR files in the WEB-INF/lib folder, and EAR files in the lib folder. JAR files do not.

As for this issue, I'm afraid I haven't worked with either Glassfish or app-client JARs, so I won't be able to help you out any further.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Allan,

Did you read this Glassfish EJB FAQ?

Regards,
Frits

 
Alan Smith
Ranch Hand
Posts: 185
Netbeans IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Frits Walraven wrote:Hi Allan,

Did you read this Glassfish EJB FAQ?

Regards,
Frits



Hi Frits, no I have not! Thanks. I'll check this out.

Regards,
Alan
reply
    Bookmark Topic Watch Topic
  • New Topic