Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-19830

Nullpointer at recieving schema

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.Beta1
    • 4.3.0.Alpha2
    • hibernate
    • None

      While receiving a schema from Database initially a java.lang.NullPointerException* is thrown.

      Stack trace can be found here.

      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).

      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;
      				}
      			});
      

      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.

            kaers@redhat.com Koen Aers
            philippbirkl_jira Philipp Birkl (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: