-
1. Re: Baffling NoClassDefFoundError Error
gzoller Jun 13, 2007 8:24 AM (in response to gzoller)Ahh!
Found the solution indirectly on another post. Here it is for future readers with the same problem:
You need to add a tag in your application.xml referencing the jar. This jar needs to be in your ear directory not WAR/lib.
I'm still baffled why this jar needs the special treatment and certain other jars can just be dropped into WAR/lib without issue. Not one to question the wisdom of sages or what works--I just did it, but I am curious what constitutes the difference between some jars and others.
Greg -
2. Re: Baffling NoClassDefFoundError Error
peterj Jun 13, 2007 10:57 AM (in response to gzoller)Classes inside a WAR file are visible only to other classes located inside the WAR file. Apparently the class in question was being accessed by a class outside the WAR file. Moving such a class into the EAR file makes it visible.
The gory details can be found at http://docs.jboss.com/jbossas/guides/j2eeguide/r2/en/html_single/#d0e309. (Good luck understanding it, I have read it multiple times and still don't understand some of it...)