-->
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.  [ 8 posts ] 
Author Message
 Post subject: java.lang.NullPointerException: <no message>
PostPosted: Mon Sep 17, 2007 6:41 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
I am new to hibernate, and I am using the Hibernate Tools reference guide for version 3.2.0 Beta 10. I have setup using the jTDS SQL Server drivers (since the microsoft provided ones don't seem to work with the tools). During the code generation process it is going along for a while and then I get a null pointer exception stating "<no message>". The stack trace it provided is below.

I setup the config files via the wizards using only required information and leave the rest to utilize default settings.

If there is a log file someplace I can provide, please let me know where it is and how you prefer to have them posted.

Any help is welcomed,

-Creepy

Hibernate version: Hibernate Core 3.2.5.ga
Mapping documents: Used Default settings
Code between sessionFactory.openSession() and session.close(): Didn't get this far

Full stack trace of any exception that occurs:
Code:
java.lang.NullPointerException: <no message>
java.lang.NullPointerException
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.getLocation(CodeGenerationLaunchDelegate.java:286)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.access$0(CodeGenerationLaunchDelegate.java:285)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate$1.execute(CodeGenerationLaunchDelegate.java:232)
   at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
   at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:88)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.runExporters(CodeGenerationLaunchDelegate.java:228)
   at org.hibernate.eclipse.launch.CodeGenerationLaunchDelegate.launch(CodeGenerationLaunchDelegate.java:130)
   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:766)
   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:608)
   at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:899)
   at org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlugin.java:1102)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Name and version of the database you are using: Microsoft SQL Server 2005
The generated SQL (show_sql=true): Couldn't get this far
Debug level Hibernate log excerpt: Do not know how to check


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 18, 2007 3:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm - you should get a warning about the output directory does not exist instead of this nullpointer.

workaround: make sure you point to an existing directory.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 18, 2007 4:32 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
Actually if you are talking about the output directory for the Code Generation configuration then it does.

It is set to \HibernateTest\src which was selected from the browse button. I double checked via the file system and it is there. This is the default folder created by Eclipse when I created the project.

So it must be something else causing this error.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 19, 2007 6:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then it is either template path or reverse engineering xml file that is set to something invalid.

Any way we should error better - plese report it in jira optimally with screenshots of the code generation configuration pages so i can see examples of what values breaks our current checks.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 19, 2007 7:06 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
Well I am new to hiberate, and this community, so please excuse my ignorance.

What is JIRA? How do I access it?

Instead of screen shots isn't there an XML config file I can just upload or paste in to this JIRA? Seems more effective.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 20, 2007 1:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
google hibernate jira, first link: http://opensource.atlassian.com/projects/hibernate/

well screenshots are good because it let me see what users normally tend to forget to tell ;)

the .launch config file is also fine to attach.

The easiest way to get that is to select the "Common" tab on the code generation page and set it to be a shared file and specify a location in your projects from which you can then pick up the .launch file and attach it to the jira.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 20, 2007 9:37 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
When I went in to generate the screen shots, etc it started to work. The only differences are that I have rebooted the computer since the last try, and I changed the common tab from local to shared like you suggested to be able to get the .launch file.

Not sure what really was the issue.

That solves my issue using jTDS, I still cannot use the MS SQL drivers with hiberate yet but that is off topic, and there is already a thread for that, although it appears dead.

Thanks for you help Max.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 4:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
which thread ?

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