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

Merge fails if an entity has an element collection which is contructed using Arrays.asList

    XMLWordPrintableJSON

Details

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

    Description

      When an entity has an element collection, which is constructed using Arrays.asList, the following exception is thrown:

      java.lang.IllegalAccessError:java.util.Arrays$ArrayList
      at java.lang.ClassLoader.defineClassImpl(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:265)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:202)
      at serp.bytecode.BCClassLoader.findClass(BCClassLoader.java:50)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:609)
      at java.lang.Class.forNameImpl(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at org.apache.openjpa.util.GeneratedClasses.loadBCClass(GeneratedClasses.java:67)
      at org.apache.openjpa.util.ProxyManagerImpl.getFactoryProxyCollection(ProxyManagerImpl.java:363)
      at org.apache.openjpa.util.ProxyManagerImpl.copyCollection(ProxyManagerImpl.java:182)
      at org.apache.openjpa.kernel.AttachStrategy.copyCollection(AttachStrategy.java:344)
      at org.apache.openjpa.kernel.AttachStrategy.attachCollection(AttachStrategy.java:321)
      at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:218)
      at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:153)
      at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:251)
      at org.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:202)
      at org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:153)
      at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:251)
      at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:104)
      at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3322)
      at org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1176)
      at org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:858)

      Attachments

        1. OPENJPA-1352.patch
          2 kB
          Fay Wang

        Activity

          People

            faywang Fay Wang
            faywang Fay Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: