2 Replies Latest reply on Jan 28, 2011 10:59 AM by maze A

    Error in deploying .aop file

    maze A Newbie

      I have installed the "jbossesb-4.9" in jboss-5.1.0.GA application server. whenever I try to deploy my aop file (LoggingAspect.aop) in "jboss-5.1.0.GA/server/all/deploy" folder, this error pops up:

       

      DEPLOYMENTS IN ERROR:

        Deployment "vfszip:/home/maazzzeeee/Desktop/jboss-5.1.0.GA/server/all/deploy/LoggingAspect.aop/" is in error due to the following reason(s): org.jboss.xb.binding.JBossXBRuntimeException: Failed to resolve schema nsURI= location=aop

       

                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)

                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)

                at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)

                at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)

                at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)

                at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)

                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)

                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                at java.lang.Thread.run(Thread.java:636)

       

      Do you have any idea?

      I am dealing with this problem for more that a week. I really appreciate any suggestion.


      Actually, I want to intercept "service actions" in the jbossesb services. before combining AS 5.1.0 and JbossESB-4.9, I tested it on the jboss-esb-server. But, in that configuration, I couldn't see any intereption.

       

      Sth that may be helpful: I successfully tested "injboss" sample of aop framework.

       

      This is my jboss-aop.xml file:

       

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

      <!-- -->

      <aop xmlns="urn:jboss:aop-beans:1.0">

        <interceptor name="LoggingAspect" class="org.jboss.soa.esb.samples.quickstart.helloworld.LoggingAspect"/>

        <bind pointcut="execution(* org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction->*(..))">

          <interceptor-ref name="LoggingAspect"/>

        </bind >

      </aop>

       

      And this is my /interceptor java code:

       

      package org.jboss.soa.esb.samples.quickstart.helloworld;

       

       

      import org.jboss.aop.advice.Interceptor;

      import org.jboss.aop.joinpoint.Invocation;

       

       

      import org.jboss.aop.joinpoint.ConstructorInvocation;

      import org.jboss.aop.joinpoint.FieldWriteInvocation;

      import org.jboss.aop.joinpoint.MethodInvocation;

       

       

      public class LoggingAspect implements Interceptor

      {

                @Override

                public String getName() {

                            return "LogInterceptor";

                }

       

                @Override

                public Object invoke(Invocation invocation) throws Throwable {

                            long time=System.currentTimeMillis();

                            try {

                              return invocation.invokeNext();

                            } finally

                            {

                                        time=System.currentTimeMillis()-time;

                                        if (invocation instanceof MethodInvocation) {

                                                   MethodInvocation mi = (MethodInvocation) invocation;

                                                    String clazz="";

                                                    try

                                              {

                                                      clazz=mi.getTargetObject().getClass().toString();

                                              }

                                              catch (Throwable e)

                                              {

                                                      // TODO

                                                    }

       

                                           }

                          }

      }

       

       

      }

       

      I also attached my aop file

       

      Thanks!

        • 1. Error in deploying .aop file
          Kabir Khan Master

          2 Problems:

           

          [kabir ~/Downloads]

          $unzip -l LoggingAspect.aop

          Archive:  LoggingAspect.aop

            Length     Date   Time    Name

          --------    ----   ----    ----

                  0  01-27-11 12:16   META-INF/

                 71  01-27-11 12:16   META-INF/MANIFEST.MF

            3436644  08-19-08 07:44   jboss-aop-jdk50-single.jar

                  0  01-27-11 11:50   classes/

                  0  01-27-11 11:50   classes/org/

                  0  01-27-11 11:50   classes/org/jboss/

                  0  01-27-11 11:50   classes/org/jboss/soa/

                  0  01-27-11 11:50   classes/org/jboss/soa/esb/

                  0  01-27-11 11:50   classes/org/jboss/soa/esb/samples/

                  0  01-27-11 11:50   classes/org/jboss/soa/esb/samples/quickstart/

                  0  01-27-11 12:12   classes/org/jboss/soa/esb/samples/quickstart/helloworld/

               1184  01-27-11 12:12   classes/org/jboss/soa/esb/samples/quickstart/helloworld/LoggingAspect.class

                577  01-27-11 11:50   META-INF/jboss-aop.xml

          --------                   -------

            3438476                   13 files

           

          1) jboss-aop-jdk50-single.jar should NOT be bundled with your application

           

           

          [kabir ~/Downloads]

          $unzip -p LoggingAspect.aop META-INF/jboss-aop.xml

          <aop>

             <aspect class="org.jboss.soa.esb.samples.quickstart.helloworld.LoggingAspect"/>

           

           

          <!-- 

             <bind pointcut="execution(raid.BankAccount->new(int))">

                <around aspect="raid.RaidAspect" name="log"/>

             </bind>

           

           

             <bind pointcut="execution(void bank.BankAccount->*(int))">

                <around aspect="raid.RaidAspect" name="log"/>

             </bind>

          --> 

             <bind pointcut="execution(* org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction->*(..))">

                <around aspect="org.jboss.soa.esb.samples.quickstart.helloworld.LoggingAspect" name="log"/>

             </bind>

          </aop>

           

           

          2) For deployment in AS your xml must use aop beans namespace, e.g.:

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

          <aop  xmlns="urn:jboss:aop-beans:1.0">

             <aspect class="org.jboss.soa.esb.samples.quickstart.helloworld.LoggingAspect"/>

           

           

          <!-- 

             <bind pointcut="execution(raid.BankAccount->new(int))">

                <around aspect="raid.RaidAspect" name="log"/>

             </bind>

           

           

             <bind pointcut="execution(void bank.BankAccount->*(int))">

                <around aspect="raid.RaidAspect" name="log"/>

             </bind>

          --> 

             <bind pointcut="execution(* org.jboss.soa.esb.samples.quickstart.helloworld.MyJMSListenerAction->*(..))">

                <around aspect="org.jboss.soa.esb.samples.quickstart.helloworld.LoggingAspect" name="log"/>

             </bind>

          </aop>

          • 2. Error in deploying .aop file
            maze A Newbie

            Thanks for your prompt reply.

             

            I fixed both of these issues. But, it seems still this is not solved.

             

            My steps after activating loadtimeweaving in the bootstrap (aop.xml):

            1. Putting the LoggingAspect.aop in the jboss-5.1.0.GA/server/all/deploy

            (also in the second case in jboss-5.1.0.GA/server/all/deployers/jboss-aop-jboss5.deployer)

            2. Putting Quickstart_helloworld.esb in the same folder

            3. running "ant runtest"

            The helloworld service works, but there is no interception.

             

            I updated the attachment of the first post with my new files.

             

            Thank you,

            Mehdi