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.  [ 5 posts ] 
Author Message
 Post subject: SessionFactory error on console
PostPosted: Tue Sep 12, 2006 8:21 pm 
Newbie

Joined: Thu May 12, 2005 5:54 pm
Posts: 16
Hi

I get the following error when I try to click the session factory + on the tools console

I am using jboss 2.0 Alpha bundle for windows which has hibernate tools 3 beta6 plugins.

I get ClassCastException when I try to get the session Factory.

Code:
java.lang.ClassCastException: org.hibernate.type.StringType
   at org.hibernate.tuple.PropertyFactory.buildVersionProperty(PropertyFactory.java:84)
   at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:156)
   at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418)
   at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
   at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
   at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
   at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260)
   at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:20)
   at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:67)
   at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:73)
   at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)



I have the classes in my output path. /bin folder.

Any help is appreciated,

Thanks,.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 13, 2006 2:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i've found some bugs with respect to the classloader isolation in the plugin :( this is probably causing this one.

does it happen always ? e.g. does it help to restart ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Having a similar problem
PostPosted: Tue Sep 19, 2006 7:37 pm 
Newbie

Joined: Wed Dec 17, 2003 2:17 am
Posts: 3
Location: Sacramento, CA
My hibernate.cfg.xml connects via oracle to a database with hundreds of schemas. When I select Configuration it sees my mapped items just fine but when I try and expand Session Factory I get:

SessionFactory error: entity class not found.

Is this related?

Thanks,

Wayne

_________________
Wayne Lund
Architect


Top
 Profile  
 
 Post subject: Having a similar problem
PostPosted: Tue Sep 19, 2006 7:49 pm 
Newbie

Joined: Wed Dec 17, 2003 2:17 am
Posts: 3
Location: Sacramento, CA
My hibernate.cfg.xml connects via oracle to a database with hundreds of schemas. When I select Configuration it sees my mapped items just fine but when I try and expand Session Factory I get:

SessionFactory error: entity class not found.

Is this related?

Thanks,

Wayne

_________________
Wayne Lund
Architect


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 20, 2006 1:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
don't think so. your errror just sounds like you havent added the class path to the console configuraton classpath and/or your classes haven't been build yet.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.