You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Arun Ramakrishnan <si...@gmail.com> on 2012/03/15 20:25:27 UTC
shade issues with manifest entries
We use shade to build a uber jar. We use this to run jobs on hadoop ( a
distributed computing framework ).
Now, shade used to be working good. But, after I made some project
refactoring, It stopped working.
Here is the dependency tree <https://gist.github.com/2046251>, if it helps
This is the error I get when I run any class in the jar from the command
line.
****************************
*Exception in thread "main" java.lang.SecurityException: no manifiest
section for signature file entry
OSGI-OPT/src/org/osgi/framework/PackagePermission.java*
at
sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:380)
at
sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:231)
at
sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:288)
at java.util.jar.JarVerifier.update(JarVerifier.java:199)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:323)
at java.util.jar.JarFile.getInputStream(JarFile.java:388)
at
sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:692)
at sun.misc.Resource.cachedInputStream(Resource.java:61)
at sun.misc.Resource.getByteBuffer(Resource.java:144)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:256)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
**************************
***************************************************************************
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<!-- phase>package</phase>
<goals>
<goal>shade</goal>
</goals -->
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/LICENSE</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
**************************************************************************
Re: shade issues with manifest entries
Posted by Arun Ramakrishnan <si...@gmail.com>.
Ah, yes. Thanks. Removing restlet fixed the issue. Not sure how i missed
it.
But, still I would like to use restlet in the future. Will prob ask the
osgi or restlet group.
thanks
Arun
On Thu, Mar 15, 2012 at 2:58 PM, Wayne Fay <wa...@gmail.com> wrote:
> > Now, shade used to be working good. But, after I made some project
> > refactoring, It stopped working.
>
> What specifically did you do during the refactoring? What dependencies
> got changed/upgraded?
>
> > *Exception in thread "main" java.lang.SecurityException: no manifiest
> > section for signature file entry
> > OSGI-OPT/src/org/osgi/framework/PackagePermission.java*
>
> Most likely this org.osgi.core:4.0.0 artifact is your issue:
> [INFO] | +- org.restlet.jse:org.restlet:jar:2.0.0:compile
> [INFO] | | \- org.osgi:org.osgi.core:jar:4.0.0:compile
>
> I don't know what specifically is broken or how to fix it, but I'd start
> there.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: shade issues with manifest entries
Posted by Wayne Fay <wa...@gmail.com>.
> Now, shade used to be working good. But, after I made some project
> refactoring, It stopped working.
What specifically did you do during the refactoring? What dependencies
got changed/upgraded?
> *Exception in thread "main" java.lang.SecurityException: no manifiest
> section for signature file entry
> OSGI-OPT/src/org/osgi/framework/PackagePermission.java*
Most likely this org.osgi.core:4.0.0 artifact is your issue:
[INFO] | +- org.restlet.jse:org.restlet:jar:2.0.0:compile
[INFO] | | \- org.osgi:org.osgi.core:jar:4.0.0:compile
I don't know what specifically is broken or how to fix it, but I'd start there.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: shade issues with manifest entries
Posted by Arun Ramakrishnan <si...@gmail.com>.
Any pointers would be greatly appreciated.
On Thu, Mar 15, 2012 at 12:25 PM, Arun Ramakrishnan <
sinchronized.arun@gmail.com> wrote:
> We use shade to build a uber jar. We use this to run jobs on hadoop ( a
> distributed computing framework ).
> Now, shade used to be working good. But, after I made some project
> refactoring, It stopped working.
>
>
> Here is the dependency tree <https://gist.github.com/2046251>, if it helps
>
>
>
> This is the error I get when I run any class in the jar from the command
> line.
>
> ****************************
> *Exception in thread "main" java.lang.SecurityException: no manifiest
> section for signature file entry
> OSGI-OPT/src/org/osgi/framework/PackagePermission.java*
> at
> sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:380)
> at
> sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:231)
> at
> sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
> at java.util.jar.JarVerifier.processEntry(JarVerifier.java:288)
> at java.util.jar.JarVerifier.update(JarVerifier.java:199)
> at java.util.jar.JarFile.initializeVerifier(JarFile.java:323)
> at java.util.jar.JarFile.getInputStream(JarFile.java:388)
> at
> sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:692)
> at sun.misc.Resource.cachedInputStream(Resource.java:61)
> at sun.misc.Resource.getByteBuffer(Resource.java:144)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:256)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> **************************
>
> ***************************************************************************
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-shade-plugin</artifactId>
> <executions>
> <execution>
> <!-- phase>package</phase>
> <goals>
> <goal>shade</goal>
> </goals -->
> <configuration>
> <transformers>
> <transformer
>
> implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"
> />
> </transformers>
> <filters>
> <filter>
> <artifact>*:*</artifact>
> <excludes>
> <exclude>META-INF/LICENSE</exclude>
> </excludes>
> </filter>
> </filters>
> </configuration>
> </execution>
> </executions>
> </plugin>
> **************************************************************************
>