Daniel Winz wrote:
I need help for a class loader problem too. My error message:
the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, oracle/toplink/essentials/internal/ejb/cmp3/EntityManagerSetupImpl, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, javax/persistence/spi/PersistenceUnitInfo, have different Class objects for the type javax/sql/DataSource used in the signature
If you are packaging jars containing javax.sql.* classes and/or javax.persistence.* classes then remove those jars from the application packaging.
When I remove javax/sql/DataSource (i.e. removing jdbc2_0-stdext.jar) from my package I get this warning:
Starting persistence unit persistence.unit:unitName=#Employee-Details
Warning]: 2010.08.19 07:53:57.542--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class ...
Does the persistence unit not have access to the AS library?
I see! I don't have to remove the jdbc2_0-stdext.jar but the javax/persistence folder from the toplink-essentials.jar.
Then I still get the NullPointerException warning. But it seams to be caused by the "temporary UCL3" classloader, not by missing classes. I don't have a clue what this "temporary" classloader is for, but following threads indicate to switch it off:
Summerized, to switch the classloader off, I added two toplink properties to my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<property name="toplink.weaving" value="false"/>
<property name="toplink.logging.level" value="OFF" />
Deployment without errors then !