Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

different Class objects for one type, jboss 5.1, jpa/toplink, classloader?

Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I get the following error when I deploy a war to jboss 5.1 server:

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

I tried to isolate the war classes from the server classes by defining a loader-repository at jboss-web.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<class-loading java2ClassLoadingCompliance="false">

The setting BaseClassLoader=jsfsample.war seams not to be correct to me. I mean, restricting the BaseClassLoader cannot lead to something good I assume. But I am new to JBoss and go out from the error message. Anyway the configuration does not take any effect. The error message still appears. Then I tried to proceed with the jboss-classloader.xml:

<?xml version="1.0" encoding="UTF-8"?>
<classloading xmlns="urn:jboss:classloading:1.0"

Again, the same error appears when I deploy the war. As I assumed that the initial error was thrown because the javax/sql/DataSource is already loaded by BaseClassLoader I removed the jdbc2_0-stdext.jar from my war. But then I got the following exeption:

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 ...

Can anyone help? I am totally lost.


Daniel Winz
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 fullfill the two threads, I added two toplink properties to my persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
<persistence-unit name="Employee-Details">
<property name="toplink.weaving" value="false"/>
<property name="toplink.logging.level" value="OFF" />

Deployment without errors then !
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic