Hello everyone

I'm trying to get the maven-processor-plugin execute the EclipseLink's CanonicalModelProcessor to generate metamodels for JPA. I'm following the blog entry http://blog.gueck.com/2009/12/generating-jpa-20-criteria-canonical.html that describes how to set up this with Maven.

When executing mvn generate-sources, I get the following exception:

[INFO] diagnostic error: java.lang.SecurityException: class "org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProperties"'s signer information does n
ot match signer information of other classes in the same package


An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.RuntimeException: java.lang.SecurityException: class "org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProperties"'s signer information doe
s not match signer information of other classes in the same package
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407) at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625) at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
        at com.sun.tools.javac.main.Main.compile(Main.java:353)
...

I think that this is caused by two concurring versions of eclipselink. My project depends on the OSGI version, but the maven-processor-plugin on the "normal" eclipselink version. The OSGI version is signed, the normal version not. The plugin has to use the normal version, because the CanonicalModelProcessor only is contained in this jar.



<dependencies>
...
  <dependency>
    <!-- signed OSGI version -->
    <groupId>org.eclipse.persistence</groupId>
    <artifactId>org.eclipse.persistence.jpa</artifactId>
    <scope>compile</scope>
  </dependency>
...
</dependencies>


<plugin>
  <groupId>org.bsc.maven</groupId>
  <artifactId>maven-processor-plugin</artifactId>
  <dependencies>

    <dependency>
       <!-- unsigned OSGI version -->
      <groupId>org.eclipse.persistence</groupId>
      <artifactId>eclipselink</artifactId>
      <version>${eclipselink.version}</version>
    </dependency>
  </dependencies>
....
</plugin>




Do you have any ideas how I can get around this security exception?


Thanks in advance,
James


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to