简体   繁体   中英

AspectJ Load time weaving fails in AWS SWF using Java?

I added Default VM argument at Installed jre

-javaagent:E:\\eclipse-jee-juno-SR2-win32-x86_64\\aws-java-sdk\\aspectj-1.7.3.jar

Followed instrucion from here

But Still Getting Below Error

Error occurred during initialization of VM
agent library failed to init: instrument
Failed to find Premain-Class manifest attribute in E:\eclipse-jee-juno-SR2-win32-x86_64\aws-java-sdk\aspectj-1.7.3.jar

Working Now, I included the the path as per document provided by AWS which is here

Need to change this path to aspectjweaver.jar which is inside aspectj-1.7.3\\lib

Now My New path is

-javaagent:"E:\eclipse-jee-juno-SR2-win32-x86_64\aws-java-sdk\aspectj-1.7.3\lib\aspectjweaver.jar"

and now working

[AppClassLoader@4f1799e7] info AspectJ Weaver Version 1.6.12 built on Tuesday Oct 18, 2011 at 17:52:06 GMT
[AppClassLoader@4f1799e7] info register classloader sun.misc.Launcher$AppClassLoader@4f1799e7
[AppClassLoader@4f1799e7] info using configuration /F:/AWS%20Workspace/HelloWorldWeb/build/classes/META-INF/aop.xml
[AppClassLoader@4f1799e7] info register aspect com.amazonaws.services.simpleworkflow.flow.aspectj.AsynchronousAspect
[AppClassLoader@4f1799e7] info register aspect com.amazonaws.services.simpleworkflow.flow.aspectj.ExponentialRetryAspect

and also include aspectj-1.7.3.jar

  1. Click Project Properties .
  2. Click AspectJ Build and then click the Aspect Path tab.
  3. Click Add External JARs .

Jar is at location

E:\eclipse-jee-juno-SR2-win32-x86_64\aws-java-sdk\aspectj-1.7.3.jar 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM