java.lang.NullPointerException

Hibernate JIRA | Francois Granade | 1 decade ago
  1. 0

    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:

    Hibernate JIRA | 1 decade ago | Francois Granade
    java.lang.NullPointerException
  2. 0

    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:

    Hibernate JIRA | 1 decade ago | Francois Granade
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    SignChangeEvent Error

    GitHub | 2 years ago | MackySan
    org.bukkit.event.EventException
  5. 0

    Get cell value from mysql by JDBC

    Stack Overflow | 3 years ago | A Polite Boy
    java.lang.NullPointerException

  1. davidvanlaatum 7 times, last 3 months ago
  2. bpbhat77 1 times, last 6 months ago
3 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.util.TreeMap.compare()
  2. Java RT
    TreeMap.get
    1. java.util.TreeMap.compare(TreeMap.java:1093)
    2. java.util.TreeMap.getEntry(TreeMap.java:347)
    3. java.util.TreeMap.get(TreeMap.java:265)
    3 frames
  3. org.hibernate.console
    KnownConfigurations.find
    1. org.hibernate.console.KnownConfigurations.find(KnownConfigurations.java:225)
    1 frame
  4. org.hibernate.eclipse
    DynamicSQLPreviewView$1.partBroughtToTop
    1. org.hibernate.eclipse.console.AbstractQueryEditor.getConsoleConfiguration(AbstractQueryEditor.java:51)
    2. org.hibernate.eclipse.console.views.DynamicSQLPreviewView.updateText(DynamicSQLPreviewView.java:137)
    3. org.hibernate.eclipse.console.views.DynamicSQLPreviewView.setCurrentEditor(DynamicSQLPreviewView.java:130)
    4. org.hibernate.eclipse.console.views.DynamicSQLPreviewView.hookIntoEditor(DynamicSQLPreviewView.java:114)
    5. org.hibernate.eclipse.console.views.DynamicSQLPreviewView.access$2(DynamicSQLPreviewView.java:107)
    6. org.hibernate.eclipse.console.views.DynamicSQLPreviewView$1.partBroughtToTop(DynamicSQLPreviewView.java:92)
    6 frames
  5. Eclipse UI
    PartListenerList2$2.run
    1. org.eclipse.ui.internal.PartListenerList2$2.run(PartListenerList2.java:83)
    1 frame
  6. Eclipse Core
    Platform.run
    1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    2. org.eclipse.core.runtime.Platform.run(Platform.java:843)
    2 frames
  7. Eclipse UI
    WWinPartService$1.partBroughtToTop
    1. org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53)
    2. org.eclipse.ui.internal.PartListenerList2.firePartBroughtToTop(PartListenerList2.java:81)
    3. org.eclipse.ui.internal.PartService.firePartBroughtToTop(PartService.java:90)
    4. org.eclipse.ui.internal.WWinPartService$1.partBroughtToTop(WWinPartService.java:40)
    4 frames