users@glassfish.java.net

ClassLoader problems

From: <glassfish_at_javadesktop.org>
Date: Sat, 07 Nov 2009 09:12:06 PST

Hi All;
I have a rather big project with a dozen of dependent jar files. To ease development, I tried to put some of the jar files in the domains/domain1/lib directory for 2 reasons:
To decrease the time it takes for deploy/re-deployment during the development.
To decrease the chance of getting OutOfMemoryError PermGen stuff as I am getting it quite often.
After doing some research, it seams decreasing the classes that are loaded/re-loaded with each redeployment helps! I may be wrong, but i would like an explanation if anyone has a suggestion. I don't mind the large jar size if I don't get the PermGen error. I am getting an exception:

Building SessionFactory failed. java.lang.NoClassDefFoundError

org/jdesktop/beans/AbstractBean at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2395) at java.lang.Class.getDeclaredMethods(Class.java:1763) at org.hibernate.property.BasicPropertyAccessor.getterMethod(BasicPropertyAccessor.java:317) at org.hibernate.property.BasicPropertyAccessor.getGetterOrNull(BasicPropertyAccessor.java:297) at org.hibernate.property.BasicPropertyAccessor.createGetter(BasicPropertyAccessor.java:280) at org.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:275) at org.hibernate.util.ReflectHelper.getter(ReflectHelper.java:80) at org.hibernate.util.ReflectHelper.reflectedPropertyClass(ReflectHelper.java:71) at org.hibernate.mapping.SimpleValue.setTypeUsingReflection(SimpleValue.java:276) at org.hibernate.cfg.HbmBinder.bindSimpleId(HbmBinder.java:401) at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:334) at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:273) at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:144) at org.hibernate.cfg.Configuration.add(Configuration.java:669) at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:504) at org.hibernate.cfg.Configuration.addResource(Configuration.java:566) at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1584) at org.hibernate.cfg.Configuration.parseSessio

this goes on and on.

I am sure I have the jar file org/jdesktop/beans/AbstractBean in the web-inf/lib. I even tried to put the hibernate related jars in the lib and still getting the error.


Any help is greatly appreciated.

Thanks
Kamal
[Message sent by forum member 'kamalsofteng' (kamal.softeng_at_yahoo.com)]

http://forums.java.net/jive/thread.jspa?messageID=370991