5 Replies Latest reply: Jan 15, 2009 7:10 PM by Jeff Gordon RSS

JBoss 5.0 CR2 and PostgreSQL

David Carreras Newbie

Hello i am trying to configure JBoss 5.0 CR2 with PostgreSQL 8.3.

I tried this procedure :
- copy the jdbc driver : postgresql-jdbc2ee.jar to the lib directory
- remove the hsqldb-ds.xml from the deploy directory
- add a postgresql-ds.xml with DefaultDS configured inside
- replace the EJB3-timer-service.xml by one for postgresql found on jira

After this i still have error at startup :

2008-09-22 18:01:41,718 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

*** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging.connectionfactory:service=ConnectionFactory
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging.destination:name=BagQueue,service=Queue
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging.destination:name=DLQ,service=Queue
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging.destination:name=ExpiryQueue,service=Queue
 -> jboss.messaging:service=PostOffice{Create:Configured}

jboss.messaging:service=PostOffice
 -> jboss.jgroups:service=ChannelFactory{Create:** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **}


*** CONTEXTS IN ERROR: Name -> Error

jboss.jgroups:service=ChannelFactory -> ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **


Tables are well created in postgres DB.
I have error from Corba deployment in the log file but i don't think it is linked to the postgres problem.

Anyone could help us ?
Thanks.

  • 1. Re: JBoss 5.0 CR2 and PostgreSQL
    Peter Johnson Master

    You must also configure messaging and quartz to use the postgresql database. For messaging, copy the docs/examples/jms/postgresql-persistence-service.xml file to server/xxx/deploy/messaging and remove the hsqldb-persistence-service.xml file. Also, you must edit the file if you are not using clustering - see the comments in the file for details. For Quartz, see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141835

    I have complete, detailed, instructions for replacing Hypersonic, but it is not free. I can provide the URL if you are interested.

  • 2. Re: JBoss 5.0 CR2 and PostgreSQL
    Jay Key Newbie

    Actually, what it seems to be complaining about is that the persistence layer in JBoss Messaging has a declared dependency to the JGroups ChannelFactory service. This service is deployed by default in the clustered "all" configuration (run "jboss.sh -c all"), but is not in the default or minimal configurations.

    You can either:

    1. switch to the "all" configuration
    2. deploy the ChannelFactory service into the configuration you're using
    3. set the messaging to be non-clustered:
    * set the Clustered attribute of the MessagingPostOfficeService mbean to be false
    * comment out the dependency on the ChannelFactory service

  • 3. Re: JBoss 5.0 CR2 and PostgreSQL
    ilango gurusamy Novice

     

    "PeterJ" wrote:
    You must also configure messaging and quartz to use the postgresql database. For messaging, copy the docs/examples/jms/postgresql-persistence-service.xml file to server/xxx/deploy/messaging and remove the hsqldb-persistence-service.xml file. Also, you must edit the file if you are not using clustering - see the comments in the file for details. For Quartz, see http://www.jboss.com/index.html?module=bb&op=viewtopic&t=141835

    I have complete, detailed, instructions for replacing Hypersonic, but it is not free. I can provide the URL if you are interested.


    Peter
    I was wondering if you could provide the URL that supposedly talks about replacing the Hypersonic DB database.

    thanks


  • 4. Re: JBoss 5.0 CR2 and PostgreSQL
    Peter Johnson Master

    The book JBoss In Action (http://www.manning.com/jamae), chapter 15 contains various configuration settings used for production. One of those is replacing HSQLDB with either MySDQL or PostgreSQL. Also, chapter 8 on messaging shows how to configure messaging to use another database.

    And it looks like the source is on the book's web site! Target 03 will create a configuration that uses MySQL or PostgreSQL.

  • 5. Re: JBoss 5.0 CR2 and PostgreSQL
    Jeff Gordon Newbie

    When you grabbed the postgresql-persistence-service.xml, you probably looked over the comments near teh bottom that say

    "All the remaining properties only have to be specified if the post office is clustered. You can safely comment them out if your post office is non clustered"

    You need to comment out:

    attribute name="GroupName"
    attribute name="StateTimeout"
    attribute name="CastTimeout"
    attribute name="FailoverOnNodeLeave"
    depends optional-attribute-name="ChannelFactoryName"
    attribute name="ControlChannelName"
    attribute name="DataChannelName"
    attribute name="ChannelPartitionName"

    That will get rid of the error messages like:

    NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory'