0 Replies Latest reply on Oct 29, 2007 3:31 AM by Giuseppe Moscardelli

    Problems with installation and deployment of jboss aop

    Giuseppe Moscardelli Newbie

      Hi I'm been trying for a week to run a web service with jboss aop on jboss, but I've a lot of problem.

      1)I've followed the installation guide of jboss 1.5.6 on jboss4.2.1 for jdk5.0. I've copied the directory "C:\jboss-aop_1.5.6.GA\jboss-40-install\jboss-aop-jdk50.deployer" in the directory "C:\jboss-4.2.1.GA\server\default\deploy\jboss-aop-jdk50.deployer";

      2) I've removed the file common-softvaluehashmap.jar from "C:\jboss-4.2.1.GA\server\default\deploy\jboss-aop-jdk50.deployer";

      3)I've moved the file javassist.jar from "C:\jboss-4.2.1.GA\server\default\deploy\jboss-aop-jdk50.deployer" to C:\jboss-4.2.1.GA\server\default\lib;

      4) I've setted "true" and "true" in the file "C:\jboss-4.2.1.GA\server\default\deploy\jboss-aop-jdk50.deployer\META-INF\jboss-service.xml"

      5) I've copied the file pluggable-instrumentor.jar of the directory "C:\jboss-aop_1.5.6.GA\lib-50" to "C:\jboss-4.2.1.GA\bin" ant I've added the following line in the run.bat : "set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -javaagent:pluggable-instrumentor.jar";

      6) I've created a *.aop file with this structure:
      *directory META-INF with this jboss-aop.xml:
      Code:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>









      *directory servizio with the class:
      -ServizioInterceptor.class (My interceptor)
      -Servizio$somma_N33762007832218886856.class (class generated by jboss aop ide in eclipse)

      7)The war file of my web service (in this war I've included also the fille:
      Servizio$somma_N33762007832218886856.class

      When I start jboss I've not errors but when I invoke a method of the web service jboss print this error:
      Code:

      09:07:38,363 ERROR [[Servizio]] Servlet.service() for servlet Servizio threw exception
      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 servizio.Servizio.(Servizio.java)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java
      :27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at java.lang.Class.newInstance0(Class.java:350)
      at java.lang.Class.newInstance(Class.java:303)
      at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.getTargetBean(DefaultInvocationHandler.
      java:75)
      at org.jboss.wsf.container.jboss42.DefaultInvocationHandler.invoke(DefaultInvocationHandler.java:90
      )
      at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
      at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
      at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
      )
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235
      )
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)

      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)




      What does this error mean? How can I resolve?


      I've configured correctly jbossaop on jboss?
      But above all, how can I run my aop on my web service? This last question it's the most important because without aop run I cannot work on my project and I'm been blocking on these errors for a week.
      Please help me, thanks.
      Bye Bye.