OpenJPA
  1. OpenJPA
  2. OPENJPA-367

PCEnhancer does not find meta data for entities using pure XML annotation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.1, 1.0.2, 1.1.0
    • Component/s: kernel
    • Labels:
      None
    • Environment:
      All platforms

      Description

      When an entity is defined using pure XML (i.e. no annotation in the entity class), the enhancer does not recognized the meta data and no enhancing will take place: E.g.

      -----------------------------------------
      C:\temp\test>runPcEnhancer.bat

      C:\temp\test>java -cp C:\temp\test\;C:\temp\test\openjpa-1.1.0-SNAPSHOT.jar;C:\temp\test\utils.jar;C:\temp\test\geronimo-jpa_3.0_spec-1.0.jar;C:\temp\test\geronimo-jta_1.1_spec-1.1.jar org.apache.openjpa.enhance.PCEnhancer
      15 EntityUnit_JSE TRACE [main] openjpa.Runtime - Setting the following properties from "file:/C:/temp/test/META-INF/persistence.xml" into configuration:

      {openjpa.Id=EntityUnit_JSE, openjpa.Log=DefaultLevel=TRACE, openjpa.MetaDataFactory=jpa(Resources=META-INF/jpamappings.xml, Types=test.XMLDatatypeSupportTestEntity)}
      31 EntityUnit_JSE TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
      47 EntityUnit_JSE 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.
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scanning resource "META-INF/jpamappings.xml" for persistent types.
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scan of "META-INF/jpamappings.xml" found persistent types [Ljava.lang.String;@3a183a18.
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - Mapping resource location "file:/C:/temp/test/META-INF/jpamappings.xml" to persistent types "[test.XMLDatatypeSupportTestEntity]".
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - parsePersistentTypeNames() found [test.XMLDatatypeSupportTestEntity].
      62 EntityUnit_JSE TRACE [main] openjpa.MetaData - Found 1 classes with metadata in 15 milliseconds.
      62 EntityUnit_JSE TRACE [main] openjpa.Tool - Enhancer running on type "test.XMLDatatypeSupportTestEntity".
      93 EntityUnit_JSE TRACE [main] openjpa.MetaData - Loading metadata for "class test.XMLDatatypeSupportTestEntity" under mode "[META]".
      125 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing resource "file:/C:/temp/test/META-INF/jpamappings.xml".
      156 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing class "test.XMLDatatypeSupportTestEntity".
      172 EntityUnit_JSE TRACE [main] openjpa.MetaData - Generating default metadata for type "test.XMLDatatypeSupportTestEntity".
      172 EntityUnit_JSE TRACE [main] openjpa.MetaData - Using reflection for metadata generation.
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing class "test.XMLDatatypeSupportTestEntity".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing package "test.XMLDatatypeSupportTestEntity".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Finished parsing metadata resource "file:/C:/temp/test/META-INF/jpamappings.xml".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing class "test.XMLDatatypeSupportTestEntity".
      187 EntityUnit_JSE TRACE [main] openjpa.Enhance - Enhancing type "class test.XMLDatatypeSupportTestEntity".
      203 EntityUnit_JSE WARN [main] openjpa.Enhance - Type "class test.XMLDatatypeSupportTestEntity" has no metadata; enhancing as persistence aware. If you intended for "class test.XMLDatatypeSupportTestEntity" to be persistence-capable, then this means that OpenJPA could not find any metadata for "class test.XMLDatatypeSupportTestEntity". This can happen if the directory containing your metadata is not in your CLASSPATH, or if your metadata files are not named properly. See the documentation on metadata placement for more information.
      203 EntityUnit_JSE TRACE [main] openjpa.Tool - The class does not have metadata - enhanced as persistence-aware.
      -----------------------------------------

      However if the target is specified, the enhancement will occur, E.g.

      -----------------------------------------
      C:\temp\test>runPcEnhancer.bat test.XMLDatatypeSupportTestEntity

      C:\temp\test>java -cp C:\temp\test\;C:\temp\test\openjpa-1.1.0-SNAPSHOT.jar;C:\temp\test\utils.jar;C:\temp\test\geronimo-jpa_3.0_spec-1.0.jar;C:\temp\test\geronimo-jta_1.1_spec-1.1.jar org.apache.openjpa.enhance.PCEnhancer test.XMLDatatypeSupportTestEntity
      15 EntityUnit_JSE TRACE [main] openjpa.Runtime - Setting the following properties from "file:/C:/temp/test/META-INF/persistence.xml" into configuration: {openjpa.Id=EntityUnit_JSE, openjpa.Log=DefaultLevel=TRACE, openjpa.MetaDataFactory=jpa(Resources=META-INF/jpamappings.xml, Types=test.XMLDatatypeSupportTestEntity)}

      47 EntityUnit_JSE TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
      78 EntityUnit_JSE TRACE [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance.
      94 EntityUnit_JSE TRACE [main] openjpa.Tool - Enhancer running on type "class test.XMLDatatypeSupportTestEntity".
      125 EntityUnit_JSE TRACE [main] openjpa.MetaData - Loading metadata for "class test.XMLDatatypeSupportTestEntity" under mode "[META]".
      125 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scanning resource "META-INF/jpamappings.xml" for persistent types.
      125 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scan of "META-INF/jpamappings.xml" found persistent types [Ljava.lang.String;@20962096.
      140 EntityUnit_JSE TRACE [main] openjpa.MetaData - Mapping resource location "file:/C:/temp/test/META-INF/jpamappings.xml" to persistent types "[test.XMLDatatypeSupportTestEntity]".
      140 EntityUnit_JSE TRACE [main] openjpa.MetaData - Scanning resource "META-INF/orm.xml" for persistent types.
      140 EntityUnit_JSE TRACE [main] openjpa.MetaData - parsePersistentTypeNames() found [test.XMLDatatypeSupportTestEntity].
      140 EntityUnit_JSE TRACE [main] openjpa.MetaData - Found 1 classes with metadata in 15 milliseconds.
      156 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing resource "file:/C:/temp/test/META-INF/jpamappings.xml".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing class "test.XMLDatatypeSupportTestEntity".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Generating default metadata for type "test.XMLDatatypeSupportTestEntity".
      187 EntityUnit_JSE TRACE [main] openjpa.MetaData - Using reflection for metadata generation.
      203 EntityUnit_JSE TRACE [main] openjpa.MetaData - Parsing class "test.XMLDatatypeSupportTestEntity".
      219 EntityUnit_JSE TRACE [main] openjpa.MetaData - Finished parsing metadata resource "file:/C:/temp/test/META-INF/jpamappings.xml".
      219 EntityUnit_JSE TRACE [main] openjpa.MetaData - Set persistence-capable superclass of "test.XMLDatatypeSupportTestEntity" to "null".
      219 EntityUnit_JSE TRACE [main] openjpa.MetaData - Resolving metadata for "test.XMLDatatypeSupportTestEntity@1259490066".
      219 EntityUnit_JSE TRACE [main] openjpa.MetaData - Resolving field "test.XMLDatatypeSupportTestEntity@1259490066.byteAttrDefault".
      219 EntityUnit_JSE TRACE [main] openjpa.MetaData - Resolving field "test.XMLDatatypeSupportTestEntity@1259490066.id".
      250 EntityUnit_JSE TRACE [main] openjpa.MetaData - Preparing mapping for "test.XMLDatatypeSupportTestEntity".
      250 EntityUnit_JSE TRACE [main] openjpa.MetaData - Resolving mapping for "test.XMLDatatypeSupportTestEntity@1259490066".
      250 EntityUnit_JSE TRACE [main] openjpa.Enhance - Enhancing type "class test.XMLDatatypeSupportTestEntity".
      312 EntityUnit_JSE TRACE [main] openjpa.MetaData - Clearing metadata repository "org.apache.openjpa.meta.MetaDataRepository@518c518c".
      -----------------------------------------

      1. OPENJPA-367.patch
        0.7 kB
        Albert Lee
      2. OPENJPA-367.test.jar
        3.54 MB
        Albert Lee

        Issue Links

          Activity

          Hide
          Albert Lee added a comment -

          Attached jar contains all the artifacts to reproduce the problem.

          • unzip the jar to c:\temp
          • run tests with
            runPcEnhancer.bat
            or
            runPcEnhancer.bat test.XMLDatatypeSupportTestEntity
          Show
          Albert Lee added a comment - Attached jar contains all the artifacts to reproduce the problem. unzip the jar to c:\temp run tests with runPcEnhancer.bat or runPcEnhancer.bat test.XMLDatatypeSupportTestEntity
          Hide
          Albert Lee added a comment -

          From initial investigation, here is the call stack that shows the call path to CFMetaDataParser.classForName()

          CFMetaDataParser.classForName(String, String, boolean, ClassLoader) line: 307
          XMLPersistenceMetaDataParser(CFMetaDataParser).classForName(String, boolean) line: 285
          XMLPersistenceMetaDataParser.classForName(String) line: 1679
          XMLPersistenceMetaDataParser.startClass(String, Attributes) line: 727
          XMLPersistenceMetaDataParser(CFMetaDataParser).startElement(String, Attributes) line: 108
          XMLPersistenceMetaDataParser(XMLMetaDataParser).startElement(String, String, String, Attributes) line: 432
          SAXParserImpl$JAXPSAXParser(AbstractSAXParser).startElement(QName, XMLAttributes, Augmentations) line: not available
          XMLSchemaValidator.startElement(QName, XMLAttributes, Augmentations) line: not available
          XMLNSDocumentScannerImpl.scanStartElement() line: not available
          XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available
          XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available
          XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available
          XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available
          SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available
          SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available
          SAXParserImpl.parse(InputSource, DefaultHandler) line: not available
          XMLPersistenceMetaDataParser(XMLMetaDataParser).parseNewResource(Reader, String) line: 376
          XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(MetaDataIterator, boolean) line: 318
          XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(MetaDataIterator) line: 295
          XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(URL) line: 268
          PersistenceMetaDataFactory.parseXML(URL, Class, int, ClassLoader) line: 247
          PersistenceMetaDataFactory.load(Class, int, ClassLoader) line: 198
          MetaDataRepository.getMetaDataInternal(Class, ClassLoader) line: 470
          MetaDataRepository.getMetaData(Class, ClassLoader, boolean) line: 290
          PCEnhancer.<init>(OpenJPAConfiguration, BCClass, MetaDataRepository, ClassLoader) line: 242
          PCEnhancer.run(OpenJPAConfiguration, String[], PCEnhancer$Flags, MetaDataRepository, BytecodeWriter, ClassLoader) line: 4349
          PCEnhancer.run(OpenJPAConfiguration, String[], Options) line: 4296
          PCEnhancer.main(String[]) line: 4268

          In the failing case, serp.Strings.toClass() method returns a different Class object from the Class object used by the MetaDataRepository, as a result, the look up of the meta data from the MetaDataRepository._meta map will not find the meta data, even there is one in the _meta map with a different Class object key.

          If a target is passed to the enhencer, serp.Strings.toClass() returns the same Class object, hence the look up in the MetaDataRepository succeeded.

          This implies serp returns a entity Class object using a different classloader. From what I notice, both calls (pass & fail cases) to the serp.Strings.toClass() method uses the same TemporaryClassLoader.

          Since I have no access to the Serp code, I don't know what Serp does and what is the difference that cause the failure.

          I am looking for someone who can shred some light into this problem.

          Thanks.
          Albert Lee.

          Show
          Albert Lee added a comment - From initial investigation, here is the call stack that shows the call path to CFMetaDataParser.classForName() CFMetaDataParser.classForName(String, String, boolean, ClassLoader) line: 307 XMLPersistenceMetaDataParser(CFMetaDataParser).classForName(String, boolean) line: 285 XMLPersistenceMetaDataParser.classForName(String) line: 1679 XMLPersistenceMetaDataParser.startClass(String, Attributes) line: 727 XMLPersistenceMetaDataParser(CFMetaDataParser).startElement(String, Attributes) line: 108 XMLPersistenceMetaDataParser(XMLMetaDataParser).startElement(String, String, String, Attributes) line: 432 SAXParserImpl$JAXPSAXParser(AbstractSAXParser).startElement(QName, XMLAttributes, Augmentations) line: not available XMLSchemaValidator.startElement(QName, XMLAttributes, Augmentations) line: not available XMLNSDocumentScannerImpl.scanStartElement() line: not available XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean) line: not available XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) line: not available XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not available SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: not available SAXParserImpl.parse(InputSource, DefaultHandler) line: not available XMLPersistenceMetaDataParser(XMLMetaDataParser).parseNewResource(Reader, String) line: 376 XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(MetaDataIterator, boolean) line: 318 XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(MetaDataIterator) line: 295 XMLPersistenceMetaDataParser(XMLMetaDataParser).parse(URL) line: 268 PersistenceMetaDataFactory.parseXML(URL, Class, int, ClassLoader) line: 247 PersistenceMetaDataFactory.load(Class, int, ClassLoader) line: 198 MetaDataRepository.getMetaDataInternal(Class, ClassLoader) line: 470 MetaDataRepository.getMetaData(Class, ClassLoader, boolean) line: 290 PCEnhancer.<init>(OpenJPAConfiguration, BCClass, MetaDataRepository, ClassLoader) line: 242 PCEnhancer.run(OpenJPAConfiguration, String[], PCEnhancer$Flags, MetaDataRepository, BytecodeWriter, ClassLoader) line: 4349 PCEnhancer.run(OpenJPAConfiguration, String[], Options) line: 4296 PCEnhancer.main(String[]) line: 4268 In the failing case, serp.Strings.toClass() method returns a different Class object from the Class object used by the MetaDataRepository, as a result, the look up of the meta data from the MetaDataRepository._meta map will not find the meta data, even there is one in the _meta map with a different Class object key. If a target is passed to the enhencer, serp.Strings.toClass() returns the same Class object, hence the look up in the MetaDataRepository succeeded. This implies serp returns a entity Class object using a different classloader. From what I notice, both calls (pass & fail cases) to the serp.Strings.toClass() method uses the same TemporaryClassLoader. Since I have no access to the Serp code, I don't know what Serp does and what is the difference that cause the failure. I am looking for someone who can shred some light into this problem. Thanks. Albert Lee.
          Hide
          Patrick Linskey added a comment -

          FTR, the serp source code is available at http://serp.sourceforge.net

          Show
          Patrick Linskey added a comment - FTR, the serp source code is available at http://serp.sourceforge.net
          Hide
          Albert Lee added a comment -

          Patrick, thanks for the pointer to the serp code. It helps a lot. This problem has nothing to do with Serp.

          The scope of the problem is:

          1) When pcEnhancer is invoked with a target (i.e. test.XMLDatatypeSupportTestEntity), the ClassArgParser.parseTypes() is called to process the arguments and indirectly the entity is loaded using the TemporaryClassLoader. Subsequently, when the orm.xml is parsed, the same TemporaryClassLoader is used as the key to the meta data repository map.

          TemporaryClassLoader.loadClass(String, boolean) line: 78
          TemporaryClassLoader.loadClass(String) line: 44
          ClassLoader.defineClassImpl(String, byte[], int, int, Object) line: not available [native method]
          TemporaryClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 224
          TemporaryClassLoader(ClassLoader).defineClass(String, byte[], int, int) line: 163
          TemporaryClassLoader.loadClass(String, boolean) line: 78
          TemporaryClassLoader.loadClass(String) line: 44
          Class<T>.forNameImpl(String, boolean, ClassLoader) line: not available [native method]
          Class<T>.forName(String, boolean, ClassLoader) line: 164
          Strings.toClass(String, boolean, ClassLoader) line: 162
          Strings.toClass(String, ClassLoader) line: 108
          ClassArgParser.parseTypes(String) line: 164
          PCEnhancer.run(OpenJPAConfiguration, String[], PCEnhancer$Flags, MetaDataRepository, BytecodeWriter, ClassLoader) line: 4333
          PCEnhancer.run(OpenJPAConfiguration, String[], Options) line: 4296
          PCEnhancer.main(String[]) line: 4268

          2) When no target is specified, the argument process is skipped and proceed to meta-data processing. The first step to do is to load entity class using serp.Project. Currently, the project's loadClass() method is called without a classloader, therefore Project uses a default, which is the application context classloader (Thread.currentThread().getContextClassLoader()
          However, the remaining meta-data processing follow the exactly the same path as the successfully scenario and use the TemporaryClassLoader to load the entity class. This later entity Class object is used as the key to the meta-data repository map. When all the processing is finished, MetaDataRepository.getMetaDataInternal( entityClass_from_applCtxtClassLoader) is called to lookup the meta data and was not found.

          --------------------------------
          PCEnhancer.java
          for (Iterator itr = classes.iterator(); itr.hasNext() {
          Object o = itr.next();
          if (log.isTraceEnabled())
          log.trace(_loc.get("enhance-running", o));

          if (o instanceof String)
          bc = project.loadClass((String) o, loader); //<<<< loader is added to resolve the observed problem
          else
          bc = project.loadClass((Class) o);
          enhancer = new PCEnhancer(conf, bc, repos, loader);
          --------------------------------
          serp.Project.java
          public BCClass loadClass(String name)

          { return loadClass(name, null); }

          --------------------------------
          public BCClass loadClass(String name, ClassLoader loader) {
          // convert to proper Class.forName() form
          name = _names.getExternalForm(name, false);

          BCClass cached = checkCache(name);
          if (cached != null)
          return cached;

          // check for existing type
          if (loader == null)
          loader = Thread.currentThread().getContextClassLoader();
          try

          { return loadClass(Strings.toClass(name, loader)); }

          catch (Exception e) {
          }
          --------------------------------

          I modified PCEnhancer.run method and add the classloader parameter to the project.loadClass() call to request Project to load the entity class using the TemporaryClassLoader. This seems to fix the problem.

          if (o instanceof String)
          bc = project.loadClass((String) o, loader); //<<<< loader is added to resolve the observed problem

          Is this the correct fix strategy for this problem?

          Thanks,
          Albert Lee

          Show
          Albert Lee added a comment - Patrick, thanks for the pointer to the serp code. It helps a lot. This problem has nothing to do with Serp. The scope of the problem is: 1) When pcEnhancer is invoked with a target (i.e. test.XMLDatatypeSupportTestEntity), the ClassArgParser.parseTypes() is called to process the arguments and indirectly the entity is loaded using the TemporaryClassLoader. Subsequently, when the orm.xml is parsed, the same TemporaryClassLoader is used as the key to the meta data repository map. TemporaryClassLoader.loadClass(String, boolean) line: 78 TemporaryClassLoader.loadClass(String) line: 44 ClassLoader.defineClassImpl(String, byte[], int, int, Object) line: not available [native method] TemporaryClassLoader(ClassLoader).defineClass(String, byte[], int, int, ProtectionDomain) line: 224 TemporaryClassLoader(ClassLoader).defineClass(String, byte[], int, int) line: 163 TemporaryClassLoader.loadClass(String, boolean) line: 78 TemporaryClassLoader.loadClass(String) line: 44 Class<T>.forNameImpl(String, boolean, ClassLoader) line: not available [native method] Class<T>.forName(String, boolean, ClassLoader) line: 164 Strings.toClass(String, boolean, ClassLoader) line: 162 Strings.toClass(String, ClassLoader) line: 108 ClassArgParser.parseTypes(String) line: 164 PCEnhancer.run(OpenJPAConfiguration, String[], PCEnhancer$Flags, MetaDataRepository, BytecodeWriter, ClassLoader) line: 4333 PCEnhancer.run(OpenJPAConfiguration, String[], Options) line: 4296 PCEnhancer.main(String[]) line: 4268 2) When no target is specified, the argument process is skipped and proceed to meta-data processing. The first step to do is to load entity class using serp.Project. Currently, the project's loadClass() method is called without a classloader, therefore Project uses a default, which is the application context classloader (Thread.currentThread().getContextClassLoader() However, the remaining meta-data processing follow the exactly the same path as the successfully scenario and use the TemporaryClassLoader to load the entity class. This later entity Class object is used as the key to the meta-data repository map. When all the processing is finished, MetaDataRepository.getMetaDataInternal( entityClass_from_applCtxtClassLoader) is called to lookup the meta data and was not found. -------------------------------- PCEnhancer.java for (Iterator itr = classes.iterator(); itr.hasNext() { Object o = itr.next(); if (log.isTraceEnabled()) log.trace(_loc.get("enhance-running", o)); if (o instanceof String) bc = project.loadClass((String) o, loader); //<<<< loader is added to resolve the observed problem else bc = project.loadClass((Class) o); enhancer = new PCEnhancer(conf, bc, repos, loader); -------------------------------- serp.Project.java public BCClass loadClass(String name) { return loadClass(name, null); } -------------------------------- public BCClass loadClass(String name, ClassLoader loader) { // convert to proper Class.forName() form name = _names.getExternalForm(name, false); BCClass cached = checkCache(name); if (cached != null) return cached; // check for existing type if (loader == null) loader = Thread.currentThread().getContextClassLoader(); try { return loadClass(Strings.toClass(name, loader)); } catch (Exception e) { } -------------------------------- I modified PCEnhancer.run method and add the classloader parameter to the project.loadClass() call to request Project to load the entity class using the TemporaryClassLoader. This seems to fix the problem. if (o instanceof String) bc = project.loadClass((String) o, loader); //<<<< loader is added to resolve the observed problem Is this the correct fix strategy for this problem? Thanks, Albert Lee
          Hide
          Albert Lee added a comment -

          Attached patch to add "loader" in PCEnhancer.run().

          if (o instanceof String)
          bc = project.loadClass((String) o, loader);
          else
          bc = project.loadClass((Class) o);

          Show
          Albert Lee added a comment - Attached patch to add "loader" in PCEnhancer.run(). if (o instanceof String) bc = project.loadClass((String) o, loader); else bc = project.loadClass((Class) o);
          Hide
          Patrick Linskey added a comment -

          That sounds like a valid fix to me.

          Show
          Patrick Linskey added a comment - That sounds like a valid fix to me.
          Hide
          Kevin Sutter added a comment -

          Resolved for 1.1.0 (r576552) and 1.0.1 (r576564).

          Show
          Kevin Sutter added a comment - Resolved for 1.1.0 (r576552) and 1.0.1 (r576564).
          Hide
          Patrick Linskey added a comment -

          The test case for this issue was not checked in.

          Show
          Patrick Linskey added a comment - The test case for this issue was not checked in.
          Hide
          Albert Lee added a comment -

          Problem fixed. Need to check in test.

          Show
          Albert Lee added a comment - Problem fixed. Need to check in test.
          Hide
          Sebastian Souza added a comment -

          I have the same problem, and i am using openjpa 1.1.

          Show
          Sebastian Souza added a comment - I have the same problem, and i am using openjpa 1.1.

            People

            • Assignee:
              Albert Lee
              Reporter:
              Albert Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development