• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Error caused by persistence.xml

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I am trying to deploy my web application to WebLogic 11gR1.
I use JPA1.0 + Hibernate 3.3.
When I deploy my web app via WebLogic console.
I ran into this error

id "-1" from server "CarbeionServer-0". Exception is: "java.lang.ClassNotFoundException: org.hibernate.HibernateException: This error c
ould indicate that a component was deployed on a cluster member but not other m
embers of that cluster. Make sure that any component deployed on a server that i
s part of a cluster is also deployed on all other members of that cluster

The error caused by the persistence.xml

<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">

<persistence-unit name="carbeionPU">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.format_sql" value="true"/>
</properties>
</persistence-unit>

</persistence>

Once I define a persistence provider in persistence.xml, I got this error. If I delete it then it works fine.
I have put all hibernate related jar in WEB-INF/lib and set pre-load the classes in WEB-INF-lib in weblogic.xml
Weblogic should be able to load those jar to deal with persistence.xml

Does anyone know how to solve this problem?

Thanks,

Chris
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try putting your related jar files under domain/lib of the domain you are working on in the WLS .

Let's see if that works.
 
Chih-Wei Lee
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks sudipto, it works.
However, when I try to add Spring configuration file, applicationContext.xml.
It said

"HibernateEntityManagerFactory violate class loading constraint"

So far, I have ran into too many problems making Hibernate work with WebLogic.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try finding about this? I mean, do you know cause of this error ?

Chih-Wei Lee wrote:

"HibernateEntityManagerFactory violate class loading constraint"



 
Chih-Wei Lee
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sudipto:
Unfortunately I don't know what causes this error. I think it might be my Spring configuration,
but the same configuration works on Tomcat.
I think the configuration is quite simple and don't know why it just doesn't work on WebLogic.
I have been trying to move a web app from Tomcat to Weblogic during this weekend.
It just doesn't work on WebLogic and so many errors during the deployment. Sometimes, WebLogic just hang there and doesn't tell me what the error is.
I just feel frustrated and decide to stick with Tomcat.
Although it's not a complete application server like WebLogic, but it did gave me the most flexibility to integrate with other frameworks or functions.
If you know the answer, I still appreciate you can tell me. Maybe I will still try it on WebLogic.

Thanks,
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could I have a look at the error log....

After a small research I found out this, go through this and see if this could help..... link

Till then let me see if I could find out anything else.....
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And also.... weblogic is a smart choice
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After a research I found out that this is a known issue that comes while deploying/ redeploying an application with hibernate.
And this needs to be fixed by the vendor of the framework provider.

Keep looking if Oracle releases a patch to fix this.

Hope this helps.
 
The only cure for that is hours of television radiation. And this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic