Menu

NullPointerException

Help
flare
2003-08-21
2003-09-11
  • flare

    flare - 2003-08-21

    I'm using Eclipse 2.1.1 + Hibernate 2.0.2 + hibernator 0.9.5 + postgresql 7.3.2 on MacosX 10.2.6-jdk 1.4.1

    I add an xml mapping in the connection view, enter the correct database parameters and got "output location is in source location /xxxxx

    cannot make any a connection, the logfile shows

    !ENTRY org.eclipse.ui 4 4 ago 21, 2003 15:06:21.460
    !MESSAGE Unhandled exception caught in event loop.
    !ENTRY org.eclipse.ui 4 0 ago 21, 2003 15:06:21.464
    !MESSAGE java.lang.NullPointerException
    !STACK 0
    java.lang.NullPointerException
            at java.util.Hashtable.put(Hashtable.java:375)
            at java.util.Properties.setProperty(Properties.java:97)
            at net.sf.hibernator.views.ConnectionSet.save(ConnectionSet.java:71)
            at net.sf.hibernator.views.ConnectionSet.add(ConnectionSet.java:32)
            at net.sf.hibernator.views.ConnectionView.add(ConnectionView.java:204)
            at net.sf.hibernator.views.ConnectionView.access$1(ConnectionView.java:195)
            at net.sf.hibernator.views.ConnectionView$3.run(ConnectionView.java:131)
            at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
            at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
            at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
            at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
            at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
            at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
            at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012)
            at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079)
            at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795)
            at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
            at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
            at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
            at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
            at java.lang.reflect.Method.invoke(Native Method)
            at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
            at org.eclipse.core.launcher.Main.run(Main.java:747)
            at org.eclipse.core.launcher.Main.main(Main.java:583)
            at java.lang.reflect.Method.invoke(Native Method)
            at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
            at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
            at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

     
    • flare

      flare - 2003-08-21

      solved :) now I can see the connection but I keep getting:

      java.lang.IllegalArgumentException: Path must include project and resource name: /xxxxxx
          at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:55)
          at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1442)
          at org.eclipse.core.internal.resources.Container.getFolder(Container.java:129)
          at net.sf.hibernator.HibernateConnection.createConnection(HibernateConnection.java:130)
          at net.sf.hibernator.views.ConnectionView.connect(ConnectionView.java:185)
          at net.sf.hibernator.views.ConnectionView.access$4(ConnectionView.java:180)
          at net.sf.hibernator.views.ConnectionView$6.run(ConnectionView.java:164)
          at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
          at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:456)
          at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionContributionItem.java:403)
          at org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionItem.java:397)
          at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(ActionContributionItem.java:72)
          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
          at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1012)
          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2079)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1795)
          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
          at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
          at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
          at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
          at java.lang.reflect.Method.invoke(Native Method)
          at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
          at org.eclipse.core.launcher.Main.run(Main.java:747)
          at org.eclipse.core.launcher.Main.main(Main.java:583)
          at java.lang.reflect.Method.invoke(Native Method)
          at apple.launcher.LaunchRunner.run(LaunchRunner.java:88)
          at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
          at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)

      what does this mean?

      thanx

       
    • Anonymous

      Anonymous - 2003-09-08

      I have the same problem. What should I do to fix it?

       
      • Anonymous

        Anonymous - 2003-09-08

        I solved! I just added log4j-1.2.8.jar under hibernator plugin directory

         
    • Daniel Bradby

      Daniel Bradby - 2003-09-11

      That NullPointer looks like the dialect is null which is weird?! Maybe the property file is corrupt. Either way I am working in making the validation and error reporting around the connection properties better

      The other error is probably because your source/class files are in your project root directory. I have made the fix in CVS so this will work ... but in the mean time move the sources into a sub dir

      Daniel

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.