OpenJPA
  1. OpenJPA
  2. OPENJPA-993

PCEnhancer can't execute if a non-OpenJPA PU is found

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1
    • Fix Version/s: 1.3.0, 2.0.0-beta
    • Component/s: kernel
    • Labels:
      None

      Description

      The PCEnhancer blows up if you have a non-OpenJPA persistence provider defined and available on the classpath. This makes comparisons between providers more than a little unfriendly.

      Example stack :

      204 OpenJPAPU INFO [main] openjpa.Tool - No targets were given. Running on all classes in your persistent classes list, or all metadata files in classpath directories if you have not listed your persistent classes. Use -help to display tool usage information.
      Exception in thread "main" java.util.MissingResourceException: org.apache.openjpa.persistence.PersistenceProductDerivation:java.util.MissingResourceException: Persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" specified in persistence unit "EclipseLinkPU" in "META-INF/persistence.xml" is not a recognized provider.
      at org.apache.openjpa.lib.conf.ProductDerivations.reportErrors(ProductDerivations.java:365)
      at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:270)
      at org.apache.openjpa.lib.conf.Configurations.populateConfiguration(Configurations.java:344)
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4439)
      at org.apache.openjpa.enhance.PCEnhancer$1.run(PCEnhancer.java:4410)
      at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:708)
      at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:698)
      at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4405)
      at org.apache.openjpa.enhance.PCEnhancer.main(PCEnhancer.java:4396)
      Caused by: java.util.MissingResourceException: Persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" specified in persistence unit "EclipseLinkPU" in "META-INF/persistence.xml" is not a recognized provider.
      at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:339)
      at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:185)
      at org.apache.openjpa.lib.conf.ProductDerivations.load(ProductDerivations.java:261)
      ... 7 more

        Activity

        Hide
        Rick Curtis added a comment -

        Attaching a patch to look at later when I have more time.

        Show
        Rick Curtis added a comment - Attaching a patch to look at later when I have more time.
        Hide
        Rick Curtis added a comment -

        Committed changes to 1.3 and trunk.

        Show
        Rick Curtis added a comment - Committed changes to 1.3 and trunk.
        Hide
        Xiaoqin Feng added a comment -

        I am on vacation from 12/20/2009  to 12/26/2009.

        If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu.

        For emergency, contact me at 925-209-5517.

        Show
        Xiaoqin Feng added a comment - I am on vacation from 12/20/2009  to 12/26/2009. If you have any question on deployment and JEE bugs, please contact Saurabh Arora or my manager Maruthi Nuthikattu. For emergency, contact me at 925-209-5517.

          People

          • Assignee:
            Michael Dick
            Reporter:
            Michael Dick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development