DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Raman Gupta
Votes: 0
Watchers: 2

If you were logged in you would be able to see more operations.
DataNucleus Tools : Maven plugin

Running datanucleus:enhance twice results in java.lang.VerifyError

Created: 11/Dec/11 03:36 AM   Updated: 14/Jun/12 01:28 PM   Resolved: 11/Dec/11 08:34 AM
Component/s: None
Affects Version/s: 3.0.0.release
Fix Version/s: None

Environment: Linux, JDK7

Severity: Development

 Description  « Hide
When running the datanucleus:enhance command twice, the build results in a java.lang.Verify error:

[INFO] --- maven-datanucleus-plugin:3.0.1:enhance (default-cli) @ edel-model-test ---
[INFO] DataNucleus Enhancer (version 3.0.1) : Enhancement of classes

[ERROR] --------------------
[ERROR] Standard error from the DataNucleus tool + org.datanucleus.enhancer.DataNucleusEnhancer :
[ERROR] --------------------
[ERROR] Dec 10, 2011 9:32:12 PM org.datanucleus.enhancer.DataNucleusEnhancer <init>
INFO: DataNucleus Enhancer : Using ClassEnhancer "ASM" for API "JDO"
Dec 10, 2011 9:32:12 PM org.datanucleus.enhancer.DataNucleusEnhancer main
INFO: DataNucleus Enhancer (version 3.0.1) : Enhancement of classes
Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 18 in method;)V at offset 4
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(
        at java.lang.Class.getDeclaredMethods(
        at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getJavaBeanAccessorAnnotationsForClass(
        at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(
        at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(
        at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(
        at org.datanucleus.metadata.MetaDataManager.loadClasses(
        at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(
        at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(
        at org.datanucleus.enhancer.DataNucleusEnhancer.main(

Normally, one wouldn't run datanucleus:enhance twice manually, but when building a project using the "package" or "install" commnands (which may very well be run without doing a "clean" first), the datanucleus:enhance command is also run, and therefore the build fails with java.lang.Verify.

Raman Gupta added a comment - 11/Dec/11 06:28 AM
This issue can also be reproduced with the "datanucleus:enhance-check" goal.

Note that this issue appears to be specific to having a source/target setting in maven-compiler-plugin of 1.7. When changing the compiler source/target to 1.6, the issue goes away, even when running on JDK7.

Andy Jefferson added a comment - 11/Dec/11 08:34 AM
I'd refer you to NUCENHANCER-81 since we don't explicitly support JDK1.7 or higher. Obviously you could easily contribute your time to add support for ASM v4 (see NUCENHANCER-81)

Andy Jefferson made changes - 11/Dec/11 08:34 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Won't Fix [ 2 ]
Andy Jefferson made changes - 14/Jun/12 01:28 PM
Status Resolved [ 5 ] Closed [ 6 ]