1 Reply Latest reply on Oct 4, 2005 2:19 AM by jacques_buitendag

    JCA compliance to JCA Specification (1.5)

    jacques_buitendag

      Greetings,

      I am using JBoss version 4.0.0 (the certified version) and I am picking up the following discrepancy.

      On the normal adaptor configuration I use a property to specify a temporary directory to use as a cache.

      The property name is [temporaryWorkingDirectory]

      If I deploy the adaptor I get the following error.
      {Detail Sanitised}

      org.jboss.deployment.DeploymentException: Error for resource adapter class xxx.AdaptorImplementation accessing property setter ConfigPropertyMetaData@3b0b1e[name=temporaryWorkingDirectory type=java.lang.String value=c:\temp\ descriptions=[DescriptionMetaData@1fe8714[language=en]]]; - nested throwable: (java.lang.NoSuchMethodException: xxx.AdaptorImplementation.settemporaryWorkingDirectory(java.lang.String))
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:39)
       at org.jboss.resource.deployment.ResourceAdapterFactory.createResourceAdapter(ResourceAdapterFactory.java:91)
       at org.jboss.resource.deployment.RARDeployment.startService(RARDeployment.java:101)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
       at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:110)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:416)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy26.start(Unknown Source)
       at org.jboss.deployment.SimpleSubDeployerSupport.startService(SimpleSubDeployerSupport.java:378)
       at org.jboss.deployment.SimpleSubDeployerSupport.start(SimpleSubDeployerSupport.java:141)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy8.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: java.lang.NoSuchMethodException: xxx.AdaptorImplementation.settemporaryWorkingDirectory(java.lang.String)
       at java.lang.Class.getMethod(Class.java:986)
       at org.jboss.resource.deployment.ResourceAdapterFactory.createResourceAdapter(ResourceAdapterFactory.java:82)
       ... 43 more
      

      But if I change the property name to [TemporaryWorkingDirectory] it works,
      but I get the following error form the Java Application Verification Kit.
      {Detail Sanitised}
      Test Name : tests.connector.CheckResourceAdapterJavaBean
      Test Assertion :
      Test Description : For [ ??????? Adapter ]
      Error: The resourceadapter-class [ xxx.AdaptorImplementation ] does not provide accessor methods for [ TemporaryWorkingDirectory ].
      

      The method is implemented as follows.
       /**
       *
       */
       public void setTemporaryWorkingDirectory(String directory) {
       this.temp = directory
       } // end method setTemporaryWorkingDirectory
      
       /**
       *
       */
       public String getTemporaryWorkingDirectory() {
       return this.temp;
       } // end method getTemporaryWorkingDirectory
      
      



      This seems to be a compliance issue?

      I have also tested this on JBoss version 4.0.2 and get the same results.

      Any thoughts or corrections on this would be appreciated.

      Kind Regards
      Jacques Buitedag


        • 1. JCA compliance to JCA Specification (1.5) Clarified
          jacques_buitendag

          Greetings,

          This is just to clarify the situation.

          With the deploy of the JCA adapter JBoss is looking for the method [settemporaryWorkingDirectory] and not the normal [setTemporaryWorkingDirectory]

          It seems that JBoss is not looking for the correct method as per JavaBean specification but is useing the configuration name directly, as is.

          Kind Regards
          Jacques Buitendag