2 Replies Latest reply on Aug 21, 2002 6:37 PM by David Jencks

    3.0.1 and postgresql

    garyg Novice

      I've just stepped up from 2.4.4 to 3.0.1 and can't find anything but a few posts on on how to configure postgresql as a datasource so not sure if I've gotten everything.

      So far I've ...
      1. added and edited the ~/server/default/deploy/postgres-service.xml
      2. added and edited ~/server/default/deploy/postgres-ds.xml.
      3. added jdbc7.0-1.2.jar to ~/server/default/deploy.

      --- problems from the output.

      23:48:56,272 DEBUG [ServiceController] Starting dependent components: [ObjectName: jboss.jca:service=LocalTxDS,name=hsqldbDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      jboss:service=Hypersonic

      Depends On Me: jboss.jca:service=LocalTxCM,name=hsqldbDS
      , ObjectName: jboss.jca:service=LocalTxDS,name=PostgresDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper

      Depends On Me: jboss.jca:service=LocalTxCM,name=PostgresDS
      ]
      23:48:56,274 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=hsqldbDS does not implement any Service methods

      I see things in the boot.log which seem to state my DS is config'd correctly.
      --------------------------------
      output from boot.log about PostgresDS
      --------------------------------

      23:48:54,154 DEBUG [ServiceCreator] About to create bean: jboss.jca:service=LocalTxCM,name=PostgresDS
      23:48:54,154 DEBUG [ServiceCreator] code: org.jboss.resource.connectionmanager.LocalTxConnectionManager
      23:48:54,167 DEBUG [ServiceCreator] Created bean: jboss.jca:service=LocalTxCM,name=PostgresDS
      23:48:54,168 DEBUG [ServiceCreator] About to create bean: jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,168 DEBUG [ServiceCreator] code: org.jboss.resource.connectionmanager.RARDeployment
      23:48:54,182 DEBUG [ServiceCreator] Created bean: jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,188 DEBUG [ServiceConfigurator] JndiName set to PostgresDS in jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,189 DEBUG [ServiceConfigurator] ManagedConnectionFactoryProperties set to
      <config-property name="ConnectionURL" type="java.lang.String">jdbc:postgresql://localhost:5432/acais</config-property>
      <config-property name="DriverClass" type="java.lang.String">org.postgresql.Driver</config-property>
      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName" type="java.lang.String" />
      <config-property name="Password" type="java.lang.String" />
      in jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,191 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxDS,name=PostgresDS depends on jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      23:48:54,191 DEBUG [ServiceConfigurator] considering OldRarDeployment with object name jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      23:48:54,192 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxCM,name=PostgresDS depends on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,192 DEBUG [ServiceConfigurator] considering ManagedConnectionFactoryName with object name jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,193 DEBUG [ServiceCreator] About to create bean: jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,193 DEBUG [ServiceCreator] code: org.jboss.resource.connectionmanager.JBossManagedConnectionPool
      23:48:54,203 DEBUG [ServiceCreator] Created bean: jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,203 DEBUG [ServiceConfigurator] MinSize set to 0 in jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,204 DEBUG [ServiceConfigurator] MaxSize set to 50 in jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,205 DEBUG [ServiceConfigurator] BlockingTimeoutMillis set to 5000 in jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,205 DEBUG [ServiceConfigurator] IdleTimeoutMinutes set to 15 in jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,210 DEBUG [ServiceConfigurator] Criteria set to ByContainer in jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,211 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxCM,name=PostgresDS depends on jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,211 DEBUG [ServiceConfigurator] considering ManagedConnectionPool with object name jboss.jca:service=LocalTxPool,name=PostgresDS
      23:48:54,212 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxCM,name=PostgresDS depends on jboss.jca:service=CachedConnectionManager
      23:48:54,212 DEBUG [ServiceConfigurator] considering CachedConnectionManager with object name jboss.jca:service=CachedConnectionManager
      23:48:54,213 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxCM,name=PostgresDS depends on jboss.security:service=JaasSecurityManager
      23:48:54,213 DEBUG [ServiceConfigurator] considering JaasSecurityManagerService with object name jboss.security:service=JaasSecurityManager
      23:48:54,218 DEBUG [ServiceConfigurator] TransactionManager set to java:/TransactionManager in jboss.jca:service=LocalTxCM,name=PostgresDS
      23:48:54,219 DEBUG [ServiceController] recording that jboss.jca:service=LocalTxCM,name=PostgresDS depends on jboss.jca:service=RARDeployer
      23:48:54,219 DEBUG [ServiceConfigurator] considering with object name jboss.jca:service=RARDeployer
      23:48:54,221 DEBUG [ServiceController] waiting in create of jboss.jca:service=LocalTxCM,name=PostgresDS waiting on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,222 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=PostgresDS does not implement any Service methods
      23:48:54,225 DEBUG [ServiceController] waiting in create of jboss.jca:service=LocalTxDS,name=PostgresDS waiting on jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      23:48:54,226 INFO [JBossManagedConnectionPool] Creating
      23:48:54,227 INFO [JBossManagedConnectionPool] Created
      23:48:54,228 DEBUG [ServiceController] Starting dependent components: [ObjectName: jboss.jca:service=LocalTxCM,name=PostgresDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxDS,name=PostgresDS
      jboss.jca:service=LocalTxPool,name=PostgresDS
      jboss.jca:service=CachedConnectionManager
      jboss.security:service=JaasSecurityManager
      jboss.jca:service=RARDeployer

      Depends On Me: ]
      23:48:54,229 DEBUG [ServiceController] waiting in create of jboss.jca:service=LocalTxCM,name=PostgresDS waiting on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,230 DEBUG [MainDeployer] Done with create step of deploying postgres-service.xml
      23:48:54,230 DEBUG [MainDeployer] Begin deployment start file:/u/public/jboss/jboss-3.0.1/server/default/deploy/postgres-service.xml
      23:48:54,231 DEBUG [SARDeployer] Deploying SAR, start step: url file:/u/public/jboss/jboss-3.0.1/server/default/deploy/postgres-service.xml
      23:48:54,231 DEBUG [ServiceController] waiting in start jboss.jca:service=LocalTxCM,name=PostgresDS on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,232 DEBUG [ServiceController] waiting in start jboss.jca:service=LocalTxDS,name=PostgresDS on jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
      23:48:54,233 INFO [JBossManagedConnectionPool] Starting
      23:48:54,234 INFO [JBossManagedConnectionPool] Started
      23:48:54,250 DEBUG [ServiceController] Starting dependent components: [ObjectName: jboss.jca:service=LocalTxCM,name=PostgresDS
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxDS,name=PostgresDS
      jboss.jca:service=LocalTxPool,name=PostgresDS
      jboss.jca:service=CachedConnectionManager
      jboss.security:service=JaasSecurityManager
      jboss.jca:service=RARDeployer

      Depends On Me: ]
      23:48:54,251 DEBUG [ServiceController] waiting in start jboss.jca:service=LocalTxCM,name=PostgresDS on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,252 DEBUG [MainDeployer] End deployment start on package: postgres-service.xml
      Depends On Me: ]
      23:48:54,251 DEBUG [ServiceController] waiting in start jboss.jca:service=LocalTxCM,name=PostgresDS on jboss.jca:service=LocalTxDS,name=PostgresDS
      23:48:54,252 DEBUG [MainDeployer] End deployment start on package: postgres-service.xml
      23:48:54,252 INFO [MainDeployer] Deployed package: file:/u/public/jboss/jboss-3.0.1/server/default/deploy/postgres-service.xml
      23:48:54,257 DEBUG [URLDeploymentScanner] Watch URL for: file:/u/public/jboss/jboss-3.0.1/server/default/deploy/postgres-service.xml -> file:/u/public/jboss/jboss-3.0.1/server/default/deploy/postgres-service.xml


      Any help much appreciated.

        • 1. Re: 3.0.1 and postgresql
          Steve Park Newbie

          The only glaring problem is that you need to move your jdbc7.0-1.2.jar file from ~/server/default/deploy to ~/server/default/lib. The only other thing I would do differently is to remove the hsqldb-service.xml file from the deploy directory if you don't intend to use it. Have you tried running you application? If so, what errors do you get, if any?

          • 2. Re: 3.0.1 and postgresql
            David Jencks Master

            either you didn't show the part of the boot log where it deployed or jboss-local-jdbc.rar is not in your deploy directory. One of your postgres mbeans is waiting for it at the end of the log you show. What state are the 3 mbeans in after jboss starts? (use the jmx viewer, I think it is still on port 8082 in that version, it might be 8080/jmx-console)