3 Replies Latest reply on Jun 7, 2004 5:02 AM by satyakarthik

    Postgres problems

    ghoyle Newbie

      Hi,

      I am having some problem running postgres 7.3.2 and jboss
      I am trying to deploy 2 entites and the erros i am getting in JBOSS are

      2004-05-19 15:11:05,669 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/opt/jboss-3.2.3/server/all/deploy/jblog.ear
      2004-05-19 15:11:05,670 INFO [org.jboss.deployment.EARDeployer] Init J2EE application: file:/opt/jboss-3.2.3/server/all/deploy/jblog.ear
      2004-05-19 15:11:06,896 INFO [org.jboss.ejb.EjbModule] Deploying Author
      2004-05-19 15:11:07,180 INFO [org.jboss.ejb.EjbModule] Deploying Story
      2004-05-19 15:11:09,375 ERROR [org.jboss.ejb.EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping PostgresSQL not found
      .
      .
      .
      2004-05-19 15:11:09,397 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/JBlog/Author,service=EJB
      org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping PostgresSQL not found
      .
      .
      .
      2004-05-19 15:11:09,979 ERROR [org.jboss.ejb.EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error in jbosscmp-jdbc.xml : datasource-mapping PostgresSQL not found
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>(JDBCEntityMetaData.java:433)
       at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.<init>(JDBCApplicationMetaData.java:311)
      


      The jbosscmp-jdbc.xml file has

      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:/PostgresDS</datasource>
       <datasource-mapping>PostgresSQL</datasource-mapping>
       <create-table>false</create-table>
       <remove-table>false</remove-table>
       <pk-constraint>true</pk-constraint>
       <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
       </defaults>
      


      I have changed standardjbosscmp-jdbc.xml in the conf folder to be
      jbosscmp-jdbc>
      
       <defaults>
       <datasource>java:/PostgresDS</datasource>
       <datasource-mapping>PostgresSQL</datasource-mapping>
      


      I have postgres-ds.xml file in the deploy folder with following contents
      <?xml version="1.0" encoding="UTF-8"?>
      
      <datasources>
       <local-tx-datasource>
       <jndi-name>PostgresDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/HVCG</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>jboss</user-name>
       <password>ssl1324</password>
      
       <!-- sql to call when connection is created
       <new-connection-sql>some arbitrary sql</new-connection-sql>
       -->
      
       <!-- sql to call on an existing pooled connection when it is obtained from pool
       <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
       -->
       </local-tx-datasource>
      </datasources>
      


      and i have the postgres-jdbc2-service.xml in the deploy/jms folder. I have removed hsqldb-jdbc2-service.xml.

      JBOSS gives no error on booting up so long as my app is not deployed. It has even connected to the database and installed its own 2 tables
      jms_messages and jms_transactions

      So do not think it is a problem with general set up and drivers. Any ideas would be most appreciated.