1 Reply Latest reply on Aug 19, 2010 4:50 AM by Mini K

    Deployment issues with Postgres + Jboss Configuration

    Mini K Newbie

      Hello everyone,

       

      This might be repeated question, but I spend almost more than a day to find the right answer over this forum and after removing, changing, editing almost everything, I decided to ask you again!

       

      Postgres : 8.4

      Jboss: 5.1 GA

       

      Following are the steps I did to configure Postgres into Jboss:

      1) Added postgres-ds.xml into the JBOSS\default\server\deploy folder

      The code looks like this:

       

      <datasources>
        <local-tx-datasource>
          <jndi-name>DefaultDS</jndi-name>
          <connection-url>jdbc:postgresql://localhost:5432/testdatabase</connection-url>
          <driver-class>org.postgresql.Driver</driver-class>
          <user-name>postgres</user-name>
          <password>admin</password>
          <new-connection-sql>select 1</new-connection-sql>
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
      <metadata>
      <type-mapping>PostgreSQL 8.0</type-mapping>
      </metadata>
        </local-tx-datasource>
      </datasources>

       

      2) Added the postgresql-persistence-service.xml file from JBOSS\docs\examples\jms to JBOSS\server\default\deploy\messaging folder. Did no changes in this file.

       

      3) Remove JBOSS\default\server\deploy\ hsqldb-ds.xml and JBOSS\server\default\deploy\messaging \ hsqldb-persistence-service.xml

       

      4) Edited JBOSS\server\default\conf \ login-config.xml file by removing

      <application-policy name="HsqlDbRealm">
          <authentication>
            <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
              flag="required">
              <module-option name="principal">sa</module-option>
              <module-option name="userName">sa</module-option>
              <module-option name="password"></module-option>
              <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
            </login-module>
          </authentication>
        </application-policy>

       

      5) Edited JBOSS\server\default\conf \ standardjbosscmp-jdbc.xml file by adding this line

      <datasource-mapping>PostgreSQL 8.0</datasource-mapping>

       

      6) Lastly, the most important is added the postgres driver at JBOSS\server\default\lib\ postgresql-8.4-701.jdbc4.jar

       

      The datasource name is : DefaultDS

       

      After doing the above steps I get the following exception:

       

      ======================================================================

      ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory" is missing the following dependencies:
          Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
        Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies:
          Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
        Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is missing the following dependencies:
          Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
        Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies:
          Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
        Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is missing the following dependencies:
          Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured")
        Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies:
          Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **")

       

      DEPLOYMENTS IN ERROR:
        Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **

      ======================================================================

       

      I have attached the detailed error log in this discussion as well.

       

      I did read in some random discussions that I can remove the ejb3-timer file, which I tried but still I was getting more deployment errors. I think I am just missing the last step, but still dont know what it is.

       

      Can someone please help me out with this? And also provide a clear answer so that it can help others as well.

       

      Thanks in advance,

      Mini