7 Replies Latest reply on Apr 24, 2002 9:45 AM by Thomas SMETS

    JBoss and PostgreSQL

    Steven T. Pierson Newbie

      I have a very simple Bean managed Entity bean. I cannot for the life of me get it to work under JBoss talking to a PostgreSQL database.

      I will say at the beginning I have the simple bean working under Weblogic and PostgreSQL just fine so I think I have security/access setup correctly for PostgreSQL.

      To create the JDBC pool I have edited my jboss.jcml file as follows:

      1. I added the driver as follows:

      org.hsqldb.jdbcDriver,org.gjt.mm.mysql.Driver,org.postgresql.Driver


      2. I have defined the pool as follows:

      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      PostgresDS
      jdbc:postgresql://localhost/cadence
      cadence
      cadence
      5
      20


      I have played around changing the min/max size which hasn't helped.

      The driver loads successfully and the pool is created and bound to the name specified. My simple EJB and war are deployed. The war simply tries to view/add rows in the database via JSP.

      When I try and execute the JSP code I get a transaction excpetion that says:
      An error occured in the bean. Error Message is:
      Error executing SQL SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME: java.sql.SQLException: Table not found: GLOSSARY in statement [SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME];
      nested exception is: javax.ejb.EJBException: Error executing SQL SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME: java.sql.SQLException: Table not found: GLOSSARY in statement [SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME]

      Stack Trace is :
      javax.transaction.TransactionRolledbackException: Error executing SQL SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME: java.sql.SQLException: Table not found: GLOSSARY in statement [SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME];
      nested exception is: javax.ejb.EJBException: Error executing SQL SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME: java.sql.SQLException: Table not found: GLOSSARY in statement [SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME]
      javax.ejb.EJBException: Error executing SQL SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME: java.sql.SQLException: Table not found: GLOSSARY in statement [SELECT OBJECT_ID FROM GLOSSARY ORDER BY OBJECT_NAME]
      <>

      I have tried lowercasing everything. I have tried putting "" around the database, and column names. I get the same exception each time.

      I do have the PostgreSQL Postmaster running is '-i' to accept TCP/IP connections.

      I can connect to the db from within JBuilder just fine but I'm not using a pool, so that's why I think I am creating the pool in JBoss incorrectly.

      Any ideas? Thoughts?

      If it makes a difference I am running on Windows 2000.