3 Replies Latest reply on Nov 19, 2004 10:33 AM by Antonio

    Problem connecting AS400

    Antonio Newbie

      I've always used Jboss 3.0.7. To connect AS/400 from my application following data source works perfectly.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      
      <!-- LIMS datasource connections -->
      
      <server>
      
       <classpath codebase="lib" archives="jt400.jar, classes12.zip, nls_charset12.jar"/>
      
       <!-- ========= -->
       <!-- limsDS_03 DEMOENG ENVIRONMENT-->
       <!-- ========= -->
       <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=limsDS_03">
      
       <depends optional-attribute-name="ManagedConnectionFactoryName">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=limsDS_03">
      
       <attribute name="JndiName">ilogistics/lims/defaultDS_03</attribute>
      
       <attribute name="ManagedConnectionFactoryProperties">
       <properties>
       <config-property name="ConnectionURL" type="java.lang.String">jdbc:as400://DCSNL1;naming=system;libraries=*LIBL</config-property>
       <config-property name="DriverClass" type="java.lang.String">com.ibm.as400.access.AS400JDBCDriver</config-property>
       <config-property name="UserName" type="java.lang.String">USER</config-property>
       <config-property name="Password" type="java.lang.String">PASSWORD</config-property>
       </properties>
      
       </attribute>
      
      <!--Below here are advanced properties -->
       <!--hack-->
       <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
      
       </mbean>
       </depends>
      
       <depends optional-attribute-name="ManagedConnectionPool">
       <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=limsDS_03">
      
       <attribute name="MinSize">0</attribute>
       <attribute name="MaxSize">50</attribute>
       <attribute name="BlockingTimeoutMillis">5000</attribute>
       <attribute name="IdleTimeoutMinutes">15</attribute>
       <!--criteria indicates if Subject (from security domain) or app supplied
       parameters (such as from getConnection(user, pw)) are used to distinguish
       connections in the pool. Choices are
       ByContainerAndApplication (use both),
       ByContainer (use Subject),
       ByApplication (use app supplied params only),
       ByNothing (all connections are equivalent, usually if adapter supports
       reauthentication)-->
       <attribute name="Criteria">ByContainer</attribute>
       </mbean>
      
       </depends>
       <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
      
       <!--
       <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
       -->
      
       <attribute name="TransactionManager">java:/TransactionManager</attribute>
       <!--make the rar deploy! hack till better deployment-->
       <depends>jboss.jca:service=RARDeployer</depends>
      
       </mbean>
       <!-- ========= -->
       <!-- limsDS_03 -->
       <!-- ========= -->
      </server>
      


      Now I desided to step over to Jboss 3.2.3 (It was good idea :-))
      OK . Using the examples I 've changed the datasource as following:

      <datasources>
      
       <local-tx-datasource>
       <jndi-name>ilogistics/lims/defaultDS_03</jndi-name>
       <connection-url>jdbc:as400://dcsnl</connection-url>
       <connection-property name="libraries">*LIBL</connection-property>
       <connection-property name="naming">system</connection-property>
       <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
       <user-name>USER</user-name>
       <password>PASSWORD</password>
       </local-tx-datasource>
      
      </datasources>
      


      But this data source does not work for me
      After Jboss has been started I see following error messages in the logging:



      2004-11-15 10:53:56,218 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml
      2004-11-15 10:53:56,234 INFO [org.jboss.deployment.MainDeployer] deployment waiting for deployer: file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml
      2004-11-15 10:53:56,234 INFO [org.jboss.deployment.MainDeployer] Deployment of package: file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml is waiting for an appropriate deployer.
      2004-11-15 10:53:56,234 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:
      [org.jboss.deployment.DeploymentInfo@9b7c27ac { url=file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml
      lastDeployed: 1100512436234
      lastModified: 1100512436234
      mbeans:
      ]Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@9b7c27ac { url=file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/jboss-3.2.3/server/default/deploy/defaultds03.xml
      lastDeployed: 1100512436234
      lastModified: 1100512436234
      mbeans:
      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:


      2004-11-15 10:53:56,234 INFO [org.jboss.deployment.scanner.URLDeploymentScanner] Started jboss.deployment:type=DeploymentScanner,flavor=URL
      2004-11-15 10:53:56,296 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/default/conf/jboss-service.xml
      2004-11-15 10:53:56,390 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 28s:328ms



      What do I wrong or may be I am missing some kind of set-up???

      Regards

        • 1. Re: Problem connecting AS400
          john m flinchbaugh Newbie

          i believe your datasource descriptors should be named *-ds.xml for the deployer to recognize it as a datasource.

          • 2. Re: Problem connecting AS400
            Derick Newbie

            sorry did`nt have time to check your prob, but this code works on my as/400.

            hope it helps

             <?xml version="1.0" encoding="UTF-8" ?>
            - <datasources>
            - <local-tx-datasource>
             <jndi-name>as400</jndi-name>
             <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
             <connection-url>jdbc:as400://IP ADDRESS;block size=128;extended dynamic=true;package=JBOSS;package cache=true;package library=QGPL</connection-url>
             <connection-property name="libraries">LIB</connection-property>
             <connection-property name="naming">sql</connection-property>
             <connection-property name="user">USER</connection-property>
             <connection-property name="password">PASSWORD</connection-property>
             <connection-property name="access">all</connection-property>
             <connection-property name="char.encoding">UTF-8</connection-property>
             <application-managed-security />
             </local-tx-datasource>
             </datasources>
            


            • 3. Re: Problem connecting AS400
              Antonio Newbie

              Thanx jflinchbaugh . Name of a datasource descriptors caused that problem.