Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Unable to find shared jar in WSAD 5.1.2's WebSphere 5.0 Test Environment

 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have an EAR in with 2 EJB modules (b.jar and c.jar) in WSAD 5.1.2. There is a shared jar called a.jar which is added under ear module. Now, now when I deploy this b.jar inside WSAD 5.1.2's WebSphere 5.0 Test Environment, I am getting an error saying
java.lang.NoClassDefFoundError: org//runtime/IUnmarshallable but this class is there in a.jar

What am I missing here. I also tried adding this a.jar to b.jar's MANIFEST.MF file but no use ....


Thanks & Regards,
 
author
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Per J2EE spec, you have to add the shared jar in the EAR to the Manifest of each EJB jar file. In WSAD, you can add itby right-clicking the EJB project. Selecting Properties->Java Jar Dependencies. Then check the jar you want.
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roland Barcia,

I am aware of this feature but things are not working like this.

Say I have below structure :

a.ear
--------- a1.war
--------- a2.war
--------- a3-ejb.jar
--------- a4.jar
--------- a5.jar

now, a4.jar and a5.jar are used by a1.war and I have added a4.jar and a5.jar as jar dependencies to a1.war but somewhow when I deploy and run a1.war on WSAD 5.1.2's WebSphere 5.0 Test Environment, a4.jar and a5.jar are not somehow getting loaded but if I add a4.jar and a4.jar to a1.war's WEB-INF\lib directory then a1.war works deployment works fine. I am not getting what is the problem. Please suggest ...
 
Roland Barcia
author
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tested the EAR utility jars many times and it should work. Take a look at the Server COnfiguration View. Your WAR file may be bound to a different EAR project such as default EAR. The Server Configuration View will give you a hierarchiy view of what is deployed.
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a.ear
--------- a1.war
--------- a2.war
--------- a3-ejb.jar
--------- a4.jar
--------- a5.jar

Do you mean to say that if a1.war, a2.war, a3-ejb.jar, a4.jar, a5.jar are in default Ear then jar dependency concept wont work and we need package them in a named ear like say a.ear ?
 
Squanch that. And squanch this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!