Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-556

Aries fails to read persistence.xml files larger than 8192 bytes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.2
    • 0.3
    • JPA
    • None

    Description

      Aries fails to read persistence.xml files larger than 8192 bytes. We recognized this bug while we were adding new Entity classes to persistence.xml when we removed enough data so that we were below or equal to 8192 bytes everything went fine.

      This is probably caused by wrong implementation within org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl parse method.

      If one tries to read persistence.xml files larger than 8192 the following exception is thrown:

      13:52:01.492 ERROR [Start Level Event Dispatcher][org.apache.aries.jpa.container:331] There was an error while parsing the persistence descriptor META-INF/openjpa_persistence_product.xml in bundle com.navteq.phoenix.jpa_1.0.0. No persistence units will be managed for this bundle
      org.apache.aries.jpa.container.parsing.PersistenceDescriptorParserException: There was an error parsing META-INF/openjpa_persistence_product.xml in bundle com.navteq.phoenix.jpa_1.0.0
      at org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl.parse(PersistenceDescriptorParserImpl.java:98) ~[org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.parseBundle(PersistenceBundleManager.java:329) [org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.setupManager(PersistenceBundleManager.java:350) [org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.addingBundle(PersistenceBundleManager.java:148) [org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.util.tracker.InternalRecursiveBundleTracker.addingBundle(InternalRecursiveBundleTracker.java:70) [org.apache.aries.util-0.2-incubating.jar:0.2-incubating]
      at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:440) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:159) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.apache.aries.util.tracker.RecursiveBundleTracker.open(RecursiveBundleTracker.java:77) [org.apache.aries.util-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.open(PersistenceBundleManager.java:132) [org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.apache.aries.jpa.container.impl.PersistenceBundleManager.start(PersistenceBundleManager.java:619) [org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at java.security.AccessController.doPrivileged(Native Method) [na:1.6.0_22]
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337) [org.eclipse.osgi_3.6.0.v20100517.jar:na]
      Caused by: java.io.IOException: Resetting to invalid mark
      at java.io.BufferedInputStream.reset(BufferedInputStream.java:416) ~[na:1.6.0_22]
      at org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl.parse(PersistenceDescriptorParserImpl.java:90) ~[org.apache.aries.jpa.container-0.2-incubating.jar:0.2-incubating]
      ... 25 common frames omitted

      Attachments

        Activity

          People

            timothyjward Timothy James Ward
            dschmitz David Schmitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: