-->
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.  [ 9 posts ] 
Author Message
 Post subject: Hibernate Console perspective does not show anything
PostPosted: Tue Jan 03, 2006 4:27 pm 
Beginner
Beginner

Joined: Tue Dec 28, 2004 11:30 am
Posts: 32
Ive downloaded the latest hibernate tools.

I go and start the wizard and put all the needed resources then i pres finish.
And i dont see anything as a result. Nothing shows up as an error and nothing happens with the console

Am i not doing something ??

I know the wizard result is being created cause if i try to create another one with the same name it tells me that this already exists .
Ok how do i get to these saved Console configs


Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 03, 2006 5:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
look in the Hibernate Console perspective

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 2:47 pm 
Beginner
Beginner

Joined: Tue Dec 28, 2004 11:30 am
Posts: 32
Thank you for the previous tip that did it ,
Now i do have another problem, I get the following error


org.hibernate.MappingException: An association from the table address refers to an unmapped class: org.x.scape.domain.PartyImpl
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1112)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1062)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146)
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.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:24)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

And the class is there although not compiled that shouldnt be a problem right and it doesnt do it to other classes just this one.

It happens when trying to load the sessionFactory


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 8:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the classes needed to be compiled - otherwise hibernate (and hence hibernate tools) cannot load them.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 3:05 pm 
Beginner
Beginner

Joined: Tue Dec 28, 2004 11:30 am
Posts: 32
OK now one more question , the above solved my problem -

I am getting the following error now

ava.lang.UnsupportedClassVersionError: org/domain/PartyImpl (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:101)
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:166)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:115)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)
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:215)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
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.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:24)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:70)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:192)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)


And that is because my java classes are compiled with java 5 and eclipse is using java 1.4.2

Although i changed the jre in the preferences in eclipse to point to the java 5 it looks like it is still trying to use 1.4.2

Any Help >?

With that still the session data shows the following

eclipse.buildId=M20050929-0840
java.version=1.4.2_09
java.vendor=Apple Computer, Inc.
BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US
Framework arguments: -keyring /Users/greg/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws carbon -arch ppc -keyring /Users/xx/.eclipse_keyring -consoleLog -showlocation


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 3:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, if you want to load jdk 1.5 classes you need to run eclipse with jdk 1.5. The console is loading these objects *inside* the eclipse VM - it is not done externally (yet, since it gave serious performance and duplication of large part of the core code base)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 2:59 pm 
Beginner
Beginner

Joined: Tue Dec 28, 2004 11:30 am
Posts: 32
Finally got it to work

Another question writing an HQL as follows :

select party.firstName as fn from PartyImpl as party
where
party.firstName like '%as%'

Returns a result set and everything seems to be fine

But if i run the following query

select party as fn from PartyImpl as party
where
party.firstName like '%as%'

it fails with an exception

org.hibernate.PropertyAccessException : Exception occured inside the
setter of ScapeObject.objectType

PartyImpl implements Party extends ScapeObject


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 07, 2006 3:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
so you have a null pointer in the setter method somewhere in ScapeObject

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 07, 2006 4:11 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
..and this is most likely caused by the reveng not taking nullability of a column into consideration when generating hbm.xml

_________________
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.  [ 9 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.