This content has been marked as final.
Show 5 replies
-
1. Re: [JBoss 4.2.2GA]Problem with PostgreSQL as DefaultDS
jaikiran Jun 26, 2008 9:16 AM (in response to klapcio)What does your datasource file look like? And also which jars did you copy to the server/< serverName>/lib folder?
-
2. Re: [JBoss 4.2.2GA]Problem with PostgreSQL as DefaultDS
klapcio Jun 26, 2008 9:32 AM (in response to klapcio)"jaikiran" wrote:
What does your datasource file look like? And also which jars did you copy to the server/< serverName>/lib folder?
My postgres-ds.xml looks:<?xml version="1.0" encoding="UTF-8"?> <!-- Datasource config for Postgres --> <datasources> <local-tx-datasource> <jndi-name>DefaultDS</jndi-name> <connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>jboss</user-name> <password>jboss</password> <!-- sql to call when connection is created. Can be anything, select 1 is valid for PostgreSQL <new-connection-sql>select 1</new-connection-sql> --> <!-- sql to call on an existing pooled connection when it is obtained from pool. Can be anything, select 1 is valid for PostgreSQL <check-valid-connection-sql>select 1</check-valid-connection-sql> --> <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml --> <metadata> <type-mapping>PostgreSQL 8.0</type-mapping> </metadata> </local-tx-datasource> </datasources>
I copied postgresql-8.1-412.jdbc3.jar into lib directory (I'm using PostgreSQL 8.1.11 on Solaris10)
A DB connection with psql client works fine -
3. Re: [JBoss 4.2.2GA]Problem with PostgreSQL as DefaultDS
jaikiran Jun 26, 2008 9:41 AM (in response to klapcio)<connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
This is incorrect. You have replace the servername, port, database with the actual values corresponding to your database server. -
4. Re: [JBoss 4.2.2GA]Problem with PostgreSQL as DefaultDS
klapcio Jun 26, 2008 10:03 AM (in response to klapcio)"jaikiran" wrote:
<connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
This is incorrect. You have replace the servername, port, database with the actual values corresponding to your database server.
I'm so silly...
OK, the connection is working but I'm still getting ERRORS:WARN [ServiceController] Problem starting service jboss.mq:service =PersistenceManager org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Messag e recovery may not be accurate; - nested throwable: (org.postgresql.util.PSQLExc eption: ERROR: syntax error at or near "TXID")
OK, probably I've to remove hsqldb-jdbc2-service.xml and hsqldb-jdbc2-service.xml from deploy/jms but what shall I put instead of them ? -
5. Re: [JBoss 4.2.2GA]Problem with PostgreSQL as DefaultDS
klapcio Jun 26, 2008 10:28 AM (in response to klapcio)OK, now everything is working
In deploy/jms I had only:
- rename hsqldb-jdbc-state-service.xml into jbossmq-destinations-service.xml
- copy postgres-jdbc2-service.xml form $JBOSS_HOME/docs/examples/jms into deploy/jms and lightly adapt it.