7 Replies Latest reply on Nov 28, 2002 2:08 AM by davidjencks

    JBoss and IBM CICS Transaction Gateway

    afischb2

      Hi!
      I have an IBM supplied RAR for accessing their CICS Host system. When I put the rar file in the deploy dir, JBoss deploys it, but what is wrong with my ibmctg-service.xml? Here are the ibmctg-service.xml, JBoss Stack Trace and the ra.xml.
      Thanks for help!
      Alex

      #######################################################
      ibmctg-service.xml
      #######################################################
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration for the IBM CTG Resource Adapter -->
      <!-- -->
      <!-- ===================================================================== -->


      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->

      ibmctg


      <config-property name="ServerName" type="java.lang.String"></config-property>
      <config-property name="ConnectionURL" type="java.lang.String"></config-property>
      <config-property name="PortNumber" type="java.lang.String">2006</config-property>
      <config-property name="UserName" type="java.lang.String"></config-property>
      <config-property name="Password" type="java.lang.String"></config-property>
      <config-property name="ClientSecurity" type="java.lang.String"></config-property>
      <config-property name="ServerSecurity" type="java.lang.String"></config-property>
      <config-property name="KeyRingClass" type="java.lang.String"></config-property>
      <config-property name="KeyRingPassword" type="java.lang.String"></config-property>
      <config-property name="TranName" type="java.lang.String"></config-property>
      <config-property name="TPNName" type="java.lang.String"></config-property>
      <config-property name="TraceLevel" type="java.lang.Integer">1</config-property>


      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=ECIResourceAdapter


      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->

      1
      100
      2000
      10
      ByContainer


      jboss.jca:service=RARDeployer



      #######################################################
      JBoss Stack Trace
      #######################################################
      20:23:05,682 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/depl
      oy/ibmctg-service.xml
      20:23:05,732 WARN [ServiceController] jboss.jca:service=LocalTXDS,name=ECIResourceAdapter does not implement any Servic
      e methods
      20:23:05,742 INFO [JBossManagedConnectionPool] Creating
      20:23:05,752 INFO [JBossManagedConnectionPool] Created
      20:23:05,752 INFO [LocalTxConnectionManager] Creating
      20:23:05,792 INFO [LocalTxConnectionManager] Created
      20:23:05,802 INFO [JBossManagedConnectionPool] Starting
      20:23:05,802 INFO [JBossManagedConnectionPool] Started
      20:23:05,822 INFO [LocalTxConnectionManager] Starting
      20:23:05,842 ERROR [LocalTxConnectionManager] Starting failed
      java.lang.NullPointerException
      at javax.naming.InitialContext.getURLScheme(InitialContext.java:224)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:273)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.startService(LocalTxConnectionManager.java:177)

      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:648)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:499)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:21
      2)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
      20:23:06,123 WARN [ServiceController] Problem starting service jboss.jca:service=LocalTxCM,name=ECIResourceAdapter
      java.lang.NullPointerException
      at javax.naming.InitialContext.getURLScheme(InitialContext.java:224)
      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:273)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.startService(LocalTxConnectionManager.java:177)

      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:397)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:648)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:499)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:21
      2)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)

      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
      20:23:06,403 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/ibmctg-serv
      ice.xml
      20:23:06,453 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=LocalTxCM,name=ECIResourceAdapter
      state: FAILED
      I Depend On: jboss.jca:service=LocalTXDS,name=ECIResourceAdapter
      jboss.jca:service=LocalTxPool,name=ECIResourceAdapter
      jboss.jca:service=RARDeployer

      Depends On Me: java.lang.NullPointerException]

      #######################################################
      ra.xml
      #######################################################
      <!DOCTYPE connector (View Source for full doctype...)>
      -
      <display-name>ECIResourceAdapter</display-name>
      CICS J2EE ECI Resource Adapter
      <vendor-name>IBM</vendor-name>
      <spec-version>1.0</spec-version>
      <eis-type>CICS</eis-type>
      5.0.0
      -

      <license-required>true</license-required>

      -
      <managedconnectionfactory-class>com.ibm.connector2.cics.ECIManagedConnectionFactory</managedconnectionfactory-class>
      <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
      <connectionfactory-impl-class>com.ibm.connector2.cics.ECIConnectionFactory</connectionfactory-impl-class>
      <connection-interface>javax.resource.cci.Connection</connection-interface>
      <connection-impl-class>com.ibm.connector2.cics.ECIConnection</connection-impl-class>
      <transaction-support>LocalTransaction</transaction-support>
      - <config-property>
      ServerName
      <config-property-name>ServerName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      ConnectionURL
      <config-property-name>ConnectionURL</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      PortNumber
      <config-property-name>PortNumber</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value>2006</config-property-value>
      </config-property>
      - <config-property>
      UserName
      <config-property-name>UserName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      Password
      <config-property-name>Password</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      ClientSecurity
      <config-property-name>ClientSecurity</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      ServerSecurity
      <config-property-name>ServerSecurity</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      KeyRingClass
      <config-property-name>KeyRingClass</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      KeyRingPassword
      <config-property-name>KeyRingPassword</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      TranName
      <config-property-name>TranName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      TPNName
      <config-property-name>TPNName</config-property-name>
      <config-property-type>java.lang.String</config-property-type>
      <config-property-value />
      </config-property>
      - <config-property>
      TraceLevel
      <config-property-name>TraceLevel</config-property-name>
      <config-property-type>java.lang.Integer</config-property-type>
      <config-property-value>1</config-property-value>
      </config-property>
      - <authentication-mechanism>

      <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
      <credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
      </authentication-mechanism>
      <reauthentication-support>true</reauthentication-support>
      - <security-permission>
      <security-permission-spec>grant { permission java.net.SocketPermission "*", "resolve"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.util.PropertyPermission "*", "read, write"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.io.FilePermission "${user.home}${file.separator}ibm${file.separator}ctg${file.separator}-", "read,write,delete"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "loadLibrary.*"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "shutdownHooks"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "modifyThread"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "modifyThreadGroup"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "readFileDescriptor"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.lang.RuntimePermission "writeFileDescriptor"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.security.SecurityPermission "putProviderProperty.IBMJSSE"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission java.security.SecurityPermission "insertProvider.IBMJSSE"; };</security-permission-spec>
      </security-permission>
      - <security-permission>
      <security-permission-spec>grant { permission javax.security.auth.PrivateCredentialPermission "javax.resource.spi.security.PasswordCredential * \"*\" ","read"; };</security-permission-spec>
      </security-permission>


        • 1. Re: JBoss and IBM CICS Transaction Gateway
          davidjencks

          You are missing at least the cached connection manager depends element and the tx manager element.

          • 2. Re: JBoss and IBM CICS Transaction Gateway
            afischb2

            Hi David,
            thanks a lot!
            JBoss try to deploy it, but misses service methods which are not implemented in the resource adapter?!
            Does this mean, that this IBM CTG Version 5 Resource Adapter is not JCA compliant??


            #######################################################
            ibmctg-service.xml
            #######################################################
            <?xml version="1.0" encoding="UTF-8"?>
            <!-- ===================================================================== -->
            <!-- -->
            <!-- JBoss Server Configuration for the IBM CTG Resource Adapter -->
            <!-- -->
            <!-- ===================================================================== -->


            <depends optional-attribute-name="ManagedConnectionFactoryName">
            <!--embedded mbean-->

            ibmctg


            <config-property name="ServerName" type="java.lang.String"></config-property>
            <config-property name="ConnectionURL" type="java.lang.String"></config-property>
            <config-property name="PortNumber" type="java.lang.String">2006</config-property>
            <config-property name="UserName" type="java.lang.String"></config-property>
            <config-property name="Password" type="java.lang.String"></config-property>
            <config-property name="ClientSecurity" type="java.lang.String"></config-property>
            <config-property name="ServerSecurity" type="java.lang.String"></config-property>
            <config-property name="KeyRingClass" type="java.lang.String"></config-property>
            <config-property name="KeyRingPassword" type="java.lang.String"></config-property>
            <config-property name="TranName" type="java.lang.String"></config-property>
            <config-property name="TPNName" type="java.lang.String"></config-property>
            <config-property name="TraceLevel" type="java.lang.Integer">1</config-property>


            <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=ECIResourceAdapter


            <depends optional-attribute-name="ManagedConnectionPool">
            <!--embedded mbean-->

            1
            100
            2000
            10
            ByContainer


            <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
            jboss.jca:service=RARDeployer
            java:/TransactionManager




            #######################################################
            JBoss Stack Trace
            #######################################################
            09:55:47,401 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/depl
            oy/cicseci.rar
            09:55:47,532 INFO [RARMetaData] Loading CICS J2EE ECI Resource Adapter
            09:55:47,532 INFO [RARMetaData] Required license terms present. See deployment descriptor.
            09:55:47,532 INFO [RARMetaData] Loading
            09:55:47,972 WARN [ServiceController] jboss.jca:service=RARDeployment,name=ECIResourceAdapter does not implement any Se
            rvice methods
            09:55:47,992 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/cicseci.rar

            09:56:18,065 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/depl
            oy/ibmctg-service.xml
            09:56:18,136 WARN [ServiceController] jboss.jca:service=LocalTXDS,name=ECIResourceAdapter does not implement any Servic
            e methods
            09:56:18,146 INFO [JBossManagedConnectionPool] Creating
            09:56:18,156 INFO [JBossManagedConnectionPool] Created
            09:56:18,156 INFO [LocalTxConnectionManager] Creating
            09:56:18,176 INFO [LocalTxConnectionManager] Created
            09:56:18,176 INFO [JBossManagedConnectionPool] Starting
            09:56:18,186 INFO [JBossManagedConnectionPool] Started
            09:56:18,186 INFO [LocalTxConnectionManager] Starting
            09:56:18,326 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedUR
            L@4b75c92e{ url=file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/ibmctg-service.xml, deployedLastModified=0 }
            org.jboss.deployment.DeploymentException: Could not create deployment: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default
            /deploy/ibmctg-service.xml; - nested throwable: (java.lang.IllegalAccessError: tried to access method com.ibm.connector2
            .cics.CICSManagedConnectionFactory.getLogHelper()Lcom/ibm/connector2/cics/CICSLogHelper; from class com.ibm.connector2.c
            ics.ECIManagedConnectionFactory)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:822)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy4.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:427)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:648)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:499)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:21
            2)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:225)

            at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:202)
            Caused by: java.lang.IllegalAccessError: tried to access method com.ibm.connector2.cics.CICSManagedConnectionFactory.get
            LogHelper()Lcom/ibm/connector2/cics/CICSLogHelper; from class com.ibm.connector2.cics.ECIManagedConnectionFactory
            at com.ibm.connector2.cics.ECIManagedConnectionFactory.createConnectionFactory(ECIManagedConnectionFactory.java:
            119)
            at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnectionFactory(RARDeployment.java:578)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.resource.connectionmanager.BaseConnectionManager2.startService(BaseConnectionManager2.java:382)
            at org.jboss.resource.connectionmanager.LocalTxConnectionManager.startService(LocalTxConnectionManager.java:179)

            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
            at $Proxy5.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:397)
            at org.jboss.system.ServiceController.start(ServiceController.java:417)
            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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy3.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
            ... 15 more

            • 3. Re: JBoss and IBM CICS Transaction Gateway
              davidjencks

              the "warning" about service methods is useless and highly misleading, I just removed it from cvs.

              The problem appears to be the IllegalAccessError. Presumably IBM could compile and run this in some environment, so I suspect the problem is not with their code. This kind of problem can occur if there is more than one copy of a class loaded in jboss. Can you check their packaged stuff to see if either of the classes mentioned occurs in two jar files, or if it is loaded from somewhere else in your system?

              Thanks
              david jencks

              • 4. Re: JBoss and IBM CICS Transaction Gateway
                afischb2

                Hi David!
                The IBM rar-file is a container of 5 jar-files and the rar deployment descriptor.
                Does jboss load each jar-file of the rar-file in a seperate classloader that causes the IllegalAccesException by calling a method from a class A in jar-file1 to a class B in jar-file2?
                When I exctract the 5 jar-files and pack it all together (including the rar deployment descriptor) into one rar-file the deployment works!

                • 5. Re: JBoss, IBM CTG and JNDI
                  afischb2

                  Hi David!

                  Now the Resource Adapter ca be deployed under JBoss.
                  JBoss bounds it to JNDI name 'java:/IBMCTG'.
                  But the lookup to it is not successfully.
                  See the service.xml, JBoss StackTrace, Code Source for lookup and the Exception Stack Trace below.
                  What's wrong?

                  Greeting Alex


                  #######################################################
                  ibmctg-service.xml
                  #######################################################
                  <?xml version="1.0" encoding="UTF-8"?>
                  <!-- ===================================================================== -->
                  <!-- -->
                  <!-- JBoss Server Configuration for the IBM CTG Resource Adapter -->
                  <!-- -->
                  <!-- ===================================================================== -->


                  <depends optional-attribute-name="ManagedConnectionFactoryName">
                  <!--embedded mbean-->

                  IBMCTG


                  <config-property name="ServerName" type="java.lang.String"></config-property>
                  <config-property name="ConnectionURL" type="java.lang.String"></config-property>
                  <config-property name="PortNumber" type="java.lang.String">2006</config-property>
                  <config-property name="UserName" type="java.lang.String"></config-property>
                  <config-property name="Password" type="java.lang.String"></config-property>
                  <config-property name="ClientSecurity" type="java.lang.String"></config-property>
                  <config-property name="ServerSecurity" type="java.lang.String"></config-property>
                  <config-property name="KeyRingClass" type="java.lang.String"></config-property>
                  <config-property name="KeyRingPassword" type="java.lang.String"></config-property>
                  <config-property name="TranName" type="java.lang.String"></config-property>
                  <config-property name="TPNName" type="java.lang.String"></config-property>
                  <config-property name="TraceLevel" type="java.lang.Integer">1</config-property>


                  <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=ECIResourceAdapter


                  <depends optional-attribute-name="ManagedConnectionPool">
                  <!--embedded mbean-->

                  1
                  100
                  2000
                  10
                  ByContainer


                  <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
                  java:/TransactionManager
                  jboss.jca:service=RARDeployer



                  #######################################################
                  JBoss Stack Trace - Deploying the Resource Adapter and the service.xml
                  #######################################################
                  12:31:51,866 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/depl
                  oy/cicseci.rar
                  12:31:52,086 INFO [RARMetaData] Loading CICS J2EE ECI Resource Adapter
                  12:31:52,086 INFO [RARMetaData] Required license terms present. See deployment descriptor.
                  12:31:52,096 INFO [RARMetaData] Loading
                  12:31:52,136 WARN [ServiceController] jboss.jca:service=RARDeployment,name=ECIResourceAdapter does not implement any Se
                  rvice methods
                  12:31:52,166 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/cicseci.rar

                  12:32:02,211 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/depl
                  oy/ibmctg-service.xml
                  12:32:02,271 WARN [ServiceController] jboss.jca:service=LocalTXDS,name=ECIResourceAdapter does not implement any Servic
                  e methods
                  12:32:02,281 INFO [JBossManagedConnectionPool] Creating
                  12:32:02,291 INFO [JBossManagedConnectionPool] Created
                  12:32:02,291 INFO [LocalTxConnectionManager] Creating
                  12:32:02,311 INFO [LocalTxConnectionManager] Created
                  12:32:02,321 INFO [JBossManagedConnectionPool] Starting
                  12:32:02,321 INFO [JBossManagedConnectionPool] Started
                  12:32:02,331 INFO [LocalTxConnectionManager] Starting
                  12:32:02,451 INFO [IBMCTG] Bound connection factory for resource adapter 'ECIResourceAdapter' to JNDI name 'java:/IBMCT
                  G'
                  12:32:02,461 INFO [LocalTxConnectionManager] Started
                  12:32:02,471 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.3_tomcat-4.1.12/server/default/deploy/ibmctg-serv
                  ice.xml

                  #######################################################
                  Code Source for lookup
                  #######################################################
                  Hashtable env = new Hashtable();
                  env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                  env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                  env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                  InitialContext ctx = new InitialContext(env);
                  Context envCtx = (Context) ctx.lookup("java:");
                  cf = (ConnectionFactory) envCtx.lookup("IBMCTG");

                  #######################################################
                  Exception
                  #######################################################
                  Lookup for IBMCTG failed. Exception:
                  com.csc.k3.service.k3.K3ServiceException: Lookup for IBMCTG failed. Exception:
                  --> (javax.naming.NameNotFoundException: IBMCTG not bound)
                  at test.service.K3JCACTGECIConnectorClass.getConnection(K3JCACTGECIConnectorClass.java:120)
                  at test.service.K3JCACTGECIConnectorClass.callProgram(K3JCACTGECIConnectorClass.java:247)
                  at test.service.K3TestClient.testServiceLayer(K3TestClient.java:213)
                  at test.service.K3TestClient.main(K3TestClient.java:39)
                  Caused by: javax.naming.NameNotFoundException: IBMCTG not bound
                  at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
                  at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
                  at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
                  at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                  at sun.rmi.transport.Transport$1.run(Transport.java:148)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                  at java.lang.Thread.run(Thread.java:536)
                  at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
                  at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
                  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
                  at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
                  at test.service.K3JCACTGECIConnectorClass.getConnection(K3JCACTGECIConnectorClass.java:114)
                  ... 3 more
                  Original error was:
                  javax.naming.NameNotFoundException: IBMCTG not bound
                  at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
                  at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
                  at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
                  at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
                  at sun.rmi.transport.Transport$1.run(Transport.java:148)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
                  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                  at java.lang.Thread.run(Thread.java:536)
                  at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
                  at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
                  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
                  at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
                  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
                  at test.service.K3JCACTGECIConnectorClass.getConnection(K3JCACTGECIConnectorClass.java:114)
                  at test.service.K3JCACTGECIConnectorClass.callProgram(K3JCACTGECIConnectorClass.java:247)
                  at test.service.K3TestClient.testServiceLayer(K3TestClient.java:213)
                  at test.service.K3TestClient.main(K3TestClient.java:39)

                  • 6. Re: JBoss, IBM CTG and JNDI
                    afischb2

                    Hi David!
                    I solved the JNDI problem.
                    I am very sorry, but it was my fault!

                    However I would like you to answer the classloader question.
                    Thanks a lot!

                    • 7. Re: JBoss, IBM CTG and JNDI
                      davidjencks

                      Glad you got the jndi problem straightened out.

                      I recently found out (from Scott Stark) that the illegal access problem can occur when several jars reference one library jar using their manifest classpaths. The result is that one class can appear to be loaded by more than one ClassLoader. Scott is working on a fix for this problem.