Not sure where about the next steps on debugging this. As I am not familar with osgi or the java security model or with maven shade. Would appreciate any pointers.
thanks Arun On Thu, Mar 15, 2012 at 5:18 PM, Arun Ramakrishnan < [email protected]> wrote: > I have the need to build uber jars of my projects ( to be able to easily > transfer and execute on distributed computing systems like hadoop ). > > I have been using Maven shade plugin > <http://maven.apache.org/plugins/maven-shade-plugin/>successfully so far. > i.e until I introduced the restlet:2.0 . The restlet jar is pulling in an > osgi jar ( specifically org.osgi:org.osgi.core:jar:4. > 0.0:compile) that is causing this error while i run my jar > > **************************** > *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) > ************************** > > Here is the dependency tree <https://gist.github.com/2046251>, if it helps > > Here is also the maven shade config, if that helps too. > > ********************************************* > > <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> > ************************************************************************** > > thanks > Arun > > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2936310

