Hi,

I work on eclipse. I've configure an interceptor in my program. In a following 
time, I make the war of the project and I execute the run.bat file of the Jboss 
server. I have these Errors at runtime.

Caused by: java.lang.IllegalArgumentException
        at 
sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(UnsafeStaticObjectFieldAccessorImpl.java:61)
        at java.lang.reflect.Field.set(Field.java:656)
        at 
org.jboss.aop.ClassAdvisor.initializeMethodChain(ClassAdvisor.java:464)
        at 
org.jboss.aop.ClassAdvisor.createInterceptorChains(ClassAdvisor.java:594)
        at org.jboss.aop.ClassAdvisor.access$300(ClassAdvisor.java:82)
        at org.jboss.aop.ClassAdvisor$1.run(ClassAdvisor.java:299)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.aop.ClassAdvisor.attachClass(ClassAdvisor.java:271)
        at 
org.jboss.aop.AspectManager.initialiseClassAdvisor(AspectManager.java:591)
        at org.jboss.aop.AspectManager.getAdvisor(AspectManager.java:579)
        at 
com.fitnetapplication.bilan.service.BilanCongesServiceImpl.(BilanCongesServiceImpl.java)

Caused by: org.apache.jasper.JasperException

So, I went to the UnsafeStaticObjectFieldAccessorImpl class source (.java) and 
looked at the line 61.
Here is the code :
 

protected TLongObjectHashMap initializeMethodChain()
   {
      TLongObjectHashMap newInterceptors = new TLongObjectHashMap();
      long[] keys = advisedMethods.keys();
      for (int i = 0; i < keys.length; i++)
      {
         // Keep compatible with AOP 1.3.x until AOP 2.0 is FINAL 
         MethodInfo info = new MethodInfo();
         Method amethod = (Method) advisedMethods.get(keys);
         info.setAdvisedMethod(amethod);
         Method umethod = (Method) unadvisedMethods.get(keys);

         if (umethod == null) umethod = amethod;
         info.setUnadvisedMethod(umethod);
         info.setHash(keys);
         info.setAdvisor(this);
         newInterceptors.put(keys, info);
         try
         {
            Field infoField = 
clazz.getDeclaredField(MethodExecutionTransformer.getMethodInfoFieldName(amethod.getName(),
 keys));
            infoField.setAccessible(true);
            infoField.set(null, new WeakReference(info));
         }
         catch (NoSuchFieldException e)
         {
            // ignore, method may not be advised.
         }
         catch (IllegalAccessException e)
         {
            throw new RuntimeException(e);  //To change body of catch statement 
use Options | File Templates.
         }
      }
      return newInterceptors;
   }

It's the last line inside the try block which make the IllegalArgumentException.



I use the jboss server -4.0.5.GA and Jdk 1.5.0_06. I disabled the AOP builder 
from my java project in eclipse, I cleaned the project, and deployed it using 
with EnableLoadTimeWeaving= true. I have followed each advice in the reference 
tutorial and the user'guide.

I stay on these errors and I don't arrive resolve it. 

Could I have some help please ?

Thank you 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049663#4049663

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049663
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to