Application Server 3  4  5 and 6
  1. Application Server 3 4 5 and 6
  2. JBAS-6888

aoptest.sar unable to deploy on IBM JDK - some aop tests failing

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: JBossAS-5.1.0.CR1
    • Fix Version/s: 6.0.0.M1
    • Component/s: Test Suite
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      IBM JDK 1.5 or 1.6
    • Similar Issues:
      Show 10 results 

      Description

      Several tests in the org.jboss.test.aop.test package fail due to aoptest.sar not being deployed properly.
      The failing tests include:
      org.jboss.test.aop.test.AOPUnitTestCase
      org.jboss.test.aop.test.JMXUnitTestCase
      org.jboss.test.aop.test.ObservableUnitTestCase
      org.jboss.test.aop.test.RemotingUnitTestCase
      org.jboss.test.aop.test.SecurityUnitTestCase
      org.jboss.test.aop.test.TxLockUnitTestCase
      org.jboss.test.aop.test.TxUnitTestCase
      org.jboss.test.aop.test.VersionedObjectUnitTestCase

      This is the junit report:
      Failed to deploy: file:/qa/services/hudson/hudson_workspace/workspace/eap5-as-rhel4-x86-ibm/src/jboss-5.1.0.CR1-src/testsuite/output/lib/aoptest.sar
      org.jboss.deployment.DeploymentException: Failed to deploy: file:/qa/services/hudson/hudson_workspace/workspace/eap5-as-rhel4-x86-ibm/src/jboss-5.1.0.CR1-src/testsuite/output/lib/aoptest.sar
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:838)
      at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:604)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:263)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
      at org.jboss.jmx.connector.invoker.SerializableInterceptor.invoke(SerializableInterceptor.java:74)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:180)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:855)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:422)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:309)
      at sun.rmi.transport.Transport$1.run(Transport.java:168)
      at java.security.AccessController.doPrivileged(AccessController.java:279)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:164)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:506)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTransport.java:838)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:912)
      at java.lang.Thread.run(Thread.java:810)
      Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

          • DEPLOYMENTS IN ERROR: Name -> Error

      vfszip:/qa/services/hudson/hudson_workspace/workspace/eap5-as-rhel4-x86-ibm/src/jboss-5.1.0.CR1-src/testsuite/output/lib/aoptest.sar/ -> org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.aop:name=ObservableTester

      DEPLOYMENTS IN ERROR:
      Deployment "vfszip:/qa/services/hudson/hudson_workspace/workspace/eap5-as-rhel4-x86-ibm/src/jboss-5.1.0.CR1-src/testsuite/output/lib/aoptest.sar/" is in error due to the following reason(s): java.lang.NullPointerException

      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.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:862)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:833)

      1. RunIt.java
        3 kB
        Kabir Khan
      2. server.log
        194 kB
        Martin Malina

        Issue Links

          Activity

          Hide
          Kabir Khan
          added a comment -

          Assuming that clazz.getDeclaringClass() is called only in the generated advisor constructor, in GeneratedAdvisorInstrumentor.createAdvisorCtors(), maybe the string should be something like the following

          protected void createAdvisorCtors(CtClass clazz)throws CannotCompileException, NotFoundException
          {
          String initBody =
          "

          {" + " java.lang.String domainName = org.jboss.aop.Domain.getDomainName(" + clazz.getName() + ".class, $2);" + " " + DOMAIN + "= new org.jboss.aop.GeneratedAdvisorDomain($1, domainName, " + clazz.getName() + ".class, $2); " + " ((org.jboss.aop.Domain)" + DOMAIN + ").setInheritsBindings(true); " + " super.initialise(" + clazz.getName() + ".class, " + DOMAIN + ");" + "}

          ";
          }

          instead of
          protected void createAdvisorCtors(CtClass clazz)throws CannotCompileException, NotFoundException
          {
          String initBody =
          "

          {" + " java.lang.String domainName = org.jboss.aop.Domain.getDomainName(" + DECLARING_CLASS + ", $2);" + " " + DOMAIN + "= new org.jboss.aop.GeneratedAdvisorDomain($1, domainName, " + DECLARING_CLASS + ", $2); " + " ((org.jboss.aop.Domain)" + DOMAIN + ").setInheritsBindings(true); " + " super.initialise(" + DECLARING_CLASS + ", " + DOMAIN + ");" + "}

          ";
          }

          Show
          Kabir Khan
          added a comment - Assuming that clazz.getDeclaringClass() is called only in the generated advisor constructor, in GeneratedAdvisorInstrumentor.createAdvisorCtors(), maybe the string should be something like the following protected void createAdvisorCtors(CtClass clazz)throws CannotCompileException, NotFoundException { String initBody = " {" + " java.lang.String domainName = org.jboss.aop.Domain.getDomainName(" + clazz.getName() + ".class, $2);" + " " + DOMAIN + "= new org.jboss.aop.GeneratedAdvisorDomain($1, domainName, " + clazz.getName() + ".class, $2); " + " ((org.jboss.aop.Domain)" + DOMAIN + ").setInheritsBindings(true); " + " super.initialise(" + clazz.getName() + ".class, " + DOMAIN + ");" + "} "; } instead of protected void createAdvisorCtors(CtClass clazz)throws CannotCompileException, NotFoundException { String initBody = " {" + " java.lang.String domainName = org.jboss.aop.Domain.getDomainName(" + DECLARING_CLASS + ", $2);" + " " + DOMAIN + "= new org.jboss.aop.GeneratedAdvisorDomain($1, domainName, " + DECLARING_CLASS + ", $2); " + " ((org.jboss.aop.Domain)" + DOMAIN + ").setInheritsBindings(true); " + " super.initialise(" + DECLARING_CLASS + ", " + DOMAIN + ");" + "} "; }
          Hide
          Flavia Rainone
          added a comment -

          I've tested Kabir suggestion and it works. Following Kabir's instructions, I'm creating a JBAOP associated with this Jira for the implementation of Kabir's fix.

          Show
          Flavia Rainone
          added a comment - I've tested Kabir suggestion and it works. Following Kabir's instructions, I'm creating a JBAOP associated with this Jira for the implementation of Kabir's fix.
          Hide
          Shelly McGowan
          added a comment -

          I've upgraded my local workspace to use AOP 2.1.2.GA and still issues with aoptest.sar. Specifically,
          2009-06-22 14:26:49,566 INFO [org.jboss.test.aop.bean.AOPTester] (HDScanner) RUNNING TEST BASIC
          2009-06-22 14:26:49,567 ERROR [org.jboss.test.aop.bean.AOPTester] (HDScanner) failed
          java.lang.RuntimeException: POJO is not instanceof Advised
          at org.jboss.test.aop.bean.AOPTester.testBasic(AOPTester.java:110)
          at org.jboss.test.aop.bean.AOPTester.startService(AOPTester.java:83)

          I'll look at all the tests in the description of this JIRA to see what errors are now being encountered.

          Show
          Shelly McGowan
          added a comment - I've upgraded my local workspace to use AOP 2.1.2.GA and still issues with aoptest.sar. Specifically, 2009-06-22 14:26:49,566 INFO [org.jboss.test.aop.bean.AOPTester] (HDScanner) RUNNING TEST BASIC 2009-06-22 14:26:49,567 ERROR [org.jboss.test.aop.bean.AOPTester] (HDScanner) failed java.lang.RuntimeException: POJO is not instanceof Advised at org.jboss.test.aop.bean.AOPTester.testBasic(AOPTester.java:110) at org.jboss.test.aop.bean.AOPTester.startService(AOPTester.java:83) I'll look at all the tests in the description of this JIRA to see what errors are now being encountered.
          Hide
          Kabir Khan
          added a comment -

          Having run the standalone AOP tests on the IBM JDK, it seems to be more problems with Class.getDeclaringClass(). I wrote a simple test in RunIt.java, which works as expected both for Class.getDeclaringClass() and Class.getEnclosingClass() on both Sun and IBM JVMs

          From what I can see though, the places where we actually make these calls is on generated classes (i.e. the Advisors), and these methods are native, so maybe it is getting confused somehow because the classes did not exist when the classloader was initialised. I will see if I can fix it.

          Does anybody know of a reliable way to determine from java if running in IBMs JDK?

          Show
          Kabir Khan
          added a comment - Having run the standalone AOP tests on the IBM JDK, it seems to be more problems with Class.getDeclaringClass(). I wrote a simple test in RunIt.java, which works as expected both for Class.getDeclaringClass() and Class.getEnclosingClass() on both Sun and IBM JVMs From what I can see though, the places where we actually make these calls is on generated classes (i.e. the Advisors), and these methods are native, so maybe it is getting confused somehow because the classes did not exist when the classloader was initialised. I will see if I can fix it. Does anybody know of a reliable way to determine from java if running in IBMs JDK?
          Hide
          Shelly McGowan
          added a comment -

          Resolved with JBoss AOP 2.1.3.GA and MC 2.0.8.GA

          Show
          Shelly McGowan
          added a comment - Resolved with JBoss AOP 2.1.3.GA and MC 2.0.8.GA

            People

            • Assignee:
              Flavia Rainone
              Reporter:
              Martin Malina
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: