[jbosstools-issues] [JBoss JIRA] (JBIDE-19830) Nullpointer at recieving schema
Philipp Birkl (JIRA)
issues at jboss.org
Wed May 20 09:09:19 EDT 2015
Philipp Birkl created JBIDE-19830:
-------------------------------------
Summary: Nullpointer at recieving schema
Key: JBIDE-19830
URL: https://issues.jboss.org/browse/JBIDE-19830
Project: Tools (JBoss Tools)
Issue Type: Bug
Affects Versions: LATER
Environment: Hibernate: 5.0.0.Alpha2-v20150417-1452-B12
Eclipse: Eclipse Mars M7
OS: Windows 7 x64 Enterprise
DB: Postgres 9.3
Reporter: Philipp Birkl
While receiving a schema from Database initially a _java.lang.NullPointerException* is thrown_.
!http://imgur.com/2Frtlwu!
Stack trace can be found [here|https://gist.github.com/calaedo/394f3fdb8994741de3ce#file-hibtools_bug_stacktrace-txt].
While debugging the plugin i found the problem at the implementation of the anonymous comperator in _org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(Object, IProgressMonitor)_.
{code}
res = toArray(result.iterator(), Object.class, new Comparator<Object>() {
public int compare(Object arg0, Object arg1) {
return getName(arg0).compareTo(getName(arg1));
}
private String getName(Object o) {
String result = null;
try {
Method m = o.getClass().getMethod("getName", new Class[] {});
m.invoke(o, new Object[] {});
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
});
{code}
The string result is never set. So the _compareTo_ is always failing.
I haven't looked it up, but the problem might consist also in earlier versions of JBoss tools.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jbosstools-issues
mailing list