-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ClassCastException on Weblogic 10r3 (Weblogic problem)
PostPosted: Fri Oct 23, 2009 10:38 am 
Newbie

Joined: Fri Oct 23, 2009 10:16 am
Posts: 1
Hi all,

The following stacktrace is not a problem with Hibernate, but with weblogic 10Gr3 using hibernate 3.2.6. It screams classpath/class loader issue to me and I have tried everything I can think of.

I am deploying an EAR that contains one WAR.

As the link http://forum.springsource.org/archive/i ... 26594.html suggests, I have checked to make sure there is only one hibernate jar in the classpath. Weblogic can't find the hibernate classes if I remove it from my app.ear/app.war/WEB-INF/lib. I have tried putting the hibernate JAR in
<domain name>/lib in my weblogic domain directory and that doesn't help. There is nothing on the Weblogic OTN user groups discussing this error (you need to pay extra above the weblogic licensing fee to post there).

Adding org.hibernate.* to prefer-application-packages of the weblogic-application descriptor doesn't help.

If anyone has seen anything like this with Weblogic and has any suggestions I'd love to hear them.

]] Root cause of ServletException.
java.lang.ExceptionInInitializerError.
.
.
at org.restlet.Application.start(Application.java:489)
at com.noelios.restlet.ext.servlet.ServerServlet.init(ServerServlet.java:820)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:235)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
java.lang.ClassCastException: org.hibernate.dialect.Oracle10gDialect cannot be cast to org.hibernate.dialect.Dialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:78)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2073)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1298)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)


Top
 Profile  
 
 Post subject: Re: ClassCastException on Weblogic 10r3 (Weblogic problem)
PostPosted: Tue Jun 21, 2011 4:18 am 
Newbie

Joined: Sun Jun 05, 2011 1:49 pm
Posts: 3
Hi Awhelan,

I'm also facing the same issue, were you able yo resolve the issue?

thanks,
Vikram


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.