Hi Prodoc, The call stack indicates that we are attempting to process the Access Type for a Method (Field or Property).
enhance: java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at org.apache.openjpa.lib.util.J2DoPrivHelper$9.run(J2DoPrivHelper.java:305) at java.security.AccessController.doPrivileged(Native Method) at org.apache.openjpa.persistence.PersistenceMetaDataDefaults.getAccessType(PersistenceMetaDataDefaults.java:265) Here's the code snippet from getAccessType (I'm assuming a 1.2.x OpenJPA code base): if (annotated((Method[]) AccessController.doPrivileged( J2DoPriv5Helper.getDeclaredMethodsAction(cls))).size() > 0 || cls.isInterface()) // OpenJPA managed ifaces must use prop access access |= ClassMetaData.ACCESS_PROPERTY; return getAccessType(cls.getSuperclass()) | access; The doPrivileged call is used for Java2 Security permission checking. If you are not running with Java2 Security enabled, then this turns into "noise". I'm assuming you are not running with Java2 Security. As you can see, we need to get access to the declared methods of the given Class. And, we will recursively call this method to go up the Class heirarchy. It would seem that something in your Entity definition is using this org/w3c/dom/svg/SVGDocument Class. Either directly or indirectly. And, as Rick has pointed out, this Class would need to be available for the PCEnhancing process to be successful. Kevin On Wed, May 20, 2009 at 2:53 AM, Prodoc <a...@hobba.nl> wrote: > > > Prodoc wrote: > > I just performed a clean and with the same build config as mentioned in > my > > last post I now get presented with a different error: > > > > java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: > > mpsf.entities.EngagementRange > > > > Fixed now. A simple later calling of the enhance target did the trick. > I'm now back at the 'NoClassDefFoundError' error. Any idea what the cause > of > this could be? > > Here's the complete error: > > ------------------------------------------------------------------------------------------------- > enhance: > java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) > at java.lang.Class.getDeclaredMethods(Class.java:1791) > at > org.apache.openjpa.lib.util.J2DoPrivHelper$9.run(J2DoPrivHelper.java:305) > at java.security.AccessController.doPrivileged(Native Method) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.getAccessType(PersistenceMetaDataDefaults.java:265) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.getAccessType(PersistenceMetaDataDefaults.java:250) > at > > org.apache.openjpa.meta.AbstractMetaDataDefaults.populate(AbstractMetaDataDefaults.java:155) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.populate(PersistenceMetaDataDefaults.java:227) > at > > org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:794) > at > > org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:780) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getMetaData(AnnotationPersistenceMetaDataParser.java:657) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:480) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:352) > at > > org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:229) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:474) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:294) > at > > org.apache.openjpa.meta.ValueMetaDataImpl.resolveDeclaredType(ValueMetaDataImpl.java:431) > at > > org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:410) > at > org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1674) > at > org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1691) > at > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1626) > at > > org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:717) > at > > org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:616) > at > > org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:541) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:308) > at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:249) > at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4493) > at > org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) > at org.apache.tools.ant.Project.executeTarget(Project.java:1306) > at > > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1189) > at > org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273) > at > org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499) > at > org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) > Caused by: java.lang.ClassNotFoundException: org.w3c.dom.svg.SVGDocument > at > > org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:64) > at > > org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:44) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > ... 45 more > java.lang.NoClassDefFoundError: org/w3c/dom/svg/SVGDocument > at java.lang.Class.getDeclaredMethods0(Native Method) > at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) > at java.lang.Class.getDeclaredMethods(Class.java:1791) > at > org.apache.openjpa.lib.util.J2DoPrivHelper$9.run(J2DoPrivHelper.java:305) > at java.security.AccessController.doPrivileged(Native Method) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.getAccessType(PersistenceMetaDataDefaults.java:265) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.getAccessType(PersistenceMetaDataDefaults.java:250) > at > > org.apache.openjpa.meta.AbstractMetaDataDefaults.populate(AbstractMetaDataDefaults.java:155) > at > > org.apache.openjpa.persistence.PersistenceMetaDataDefaults.populate(PersistenceMetaDataDefaults.java:227) > at > > org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:794) > at > > org.apache.openjpa.meta.MetaDataRepository.addMetaData(MetaDataRepository.java:780) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.getMetaData(AnnotationPersistenceMetaDataParser.java:657) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parseClassAnnotations(AnnotationPersistenceMetaDataParser.java:480) > at > > org.apache.openjpa.persistence.AnnotationPersistenceMetaDataParser.parse(AnnotationPersistenceMetaDataParser.java:352) > at > > org.apache.openjpa.persistence.PersistenceMetaDataFactory.load(PersistenceMetaDataFactory.java:229) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:474) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:294) > at > > org.apache.openjpa.meta.ValueMetaDataImpl.resolveDeclaredType(ValueMetaDataImpl.java:431) > at > > org.apache.openjpa.meta.ValueMetaDataImpl.resolve(ValueMetaDataImpl.java:410) > at > org.apache.openjpa.meta.FieldMetaData.resolve(FieldMetaData.java:1674) > at > org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1691) > at > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1626) > at > > org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:717) > at > > org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:616) > at > > org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:541) > at > > org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:308) > at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:249) > at org.apache.openjpa.enhance.PCEnhancer.run(PCEnhancer.java:4493) > at > org.apache.openjpa.ant.PCEnhancerTask.executeOn(PCEnhancerTask.java:89) > at > org.apache.openjpa.lib.ant.AbstractTask.execute(AbstractTask.java:172) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) > at sun.reflect.GeneratedMethodAccessor385.invoke(Unknown Source) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:357) > at org.apache.tools.ant.Target.performTasks(Target.java:385) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) > at org.apache.tools.ant.Project.executeTarget(Project.java:1306) > at > > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1189) > at > org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:273) > at > org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:499) > at > org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) > Caused by: java.lang.ClassNotFoundException: org.w3c.dom.svg.SVGDocument > at > > org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:64) > at > > org.apache.openjpa.lib.util.TemporaryClassLoader.loadClass(TemporaryClassLoader.java:44) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) > ... 45 more > > ------------------------------------------------------------------------------------------------- > > This only pops up because of the enhance procedure. > > Yours, > > Age > -- > View this message in context: > http://n2.nabble.com/Enhancing-entities%3A-getting-desperate-tp2937944p2944823.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > >