I am using OpenJPA build-time enhancement warning.
When the server starts, I get:
which openjpa documentation (http://openjpa.apache.org/integration.html) says is safe to ignore.Code:WARN [main] openjpa.Runtime - An error occurred while registering a ClassTransformer with PersistenceUnitInfo: name 'PuName', root URL [file:/.../]. The error has been consumed. To see it, set your openjpa.Runtime log level to TRACE. Load-time class transformation will not be available.
I would like to get rid of the message. I traced the issue down to SpringPersistenceUnitInfo.addTransformer is called, but there is no loadTimeWeaver set.
My solution is to create my own dummy LoadTimeWeaver that does nothing:
Seems to work for me. What are the side-effects? And should I return a different ClassLoader?Code:public class OpenJPALoadTimeWeaver implements LoadTimeWeaver { public OpenJPALoadTimeWeaver() { return; } public void addTransformer(ClassFileTransformer transformer) { // nothing return; } public ClassLoader getInstrumentableClassLoader() { return this.getClass().getClassLoader(); } public ClassLoader getThrowawayClassLoader() { return this.getClass().getClassLoader(); } }
Any feedback would be appreciate, as I have no idea what I am doing
Thanks



Reply With Quote
