]
Ray DeCampo commented on HBX-819:
---------------------------------
I get this error when I run a HQL query from the HQL editor with no configuration selected
in the unlabeled pulldown to the right of the green arrow button.
NullPointerException in simple case with one configuration file and
two console configurations
----------------------------------------------------------------------------------------------
Key: HBX-819
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-819
Project: Hibernate Tools
Issue Type: Bug
Components: consoleconfiguration
Affects Versions: 3.2beta8
Environment: macos, hsqldb
Reporter: Francois Granade
Priority: Minor
I'm having an NullPointerException (See the stack below), I'm not really able to
understand what triggers it (it is not completely reproducible, it seems).
My setup is very simple: just one Java project, one hibernate configuration file, two
console configurations, nothing else. The only thing that's a little special, is that
one of the console configuration is invalid (no driver jar file defined).
I'll try to describe it as precisely as possible:
- I have a very simple HSQLDB server, just out-of-the box. I have created only one table
with: "create table x (a varchar(255), b int)".
- I created an Hibernate configuration file for the HSQLDB database using "File >
New > Others", "Hibernate > Hibernate configuration file"; I
specified "create a console configuration", and I gave a name to the Console
Configuration, but I didn't set any other property (in particular, I did not specify
the .jar file for hsqldb: so it's not a correctly defined console configuration)
- Then I created a second console configuration; That time, in the 'classpath'
section at the bottom, I selected 'add external jar' and added my
'hsqldb.jar'.
- I can now open the HSQL DB correctly in the Hibernate Configuration view, with this
second console configuration (the first one is doing an error, which is normal).
- now, time to time, when I right-click on the definition of my table ('X"), and
select "HQL Editor", I sometimes get the NullPointerException (but not always).
here's the stack trace:
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at java.util.TreeMap.compare(TreeMap.java:1093)
at java.util.TreeMap.getEntry(TreeMap.java:347)
at java.util.TreeMap.get(TreeMap.java:265)
at org.hibernate.console.KnownConfigurations.find(KnownConfigurations.java:225)
at
org.hibernate.eclipse.console.AbstractQueryEditor.getConsoleConfiguration(AbstractQueryEditor.java:51)
at
org.hibernate.eclipse.console.views.DynamicSQLPreviewView.updateText(DynamicSQLPreviewView.java:137)
at
org.hibernate.eclipse.console.views.DynamicSQLPreviewView.setCurrentEditor(DynamicSQLPreviewView.java:130)
at
org.hibernate.eclipse.console.views.DynamicSQLPreviewView.hookIntoEditor(DynamicSQLPreviewView.java:114)
at
org.hibernate.eclipse.console.views.DynamicSQLPreviewView.access$2(DynamicSQLPreviewView.java:107)
at
org.hibernate.eclipse.console.views.DynamicSQLPreviewView$1.partBroughtToTop(DynamicSQLPreviewView.java:92)
at org.eclipse.ui.internal.PartListenerList2$2.run(PartListenerList2.java:83)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)
at
org.eclipse.ui.internal.PartListenerList2.firePartBroughtToTop(PartListenerList2.java:81)
at org.eclipse.ui.internal.PartService.firePartBroughtToTop(PartService.java:90)
at org.eclipse.ui.internal.WWinPartService$1.partBroughtToTop(WWinPartService.java:40)
at org.eclipse.ui.internal.PartListenerList2$2.run(PartListenerList2.java:
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: