-->
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.  [ 10 posts ] 
Author Message
 Post subject: ClassCast Exception while using Hibernate3 inside jboss
PostPosted: Tue Sep 07, 2004 4:30 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
Hibernate version:
Hibernate 3.0 alpha

Mapping documents:
none

Code between sessionFactory.openSession() and session.close():
none

Full stack trace of any exception that occurs:
ClassCast caused by built-in hibernate of jboss40

09:34:59,312 ERROR [LogInterceptor] EJBException in method: public abstract void javax.ejb.EJBObject.remove() throws jav
a.rmi.RemoteException,javax.ejb.RemoveException, causedBy:
java.lang.ClassCastException: net.sf.hibernate.impl.SessionFactoryImpl
at base._BaseRootDAO.initialize(_BaseRootDAO.java:56)
at base._BaseRootDAO.initialize(_BaseRootDAO.java:42)
at ejb.TicketHistoryBcBean.ejbCreate(TicketHistoryBcBean.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb.StatelessSessionEnterpriseContext.<init>(StatelessSessionEnterpriseContext.java:63)
at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:35)
at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:146)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:80)

at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:859)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:236)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:775)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:382)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)

Name and version of the database you are using:
Postgresql 8.0
Debug level Hibernate log excerpt:

I'm getting this ClassCastExpception while accessing my EJB. I'm using the new SessionFactory inside the BaseRootDAO.
So my question is if there is a possbillity to exchange the jboss-hibernate.jar and the hibernate2.jar inside the lib directory of jboss. If I remove the hibernate2.jar and replace it with the hibernate3.jar then the classes inside of the jboss-hibernate.jar are complaining about missing hibernate classes. (NoClassDef found)
So is there a way to get my hand on these classes. I searched the your cvs but wasn't lucky to find them. Or are these inside the jboss cvs ?

best regards

Olaf

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 5:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
package names changed. Hibernate3 is not a drop-in replacement for Hibernate 2.x


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 6:24 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
I already thought that the refactoring of the package name is the cause. Is there already a schedule when an early Hibernate3 stage can be used with jboss ? IMHO Hibernate3 has some outstanding improvements inside I'd like to use, so I started to migrate the existing Hibernate2.X code. Ok for a prototype I can create a tomcat version.
I guess that a RC version of Hibernate3 supporting JBoss will be available next year or am I wrong ?
best regards and thx for the quick answer

Olaf

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 6:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
It will be available before that I hope! Otherwise sack me as the project leader...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 8:02 am 
Senior
Senior

Joined: Fri May 14, 2004 9:37 am
Posts: 122
Location: Cologne, Germany
I don't like blaming someone else then myself. ;) Just code faster :D
don't take this post to serious.

_________________
regards

Olaf

vote if it helped


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 08, 2004 10:09 am 
Newbie

Joined: Fri Sep 17, 2004 3:07 pm
Posts: 14
Any news on Hibernate 3 JBoss support, or doc tips for
JBoss JMX integration ? Trying to evaluate 3.0alpha on JBoss 3.2.3, getting the same "No ClassLoaders found for: net.sf.hibernate.jmx.HibernateService" problem as described in

http://forum.hibernate.org/viewtopic.php?t=934705

Is it only a package renaming thingy (what, then, is the new pkg name), or something more fundamental...

//markku


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 08, 2004 10:30 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Not supported at the moment, try again in 6 weeks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 17, 2005 6:46 am 
Newbie

Joined: Fri Sep 17, 2004 3:07 pm
Posts: 14
I'm back (now after six weeks :).

Is it possible to use JBoss 3(.2.5) JTA and/or JMX configuration with 3.0b1? Some documentation, discussion threads or other clues ? (The TODO seems unchanged in the ref. manual...)

Using c3po & temporary workarounds, running into JTA glitches, so proper integration would be real nice...

(I know, it's a beta, but...)

//markku


Top
 Profile  
 
 Post subject: Beta 2 Jboss JMX & JDBC OK
PostPosted: Fri Feb 04, 2005 4:30 am 
Newbie

Joined: Fri Sep 17, 2004 3:07 pm
Posts: 14
Ok, so JMX and DataSources do work in beta2.

//markku


Top
 Profile  
 
 Post subject: For Makku
PostPosted: Tue Oct 18, 2005 12:20 pm 
Beginner
Beginner

Joined: Mon Apr 18, 2005 10:25 am
Posts: 38
Location: Maryland
I am running into some crazy issues with JTA using Jboss 4.2.0 and hibernate 3. I can't use getCurrentSession b/c I am not getting a transaction in the source code (it appears). How did you setup your JTA?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.