> -----Original Message----- > From: Pinaki Poddar [mailto:[email protected]] > Sent: Wednesday, December 09, 2009 11:22 PM > To: [email protected] > Subject: RE: Message about "ProductDerivations", error with > ClassTransformer, and turning up log output > > > Hi, > > I may consider doing that for the real build, but I'm just running > this > > in Eclipse. It's not really practical to set up compile-time > > enhancement in that environment. > > There is a utility Eclipse plugin that enhances your classes as part of > the > build cycle. [1] > It is pretty rudimentary -- but soon OpenJPA will have a proper Eclipse > plugin for bytecode enhancement available. > [1] http://people.apache.org/~ppoddar/eclipse/
I'll take a look at it. > I note your concern for limited error messages (both for > ProductDerivations > and Classtransformer failure). We will add more informative error > message to > diagnose failures of these nature. Can you please send us a looong > stack > trace as it fails? I'll give you whatever information you want, as long as I can find it somewhere. > KARR, DAVID (ATTCINW) wrote: > > > >> -----Original Message----- > >> From: Pinaki Poddar [mailto:[email protected]] > >> Sent: Wednesday, December 09, 2009 7:35 PM > >> To: [email protected] > >> Subject: Re: Message about "ProductDerivations", error with > >> ClassTransformer, and turning up log output > >> > >> > >> > First is the "ProductDerivations" thing. > >> > I don't know for sure what that's telling me, or how I should > >> proceed. > >> > >> ProductDerivations is the thing that makes OpenJPA ultra- > configurable. > >> Each > >> ProductDerivation during bootstrap contributes their own > configuration > >> (in > >> defined order) to customize a OpenJPA runtime -- for example, > whether > >> you > >> want to use OpenJPA with a JDBC-aware database or a LDAP directory > or > > a > >> Object-oriented Database, or whether you want OpenJPA to process XML > >> data as > >> first class objects or operate with a set of distributed databases. > >> ProductDerivations (please note the 's' at the end) is the utility > > that > >> detects all the ProductDerivation available (visible) at bootstrap. > >> As you are seeing ProductDerivations error message, the possible > >> diagnostic > >> action is to run org.apache.openjpa.lib.conf.ProductDerivations > (which > >> has a > >> main() method) with the classpath that you think is the same as when > >> the > >> application is being invoked. That main() method will print out the > >> list of > >> ProductDerivation instances the classloader can load' (via service > >> discovery > >> mechanism) and the ones that can not be initialized. > > > > Ok, I'll give that a try and see what I get. > > > >> Secondly, this ClassTransformer thing. The easiest way is to make > such > >> things redundant is build-time enhancement [1]. Simply put, after > >> compilation of the persistent entity classes, run a > >> ...openjpa.enhance.PCEnhancer which will 'enhance' the bytecode of > the > >> persistent entity classes such that any persistent field access or > >> mutation > >> is intercepted by OpenJPA to do the right thing. This simple step > will > >> not > >> only obviate many deployment time concerns such as ClassTransformer > > via > >> -javaagent or subclassing or redefinition, but also offer better > >> runtime > >> performance. > > > > I may consider doing that for the real build, but I'm just running > this > > in Eclipse. It's not really practical to set up compile-time > > enhancement in that environment. I'll need to make sure I'm doing > > proper load-time enhancement at this point. As I'm running JDK 1.5, > I > > believe I have to use the javaagent? If I was using JDK 1.6, I seem > to > > remember it can do it at load time without the javaagent? > > > > In any case, this is somewhat beside the point. The message > indicates > > that I can get more info about what's going wrong if I turn up > logging. > > I believe I did that, but it appeared to have no effect. > > > >> [1] > >> > > > http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_gui > >> de_pc_enhance_build > >> > >> KARR, DAVID (ATTCINW) wrote: > >> > > >> > I'm assembling an app using JPA and CXF on WebLogic 10MP1. > >> > > >> > After getting through several classloading issues, I'm seeing the > >> > following in the server log at startup: > >> > > >> > ------------ > >> > Some product derivations are being skipped. For information about > >> > product derivation status, run: > >> > java org.apache.openjpa.lib.conf.ProductDerivations > >> > 16 dynamicContent WARN [[ACTIVE] ExecuteThread: '0' for queue: > >> > 'weblogic.kernel.Default (self-tuning)'] openjpa.Runtime - An > error > >> > occurred while registering a ClassTransformer with > >> PersistenceUnitInfo: > >> > name 'dynamicContent', root URL [file:/C:/Documents and > >> > Settings/dk068x/workspace3/DynamicContent/bin/]. The error has > been > >> > consumed. To see it, set your openjpa.Runtime log level to TRACE. > >> > Load-time class transformation will not be available. > >> > ------------ > >> > > >> > There are a few issues here. First is the "ProductDerivations" > >> thing. > >> > I don't know for sure what that's telling me, or how I should > >> proceed. > >> > It appears to be suggesting a Java command line to run, which > seems > >> odd. > >> > > >> > Second is this ClassTransformer error that it's not showing me the > >> > detail for. I currently have the following in my persistence.xml > >> file > >> > (with a couple elisions): > >> > > >> > ---------- > >> > <?xml version="1.0" encoding="UTF-8"?> > >> > <persistence version="1.0" > >> > xmlns="http://java.sun.com/xml/ns/persistence" > >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> > > >> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence > >> > > >> > > >> > http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> > >> > <persistence-unit name="MyPersistenceUnitName" > >> > transaction-type="JTA"> > >> > > >> > > >> > > > <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provi > >> d > >> > er> > >> > <mapping-file>---path to orm.xml file---</mapping-file> > >> > <properties> > >> > <property name="openjpa.Log" > > value="DefaultLevel=TRACE"/> > >> > </properties> > >> > </persistence-unit> > >> > </persistence> > >> > ---------- > >> > > >> > As far as I can tell, that property setting should turn up the log > >> > pretty high. This change had no effect that I could see. > >> > > >> > > >> > >> > >> ----- > >> Pinaki > >> -- > >> View this message in context: http://n2.nabble.com/Message-about- > >> ProductDerivations-error-with-ClassTransformer-and-turning-up-log- > >> output-tp4143105p4143527.html > >> Sent from the OpenJPA Users mailing list archive at Nabble.com. > > > > > > > ----- > Pinaki > -- > View this message in context: http://n2.nabble.com/Message-about- > ProductDerivations-error-with-ClassTransformer-and-turning-up-log- > output-tp4143105p4144000.html > Sent from the OpenJPA Users mailing list archive at Nabble.com.
