• 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

Class not found in EAR

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

Ear_1.GIF
[Thumbnail for Ear_1.GIF]
Ear - as seen in RAD
Ear_2.gif
[Thumbnail for Ear_2.gif]
Ear - as seen in zip.
 
Ron Alby
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1357
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic