-
1. Re: jboss 5.1.GA connection issue with postgresql 8.4
wdfink Apr 11, 2012 3:24 AM (in response to vaishu09)It might not a problem with the DS.
What code is here => ViewClimateHomeAction.java:108?
What you use? EJB2.x or EJB3. Entities or direct SQL?
Give us a little more detail to helping you.
-
2. Re: jboss 5.1.GA connection issue with postgresql 8.4
vaishu09 Apr 12, 2012 1:54 AM (in response to wdfink)ViewClimateHomeAction.java is the java file, the point at which the database is called. We use direct SQL. The same application is working in JBoss 4. but it is not working in JBoss 5.1.0.
Other than copying the postgres-ds.xml file to server/default/deploy folder and added postgresql-8.4-702.jdbc4.jar to server/default/lib folder, is there any steps to configure the databse?
I have attached the postgres-ds.xml file also.
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
<!-- $Id: postgres-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ -->
<!-- ==================================================================== -->
<!-- Datasource config for Postgres -->
<!-- ==================================================================== -->
<datasources>
<local-tx-datasource>
<jndi-name>CLIMATEPARLIAMENT_APP_DS</jndi-name>
<connection-url>jdbc:postgresql://localhost:5432/cparl</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<user-name>postgres</user-name>
<password></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 (optional) -->
<metadata>
<type-mapping>PostgreSQL 8.0</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
-
3. Re: jboss 5.1.GA connection issue with postgresql 8.4
peterj Apr 12, 2012 10:07 AM (in response to vaishu09)Data source configuration has not changed in any significant way between 4.0.x, 4.2.x and 5.x, so I doubt that it has anything to do with the *-ds.xml file. Please post the full log messages, includuing stack trace, for the exception, and post the code that is failing, highlighting the line that gets the exception. Also make sure that is is the first ecpetion that was thrown.