Announcement Announcement Module
Collapse
No announcement yet.
Upgraded from STS 2.8.1 to STS 2.9.0 getting JPA project facet error. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgraded from STS 2.8.1 to STS 2.9.0 getting JPA project facet error.

    Marker shows "This project has the JPA facet, but no JPA project could be created. See the error log for details."

    I was able to create a project with Roo using JPA and eclipseLink just fine, which is how I created the project that is now failing.


    First question, "error log" where would I find that?

    Second question how to fix this?

  • #2
    Additional info, Created a New->JPA project and selected the eclipseLink user library....same marker exactly on the new project.

    This is a fresh install of STS 2.9.0 RELEASE on Win 7 64bit JDK 1.6.0_27

    Comment


    • #3
      Hey!

      You can find the error log when opening the "Error Log" view on your STS installation. Its a view within Eclipse and there you should find more information about what is going wrong (maybe a stack trace or so). So please take a look at that view and post the information here for deeper analysis.

      Thanks,
      -Martin

      Comment


      • #4
        Error Log

        Martin,
        Here is the Session Data

        Code:
        eclipse.buildId=2.9.0.201203011000-RELEASE
        java.version=1.6.0_27
        java.vendor=Sun Microsystems Inc.
        BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
        Framework arguments:  -product com.springsource.sts.ide
        Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product com.springsource.sts.ide
        
        This is a continuation of log file C:\Users\Ollie\Documents\workspace-sts-2.9.0.RELEASE\.metadata\.bak_2.log
        Created Time: 2012-03-16 08:54:08.454
        Here is the Error Log

        Code:
        org.osgi.framework.BundleException: Exception in org.eclipse.jpt.jpa.core.JptJpaCorePlugin.stop() of bundle org.eclipse.jpt.jpa.core.
        	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:791)
        	at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510)
        	at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:565)
        	at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1161)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:595)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:257)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:215)
        	at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:284)
        	at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:691)
        	at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:598)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:390)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:198)
        	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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
        Caused by: java.lang.IllegalStateException: Not started.
        	at org.eclipse.jpt.common.utility.internal.ConsumerThreadCoordinator.stop(ConsumerThreadCoordinator.java:134)
        	at org.eclipse.jpt.common.utility.internal.AsynchronousCommandExecutor.stop(AsynchronousCommandExecutor.java:127)
        	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager.stop_(GenericJpaProjectManager.java:265)
        	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager.stop(GenericJpaProjectManager.java:254)
        	at org.eclipse.jpt.jpa.core.JptJpaCorePlugin.stop(JptJpaCorePlugin.java:770)
        	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764)
        	... 19 more
        Root exception:
        java.lang.IllegalStateException: Not started.
        	at org.eclipse.jpt.common.utility.internal.ConsumerThreadCoordinator.stop(ConsumerThreadCoordinator.java:134)
        	at org.eclipse.jpt.common.utility.internal.AsynchronousCommandExecutor.stop(AsynchronousCommandExecutor.java:127)
        	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager.stop_(GenericJpaProjectManager.java:265)
        	at org.eclipse.jpt.jpa.core.GenericJpaProjectManager.stop(GenericJpaProjectManager.java:254)
        	at org.eclipse.jpt.jpa.core.JptJpaCorePlugin.stop(JptJpaCorePlugin.java:770)
        	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771)
        	at java.security.AccessController.doPrivileged(Native Method)
        	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764)
        	at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510)
        	at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:565)
        	at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1161)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:595)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:257)
        	at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:215)
        	at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:284)
        	at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:691)
        	at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:598)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:390)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:198)
        	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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
        	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
        	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
        	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

        Comment


        • #5
          Hey!

          Thanks for the details from the error log. I filed a bug for the Eclipse JPT/JPA tooling:
          https://bugs.eclipse.org/bugs/show_bug.cgi?id=374638

          Hope to get some feedback there.

          -Martin

          Comment


          • #6
            I noticed An internal error occurred during: "Initializing Java Tooling".
            java.lang.NullPointerException that may be related to this error, nothing new in the logs and the logs were NOT at shutdown as mentioned in the Jira entry.

            Comment


            • #7
              The "Initializing Java Tooling" error is an infamous Eclipse catch-all for any error that might pop up on startup. Could be anything from a bug in the code or a workspace with corrupted/inconsistent state. Can you post the stack trace for that entry? It would give us an idea if there's a problem with STS startup or we could compare it against similar bugs filed at Eclipse.

              Comment


              • #8
                resolved fixed

                Originally posted by Martin Lippert View Post
                Hey!

                Thanks for the details from the error log. I filed a bug for the Eclipse JPT/JPA tooling:
                https://bugs.eclipse.org/bugs/show_bug.cgi?id=374638

                Hope to get some feedback there.

                -Martin
                Well Martin, it says it is resolved/fixed....but that was 3.0 and I am on 3.1 and just upgraded to 3.2 and the problem remains.

                It looks like Spring Roo doesn't use facets although it does use JPA 2.0

                When importing it looks like it sets facets on. When I use Roo to generate a project and jpa setup that works.

                So it looks like it has to do with JPA implementation library not being setup for the facet to use it and spring Roo doesn't use facets.

                Comment


                • #9
                  Hello Mike

                  To clarify, are you seeing this issue when you're generating Roo projects within STS, or is this happening when you have a command line Roo project that you then import into STS?

                  Comment 4 on bug 374638 says that the error message has been updated to mention the name of the missing JPA platform. Do you have the information in your error message?

                  Comment


                  • #10
                    only on a Roo project imported into STS.

                    Originally posted by ldossantos View Post
                    Hello Mike

                    To clarify, are you seeing this issue when you're generating Roo projects within STS, or is this happening when you have a command line Roo project that you then import into STS?

                    Comment 4 on bug 374638 says that the error message has been updated to mention the name of the missing JPA platform. Do you have the information in your error message?
                    It is only on a Roo project imported into STS.

                    Mike

                    Comment


                    • #11
                      Here is the error details...

                      eclipse.buildId=3.2.0.201303060821-RELEASE-e38
                      java.version=1.6.0_27
                      java.vendor=Sun Microsystems Inc.
                      BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
                      Framework arguments: -product org.springsource.sts.ide
                      Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide

                      This is a continuation of log file C:\Users\Ollie\Documents\workspace-sts-3.2.0.RELEASE\.metadata\.bak_0.log
                      Created Time: 2013-03-29 12:03:11.609

                      Error
                      Fri Mar 29 12:05:33 CST 2013
                      An internal error occurred during: "JPA Facet File Change Event Handler".

                      java.lang.IllegalArgumentException: Project does not have a recognized JPA platform: hibernate2_0
                      at org.eclipse.jpt.jpa.core.internal.platform.JpaPlat formManagerImpl.buildJpaPlatformImplementation(Jpa PlatformManagerImpl.java:234)
                      at org.eclipse.jpt.jpa.core.internal.InternalJpaProje ctManager.buildJpaProjectConfig(InternalJpaProject Manager.java:629)
                      at org.eclipse.jpt.jpa.core.internal.InternalJpaProje ctManager.buildJpaProject(InternalJpaProjectManage r.java:603)
                      at org.eclipse.jpt.jpa.core.internal.InternalJpaProje ctManager.addJpaProject(InternalJpaProjectManager. java:584)
                      at org.eclipse.jpt.jpa.core.internal.InternalJpaProje ctManager.checkForJpaFacetTransition_(InternalJpaP rojectManager.java:762)
                      at org.eclipse.jpt.jpa.core.internal.InternalJpaProje ctManager$FacetFileChangeEventHandlerCommand.execu te(InternalJpaProjectManager.java:752)
                      at org.eclipse.jpt.common.core.internal.utility.comma nd.CommandJobCommandAdapter.execute(CommandJobComm andAdapter.java:39)
                      at org.eclipse.jpt.common.core.internal.utility.comma nd.JobCommandJob.run(JobCommandJob.java:42)
                      at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)
                      I tried unchecking the JPA 2.0 facet, save, restart and I got a whole lot more markers and when I rececked the JPA 2.0 facet the problems all didn't go away so I reverted.

                      The application seems to run fine despite the error.

                      Comment


                      • #12
                        Thanks for the details Mike. I've been away but I have a chance to look into this on Monday. All I need is a project that does "jpa setup", right?

                        Comment


                        • #13
                          Oh and the Error Log shows...

                          Project does not have a recognized JPA platform: hibernate2_0

                          Comment


                          • #14
                            Mike, do you have JBossTools installed into STS? There are some reports that JBossTools 3.3 Hibernate provider is incompatible with the Eclipse 3.8/4.2 (and STS 3.x). If that's the case, then you'll probably need to update to JBossTools 4.

                            https://bugs.eclipse.org/bugs/show_bug.cgi?id=380254
                            https://community.jboss.org/thread/200051
                            Last edited by ldossantos; Apr 1st, 2013, 02:18 PM.

                            Comment


                            • #15
                              I just wanted to add a note to this discussion even though I'm a little late to it.

                              You might see the following in your Error Log view:

                              Project does not have a recognized JPA platform: hibernate2_0
                              and wonder which project is causing this because, despite the suggestion offered by Leo Dos Santos in a followup in this thread, you may never have had JBoss Tools installed. If you are like me, you clone projects from any number of sources (most commonly GitHub these days) to study them in order to get a better idea of how to use a particular technology or perhaps to contribute. In doing so, you are likely to inherit some baggage (a.k.a., problems) which you don't completely understand or are not initially aware of.

                              One of them is the above-mentioned error. If you suddenly start seeing this message in your error log, it's because you do indeed have a project in your workspace which was created in an IDE which had JBoss Tools installed, and which used the "hibernate2_0" JPA platform. It wasn't your IDE that did this: you inherited those settings by cloning a project repository and importing it.

                              Unfortunately, the message doesn't tell you which project the problem occurs in. And because some time may have elapsed from when you imported the project until the time you discovered this message in your error log, you'll have no clue. At least that's what has happened to me on a number of occasions. If you have lots of projects in your workspace (I do), you'll be hard-pressed to figure out which one is the offender.

                              The way to resolve this is to do a workspace-wide search in the .prefs files, namely org.eclipse.jpt.core.prefs files found in the .settings folder of each project, for "hibernate2_0".

                              Here's a snapshot of the search dialog:

                              Attachment

                              When you get the results, note which project is involved. Then in STS, select the project, open its "Properties" dialog and do the following:

                              1. Project Facets: unselect JPA if selected, and "Apply".
                              2. Project Facets: select JPA, and if necessary, specify the runtime. Then follow the "Further configuration available..." link in the dialog in order to set up the platform and implementation.
                              3. Press "OK" when done.

                              Do this for every project you noted in the search for "hibernate2_0" above.
                              Attached Files

                              Comment

                              Working...
                              X