Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1119

NPE in InstrumentationFactory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0-M3
    • kernel
    • None
    • Patch Available

    Description

      As reported in the dev forum [1] InstrumentationFactory.class.getProtectionDomain().getCodeSource() returns null, causing a NPE.

      Caused by: java.lang.NullPointerException
      at org.apache.openjpa.enhance.InstrumentationFactory.getAgentJar(InstrumentationFactory.java:204)
      at org.apache.openjpa.enhance.InstrumentationFactory.access$200(InstrumentationFactory.java:47)
      at org.apache.openjpa.enhance.InstrumentationFactory$1.run(InstrumentationFactory.java:99)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation(InstrumentationFactory.java:87)
      at org.apache.openjpa.enhance.PCEnhancerAgent.loadDynamicAgent(PCEnhancerAgent.java:95)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.loadAgent(PersistenceProviderImpl.java:243)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:91)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:119)
      at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:55)
      at javax.persistence.Persistence.createFactory(Persistence.java:172)
      ... 51 more

      [1] http://n2.nabble.com/Error-loading-agent-with-Openjpa2-td3024299.html

      Attachments

        1. OPENJPA-1119-dwoods.patch
          6 kB
          Donald Woods
        2. OPENJPA-1119.PATCH
          7 kB
          Richard G. Curtis

        Activity

          People

            curtisr7 Richard G. Curtis
            curtisr7 Richard G. Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: