2 Replies Latest reply on Mar 6, 2003 9:22 AM by David Jencks

    failed after installing postgreSQL 7.3 to jboss 3.0.4

    bastian Newbie

      I just installed postgres7.3 in JBoss 3.0.4
      I get failed state when running jboss.
      Here is the message i receive:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.jca:service=LocalTxCM,name=PostgresDS
      state: FAILED
      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: java.lang.IllegalArgumentException: The class 'class org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory' has no setter for config property 'postgres']


      I have changed the following :

      ${JBOSS_HOME}/server/default/conf/standardjaws.xml :


      <!-- java:/DefaultDS -->
      <!-- <type-mapping>Hypersonic SQL</type-mapping> -->
      java:/PostgresDS
      <type-mapping>PostgreSQL</type-mapping>
      false

      --------------------

      ${JBOSS_HOME}/server/default/conf/standardjbosscmp-jdbc.xml :


      java:/PostgresDS
      <datasource-mapping>PostgreSQL</datasource-mapping>

      ---------------------

      ${JBOSS_HOME}/server/default/deploy/postgres-service.xml

      <!-- ========== Set the JndiName ======================= -->
      PostgresDS


      <config-property name="ConnectionURL" type="java.lang.String">jdbc:postgresql://localhost:5432/jboss</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="postgres" type="java.lang.String"></config-property>
      <config-property name="MyPassword" type="java.lang.String"></config-property>

      I have also added the jdbc driver from http://jdbc.postgresql.org/download.html
      (I tried both jdbc2 and jdbc2+ since i'm using jdk1.3) to ${JBOSS_HOME}/lib directory and added a class path to the jar file.


      Could anybody please help me...

      thanks,
      bastian

        • 1. Re: failed after installing postgreSQL 7.3 to jboss 3.0.4
          bastian Newbie

          The problem was I entered the username/password at the wrong place at :
          ${JBOSS_HOME}/server/default/deploy/postgres-service.xml

          I changed it to the correct format :

          <config-property name="ConnectionURL" type="java.lang.String">jdbc:postgresql://localhost:5432/jboss</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">postgresUserName</config-property>
          <config-property name="Password" type="java.lang.String">postgresUserNamePassword</config-property>


          I also made several small changes:

          ${JBOSS_HOME}/server/default/conf/standardjaws.xml :
          java:/PostgresDS
          <type-mapping>PostgresDS</type-mapping>


          ${JBOSS_HOME}/server/default/conf/standardjbosscmp-jdbc.xml :
          java:/PostgresDS
          <datasource-mapping>PostgresDS</datasource-mapping>

          ---------------

          I now get the following messages when booting up (don't know if I had it also before)

          12:56:47,695 WARN [ServiceController] jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper does not implement any Service methods
          12:56:47,698 WARN [ServiceController] jboss.jca:service=LocalTxDS,name=PostgresDS does not implement any Service methods

          [PostgresDS] Bound connection factory for resource adapter 'JBoss LocalTransaction JDBC Wrapper' to JNDI name 'java:/PostgresDS'

          My problem now starts when I try to deploy my CMP 2.0 bean, it shows this error:

          13:12:16,510 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=UsersHomeRemote,service=EJB
          org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping PostgresDS not found
          at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.(JDBCEntityMetaData.java:374)
          .
          .
          .

          13:12:16,677 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.j2ee:jndiName=UsersHomeRemote,service=EJB
          state: FAILED
          I Depend On:
          Depends On Me: org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping PostgresDS not found]

          -----------------

          I suspect it is because of the warning I get when I load up jboss about Postgres does not implement any Service methods.

          Can anybody please help me on this.

          Thank you,
          bastian

          • 2. Re: failed after installing postgreSQL 7.3 to jboss 3.0.4
            David Jencks Master

            I think the datasource is ok, look in jndiview in the jmx console to be sure. The warning is about how you tried to set up the db type mappings for cmp. If you can't figure it out ask on the cmp forum.