• 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Class not found in EAR

Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have just moved to RAD 8.5, and I am having issues (which may be due to the move, or more likely due to my ignorance).
I have an EAR file - it has two modules (OnfsTh.war and FtpReInsEjb.jar). The war file contains a web service that then drops a message onto a JMS bus for the MDB inside the ejb.jar file.

As part of the onMessage processing, the MDB calls classes in several Utility jar files. Everything worked find until I added another call in onMessage to class in a new jar file. It is able to find classes in the other jar's (both open source jars and jars from other projects) just fine - but when I come to the TiffToTiff jar, I get a Class Not Found error. Everything compiles fine - all the spelling is fine - but it can't find TiffToTiff. I am at a loss.

RAD doesn't appear to be putting any classpath information in any Manifests - but since it can find the other classes in the other jars, I stopped going down that path.

CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "onMessage" on bean "BeanId(OnfsThEAR#FtpReInsEjb.jar#FtpReInsMDB, null)". Exception data: java.lang.NoClassDefFoundError: com/onfs/tifftotiff/TiffToTiff
at com.onfs.thunderhead.ftpreins.FtpReInsImpl.getAttachmentList(FtpReInsImpl.java:95)
at com.onfs.thunderhead.ftpreins.FtpReInsImpl.processWsCall(FtpReInsImpl.java:178)
at com.onfs.thunderhead.ftpreins.FtpReInsMDB.onMessage(FtpReInsMDB.java:53)
at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:1164)
at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:843)
at $Proxy37.onMessage(Unknown Source)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEndpointInvokerImpl.java:233)
at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:901)
at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:592)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:608)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783)

Caused by: java.lang.ClassNotFoundException: com.onfs.tifftotiff.TiffToTiff
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:198)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:665)
at java.lang.ClassLoader.loadClass(ClassLoader.java:644)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:583)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
... 11 more

[Thumbnail for Ear_1.GIF]
Ear - as seen in RAD
[Thumbnail for Ear_2.gif]
Ear - as seen in zip.
Ron Alby
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well - it appears that something was just stuck out in Websphere. I removed amy application from the app server, bounced the app server, then reloaded the application back on it. The error went away.

I don't know ... when you're dealing with Websphere sometimes I think it matters what direction you're facing when you click the mouse button.
Posts: 25682
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah... when I was using RAD to run Websphere, if I renamed a resource then to get Websphere to notice that the version with the old name really wasn't there any more, I had to take the computer containing RAD and Websphere to a different continent and have the whole thing melted down at temperatures exceeding 1000 degrees Kelvin.
Posts: 1268
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest you to configure each jar as utility jar at EAR project level. I solved a couple of weird situation like yours using this approach.
We noticed he had no friends. So we gave him this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic