You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by shriram <sh...@yahoo.com> on 2009/10/21 00:31:47 UTC

Disabling enhancement on my netbeans project

Hello,

How can i disable enhancement on my netbeans project ? both build and compile time.

I tried 
<property name="openjpa.DynamicEnhancementAgent" value="false"/>

It still gives me 

125  jpatestingPU  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary".
Exception in thread "main" <openjpa-2.0.0-M3-r422266:822833 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "[class com.ejb.entity.Magazine]".
        at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:117)
        at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:305)
 
I am using openJPA 2.0///

Thanks
sriram


      

Re: Disabling enhancement on my netbeans project

Posted by jingmeifan <ja...@hotmail.com>.
Thanks everybody, the app is working by comment out

<property name="loadTimeWeaver">
        <bean
class="org.springframework.instrument.classloading.SimpleLoadTimeWeaver" />
</property>

My Spring lib is 3.0.3, so I don't need this property in
applicationContext.xml.

Jane

-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Disabling-enhancement-on-my-netbeans-project-tp3861704p5282765.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Disabling enhancement on my netbeans project

Posted by Craig L Russell <cr...@oracle.com>.
Be sure your class path at runtime has the enhanced classes before the  
un-enhanced classes.

Craig

On Jul 11, 2010, at 6:27 PM, C N Davies wrote:

> Decompile them and you can see for sure.  "implements  
> PersistenceCapable"
>
> C hris
>
>
> -----Original Message-----
> From: jingmeifan [mailto:janefanm@hotmail.com]
> Sent: Monday, 12 July 2010 5:54 AM
> To: users@openjpa.apache.org
> Subject: Re: Disabling enhancement on my netbeans project
>
>
> I already enhance the model classes in build time, but I still get
>
> <openjpa-2.0.0-r422266:935683 nonfatal user error>
> org.apache.openjpa.persistence.ArgumentException: This configuration
> disallows runtime optimization, but the following listed types were  
> not
> enhanced at build time or at class load time with a javaagent: "
> ...
>
> I checked the size of class file before enhancement and after  
> enhancement,
> the after is bigger than before.
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Disabling-enhancement-on-my-netbeans-pro
> ject-tp3861704p5280701.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Craig L Russell
Architect, Oracle
http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@oracle.com
P.S. A good JDO? O, Gasp!


RE: Disabling enhancement on my netbeans project

Posted by C N Davies <cn...@cndavies.com>.
Decompile them and you can see for sure.  "implements PersistenceCapable"

C hris


-----Original Message-----
From: jingmeifan [mailto:janefanm@hotmail.com] 
Sent: Monday, 12 July 2010 5:54 AM
To: users@openjpa.apache.org
Subject: Re: Disabling enhancement on my netbeans project


I already enhance the model classes in build time, but I still get

<openjpa-2.0.0-r422266:935683 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent: "
...

I checked the size of class file before enhancement and after enhancement,
the after is bigger than before.

--
View this message in context:
http://openjpa.208410.n2.nabble.com/Disabling-enhancement-on-my-netbeans-pro
ject-tp3861704p5280701.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: Disabling enhancement on my netbeans project

Posted by jingmeifan <ja...@hotmail.com>.
I already enhance the model classes in build time, but I still get

<openjpa-2.0.0-r422266:935683 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: This configuration
disallows runtime optimization, but the following listed types were not
enhanced at build time or at class load time with a javaagent: "
...

I checked the size of class file before enhancement and after enhancement,
the after is bigger than before.

-- 
View this message in context: http://openjpa.208410.n2.nabble.com/Disabling-enhancement-on-my-netbeans-project-tp3861704p5280701.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Disabling enhancement on my netbeans project

Posted by shriram <sh...@yahoo.com>.
Thanks rick...




________________________________
From: Rick Curtis <cu...@gmail.com>
To: users@openjpa.apache.org
Sent: Tue, October 20, 2009 7:18:10 PM
Subject: Re: Disabling enhancement on my netbeans project

sriram-
To use OpenJPA you will need to do either build time or runtime enhancement.
The DynamicEnhancement that you disabled is something that OpenJPA added to
try to automagically hook up the enhancer, but it isn't perfect by any
means. I'd suggest reading through the OpenJPA docs/manual [1] and/or this
blog post [2] which gives some background on enhancement.

[1] http://openjpa.apache.org/entity-enhancement.html
[1.5]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance
[2]
http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html

Thanks,
Rick

On Tue, Oct 20, 2009 at 5:31 PM, shriram <sh...@yahoo.com> wrote:

> Hello,
>
> How can i disable enhancement on my netbeans project ? both build and
> compile time.
>
> I tried
> <property name="openjpa.DynamicEnhancementAgent" value="false"/>
>
> It still gives me
>
> 125  jpatestingPU  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
> "org.apache.openjpa.jdbc.sql.MySQLDictionary".
> Exception in thread "main" <openjpa-2.0.0-M3-r422266:822833 nonfatal user
> error> org.apache.openjpa.persistence.ArgumentException: This configuration
> disallows runtime optimization, but the following listed types were not
> enhanced at build time or at class load time with a javaagent: "[class
> com.ejb.entity.Magazine]".
>        at
> org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:117)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:305)
>
> I am using openJPA 2.0///
>
> Thanks
> sriram
>
>
>



      

Re: Disabling enhancement on my netbeans project

Posted by Rick Curtis <cu...@gmail.com>.
sriram-
To use OpenJPA you will need to do either build time or runtime enhancement.
The DynamicEnhancement that you disabled is something that OpenJPA added to
try to automagically hook up the enhancer, but it isn't perfect by any
means. I'd suggest reading through the OpenJPA docs/manual [1] and/or this
blog post [2] which gives some background on enhancement.

[1] http://openjpa.apache.org/entity-enhancement.html
[1.5]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_pc_enhance
[2]
http://webspherepersistence.blogspot.com/2009/02/openjpa-enhancement.html

Thanks,
Rick

On Tue, Oct 20, 2009 at 5:31 PM, shriram <sh...@yahoo.com> wrote:

> Hello,
>
> How can i disable enhancement on my netbeans project ? both build and
> compile time.
>
> I tried
> <property name="openjpa.DynamicEnhancementAgent" value="false"/>
>
> It still gives me
>
> 125  jpatestingPU  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
> "org.apache.openjpa.jdbc.sql.MySQLDictionary".
> Exception in thread "main" <openjpa-2.0.0-M3-r422266:822833 nonfatal user
> error> org.apache.openjpa.persistence.ArgumentException: This configuration
> disallows runtime optimization, but the following listed types were not
> enhanced at build time or at class load time with a javaagent: "[class
> com.ejb.entity.Magazine]".
>        at
> org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:117)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:305)
>
> I am using openJPA 2.0///
>
> Thanks
> sriram
>
>
>