You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Donald Woods (JIRA)" <ji...@apache.org> on 2010/09/22 21:56:34 UTC
[jira] Created: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Dynamic load of enhancer agent on Mac OS X fails
------------------------------------------------
Key: OPENJPA-1811
URL: https://issues.apache.org/jira/browse/OPENJPA-1811
Project: OpenJPA
Issue Type: Bug
Components: Enhance, UnenhancedClasses
Affects Versions: 2.0.0
Environment: Mac
Reporter: Donald Woods
Assignee: Donald Woods
Fix For: 2.1.0
Splitting out this item from OPENJPA-1804.
The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1811:
----------------------------------
Reporter: Willis Blackburn (was: Donald Woods)
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914015#action_12914015 ]
Donald Woods commented on OPENJPA-1811:
---------------------------------------
This is due to the persistence.xml not listing all of the classes. The Javaagent loaded enhancer and Dynamically loaded enhancer behave the same, in that when a <class> list is provided, then only those classes will get pre-enhanced.
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance_runtime
Section 2.3 - "If you declare a persistent class list, OpenJPA will only search for metadata for classes in that list. "
I'll add the same note to Section 2.4 using OPENJPA-1804.
Once I added the other 2 classes to the persistence.xml so they were all listed -
<class>openjpatest.AddressBook</class>
<class>openjpatest.Group</class>
<class>openjpatest.Organization</class>
<class>openjpatest.EmailAddress</class>
<class>openjpatest.HostName</class>
then your expected behavior appears -
. . .
79 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation() _inst:null _dynamicallyInstall:true
82 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- couldn't find default /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar
83 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- found /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar
. . .
210 db TRACE [main] openjpa.MetaData - Found 5 classes with metadata in 7 milliseconds.
216 db TRACE [main] openjpa.MetaData - Clearing metadata repository "org.apache.openjpa.meta.MetaDataRepository@761eec35".
707 db INFO [main] openjpa.Runtime - OpenJPA dynamically loaded the class enhancer. Any classes that were not enhanced at build time will be enhanced when they are loaded by the JVM.
. . .
1588 db WARN [main] openjpa.Enhance - An exception was thrown while attempting to perform class file transformation on "openjpatest/Group":
<openjpa-2.1.0-SNAPSHOT-r422266:999559M fatal user error> org.apache.openjpa.util.MetaDataException: Errors encountered while resolving metadata. See nested exceptions for details.
. . .
Caused by: <openjpa-2.1.0-SNAPSHOT-r422266:999559M nonfatal user error> org.apache.openjpa.util.MetaDataException: No metadata was found for type "class java.lang.Object". The class is not enhanced.
. . .
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Willis Blackburn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913965#action_12913965 ]
Willis Blackburn commented on OPENJPA-1811:
-------------------------------------------
Thanks for fixing this!
I noticed that the log message says that OpenJPA will still produce subclasses for the attach API enhancer. Is the attach API enhancer unable to actually modify the classes being loaded?
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913769#action_12913769 ]
Donald Woods commented on OPENJPA-1811:
---------------------------------------
Before fix -
768 db TRACE [main] openjpa.Enhance - org.apache.openjpa.enhance.InstrumentationFactorygetInstrumentation() _disabled: _inst:null_dynamicallyInstall:true
768 db TRACE [main] openjpa.Enhance - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- couldn't find /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar
769 db WARN [main] openjpa.Enhance - Creating subclass for "[class openjpatest.Group, class openjpatest.Organization, class openjpatest.AddressBook]". This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
After fix -
64 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.getInstrumentation() _inst:null _dynamicallyInstall:true
66 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- couldn't find default /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/tools.jar
66 db TRACE [main] openjpa.Runtime - org.apache.openjpa.enhance.InstrumentationFactory.findToolsJar() -- found /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar
. . .
1537 db INFO [main] openjpa.Enhance - Creating subclass and redefining methods for "[class openjpatest.Group, class openjpatest.Organization]". This means that your application will be less efficient than it would if you ran the OpenJPA enhancer.
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Willis Blackburn (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913967#action_12913967 ]
Willis Blackburn commented on OPENJPA-1811:
-------------------------------------------
Definitely confused by log message 1537 since the docs say that the log message will be:
OpenJPA dynamically loaded the class enhancer. Any classes that were not enhanced at build time will be enhanced when they are loaded by the JVM.
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1811) Dynamic load of enhancer agent on
Mac OS X fails
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods resolved OPENJPA-1811.
-----------------------------------
Resolution: Fixed
Committed revision 1000209.
> Dynamic load of enhancer agent on Mac OS X fails
> ------------------------------------------------
>
> Key: OPENJPA-1811
> URL: https://issues.apache.org/jira/browse/OPENJPA-1811
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance, UnenhancedClasses
> Affects Versions: 2.0.0
> Environment: Mac
> Reporter: Willis Blackburn
> Assignee: Donald Woods
> Fix For: 2.1.0
>
>
> Splitting out this item from OPENJPA-1804.
> The dynamic loading of the enhancer agent on Mac OS X w/ Java 1.6.0 fails due to the packaging differences on the Mac, where instead of a tools.jar, there is a 1.6.0/Classes/classes.jar that we should be using instead.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.