Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Exception using LTW with signed jars
Exception using LTW with signed jars [message #599070] Fri, 29 August 2008 02:51
Eclipse User
Originally posted by: alexander0810.yahoo.de

Hello,

Weaving classes in a signed jar fails with a SecurityException while
trying to load the inner class "AjcClosure1" of a weaved class.


I have added following jars to the buildpath:
- JobTest.jar (jar with the aspect classes)
- aspectjlib.jar
- aspectjrt.jar

and added the vm argument -javaagent:" aspectjweaver.jar".

Signing the jar with the AspectJ classes has no effect.

Is there any opportunity to weave the classes without modifying the
signed jar?

Alexander

[AppClassLoader@92e78c] warning define generated class failed --
(SecurityException) class "com.mypackage.MyClass$AjcClosure1"'s signer
information does not match signer information of other classes in the
same package
class "com.mypackage.MyClass$AjcClosure1"'s signer information does not
match signer information of other classes in the same package
java.lang.SecurityException: class "com.mypackage.MyClass$AjcClosure1"'s
signer information does not match signer information of other classes in
the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.define Class(ClassLoaderWeavingAdaptor.java:745)
at
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.access $100(ClassLoaderWeavingAdaptor.java:58)
at
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor$1.acce ptClass(ClassLoaderWeavingAdaptor.java:129)
at
org.aspectj.weaver.tools.WeavingAdaptor$WeavingClassFileProv ider$1.acceptResult(WeavingAdaptor.java:732)
at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver .java:1392)
at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:120 6)
at
org.aspectj.weaver.tools.WeavingAdaptor.getWovenBytes(Weavin gAdaptor.java:383)
at
org.aspectj.weaver.tools.WeavingAdaptor.weaveClass(WeavingAd aptor.java:270)
at org.aspectj.weaver.loadtime.Aj.preProcess(Aj.java:78)
at
org.aspectj.weaver.loadtime.ClassPreProcessorAgentAdapter.tr ansform(ClassPreProcessorAgentAdapter.java:52)
at sun.instrument.TransformerManager.transform(Unknown Source)
at sun.instrument.InstrumentationImpl.transform(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.ipointsys.agent.server.AgentServer.<clinit>(SourceFile:1650)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.getMainMethod (WrapperStartStopApp.java:574)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.<init>(WrapperStartStopApp.java:157)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.main(WrapperS tartStopApp.java:731)

Initialization failed: 'java.lang.NoClassDefFoundError:
com/mypackage/MyClass$AjcClosure1'. Unable to initialize and start MyServer.
java.lang.NoClassDefFoundError:
com/ipointsys/agent/server/license/LicenseChecker$AjcClosure 1
at com.mypackage.MyServer.<clinit>(SourceFile:1650)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.getMainMethod (WrapperStartStopApp.java:574)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.<init>(WrapperStartStopApp.java:157)
at
org.tanukisoftware.wrapper.WrapperStartStopApp.main(WrapperS tartStopApp.java:731)
Previous Topic:An error occurred while automatically activating bundle org.eclipse.ajdt.ui
Next Topic:Advice on Constructors With Subclasses
Goto Forum:
  


Current Time: Sat Sep 20 22:13:49 GMT 2014

Powered by FUDForum. Page generated in 0.02519 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software