-->
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: Error when trying to create SessionFactory
PostPosted: Mon Jun 12, 2006 5:35 pm 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
I created a configuration file and console configuration succefully .
I also generated Java code succefully from existing Oracle DB through JDBC.

But when I tried to create a SessionFactory in Hibernate Console. I got following error:

Hibernate version: 3.1.3
Hibernate Tools version: 3.1 beta 5


Mapping documents:

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

java.lang.NullPointerException
at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationFile(ClassLoaderHelper.java:91)
at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationURL(ClassLoaderHelper.java:83)
at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationsURLForResources(ClassLoaderHelper.java:117)
at org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseConsoleConfigurationPreferences.java:81)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:109)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:98)
at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:37)
at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:46)
at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)


Oracle 10g

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 6:37 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what is the exact contents of the console configuraiton classpath ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 6:58 pm 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
max wrote:
what is the exact contents of the console configuraiton classpath ?


e:/oracle/product/10.2.0/db_1/jdbc/lib/ojdbc14.jar
/reverse-engineering
/reverse-engineering/.settinga


I suppost it should be correct. Previously I got some error complaining that some mapping file can not be found. And after add /reverse-engineering, the error is gone.

But this time I got the different error. I can not figure out why.

BTW, my Eclipse version is 3.1.2.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 7:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
try and remove .settinga which i don't get why that is in the classpath.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 7:14 pm 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
max wrote:
try and remove .settinga which i don't get why that is in the classpath.


Unfortunately, it didn't make any difference.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 7:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please put it in jira and will take a look

you are using the latest version, right ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 7:27 pm 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
max wrote:
please put it in jira and will take a look

you are using the latest version, right ? :)


What is jira?

Yes. I am using latest version.

Eclips 3.1.2
Hibernate 3.1.3
Hibernate Tools 3.1 beta 5
Oralcel 10g release 2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 12, 2006 7:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
jira = bug system

http://opensource.atlassian.com/project ... board.jspa

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 13, 2006 11:49 am 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
max wrote:


Ok. I have put it in JIRA. Please let me know if you find out something.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 13, 2006 12:19 pm 
Newbie

Joined: Mon Jun 12, 2006 5:27 pm
Posts: 6
max wrote:


I have put it in JIRA.

Do you know where I can download the whole source code package for Hibernate Tools?


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.