4 Replies Latest reply on Mar 31, 2010 3:00 AM by nimo22

    hibernate-console jboss 3.1 npe

    nimo22

      I am using the new Jboss tools 3.1 and all works, but my hibernate-console.properties returns a null-pointer-exception - so I am not able to use the hibernate-console!

       

      this is the error which I get, when clicking the refresh-button in the hibernate-configuration:

       

      java.lang.NullPointerException
      at org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB3ClasspathContainer.getClasspathEntries(EJB3ClasspathContainer.java:105)
      at org.eclipse.jdt.launching.JavaRuntime.computeDefaultContainerEntries(JavaRuntime.java:1115)
      at org.eclipse.jdt.launching.JavaRuntime.computeDefaultContainerEntries(JavaRuntime.java:1097)
      at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspathEntry(JavaRuntime.java:908)
      at org.eclipse.jdt.internal.launching.DefaultEntryResolver.resolveRuntimeClasspathEntry(DefaultEntryResolver.java:38)
      at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspathEntry(JavaRuntime.java:924)
      at org.eclipse.jdt.launching.StandardClasspathProvider.resolveClasspath(StandardClasspathProvider.java:75)
      at org.eclipse.jdt.launching.JavaRuntime.resolveRuntimeClasspath(JavaRuntime.java:1205)
      at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getClasspath(ClassLoaderHelper.java:147)
      at org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseLaunchConsoleConfigurationPreferences.java:95)
      at org.hibernate.console.ConsoleConfiguration.getCustomClassPathURLs(ConsoleConfiguration.java:242)
      at org.hibernate.console.ConsoleConfiguration.createClassLoader(ConsoleConfiguration.java:277)
      at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:316)
      at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:147)
      at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:40)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
      at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
      at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:234)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

       

      However, with my previous jboss tools the hibernate-console.properties works.

       

      What should I do?

        • 1. Re: hibernate-console jboss 3.1 npe
          dgolovin

          Do you have JBoss AS runtime/server  configured in your workspace? What is the JBoss AS version?

          For some reason it cannot fetch what kind of runtime do you have for your project.

          • 2. Re: hibernate-console jboss 3.1 npe
            nimo22

            hello,

             

            I am using jboss as 4.2.2 Is this the matter?

            • 3. Re: hibernate-console jboss 3.1 npe
              maxandersen

              No, the problem looks to be caused by you targeting one runtime before (i.e. "jboss 4.2-runtime") and now that runtime is gone or possibly renamed to something else "jboss 4.2.3-runtime" or similar.

               

              That shouldn't though cause an NPE in GA since we fixed this (or a similar one) a while ago.

               

              Does this happen in GA ? If yes, could you please open a jira issue on it with the stacktrace and attach your .classpath file from the project that is causing problems ?

               

               

              Thank you!

              • 4. Re: hibernate-console jboss 3.1 npe
                nimo22

                gosh, you are right.

                 

                I have had problems with my classpath-entries.

                After installing jboss 3.1ga, I have removed my jboss server and added a new configuration.

                 

                However, the reference to my JbossEJB3-Libraries into my classpath were broken

                and that causes the NPE!

                 

                So I have fixed the reference, and now all works! So I guess, there is no need for a jira-issue?

                 

                Thanks!