• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB client app deployment error  RSS feed

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.
 
Rob Spoor
Sheriff
Posts: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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: 21048
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2966
210
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Allan,

Did you read this Glassfish EJB FAQ?

Regards,
Frits

 
Alan Smith
Ranch Hand
Posts: 185
Firefox Browser Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!