HQL console always Nullpointers, build 8858

i cannot execute an HQL query.

it always returns this after it seems to do the query. is this a bug, or is it my setup? we're using DB2 as the database. the same query works in the jdbc console.

java.lang.NullPointerException
at com.intellij.hibernate.console.HibernateConsoleMain.printColumnDefinition(HibernateConsoleMain.java:193)
at com.intellij.hibernate.console.HibernateConsoleMain.printColumnDefinition(HibernateConsoleMain.java:201)
at com.intellij.hibernate.console.HibernateConsoleMain.executeQuery(HibernateConsoleMain.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.persistence.database.console.ConsoleBase.tryInvokeMethod(ConsoleBase.java:120)
at com.intellij.persistence.database.console.ConsoleBase.execute(ConsoleBase.java:68)
at com.intellij.persistence.database.console.ConsoleBase.runConsole(ConsoleBase.java:60)
at com.intellij.hibernate.console.HibernateConsoleMain.main(HibernateConsoleMain.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

1 comment
Comment actions Permalink

Trevor,

Seems that

sessionFactory.getClassMetadata(type.getReturnedClass());

returns null for entity or component class.

I've added a fix for this situation.
Please see the next EAP build.

Gregory Shrago


Trevor wrote:

i cannot execute an HQL query.

it always returns this after it seems to do the query. is this a bug, or is it my setup? we're using DB2 as the database. the same query works in the jdbc console.

java.lang.NullPointerException
at com.intellij.hibernate.console.HibernateConsoleMain.printColumnDefinition(HibernateConsoleMain.java:193)
at com.intellij.hibernate.console.HibernateConsoleMain.printColumnDefinition(HibernateConsoleMain.java:201)
at com.intellij.hibernate.console.HibernateConsoleMain.executeQuery(HibernateConsoleMain.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.persistence.database.console.ConsoleBase.tryInvokeMethod(ConsoleBase.java:120)
at com.intellij.persistence.database.console.ConsoleBase.execute(ConsoleBase.java:68)
at com.intellij.persistence.database.console.ConsoleBase.runConsole(ConsoleBase.java:60)
at com.intellij.hibernate.console.HibernateConsoleMain.main(HibernateConsoleMain.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

0

Please sign in to leave a comment.