5 Replies Latest reply on Feb 21, 2006 9:18 PM by Dave Cawthorn

    Using PostgreSQL 8.0 in place of HypersonicSQL

    Paul Malinowski Newbie

      Hi All,

      I would like to use PostgreSQL 8.0.4 instead of HypersonicSQL with my JBoss 4.0.2 installation. All my attempts to accomplish this have been futile. Does anyone have the deffinitive solution for this?

      Thanks!
      Pabalose

        • 1. Re: Using PostgreSQL 8.0 in place of HypersonicSQL
          Novice

          I am successfully using PostgreSQL with JBoss 4.0.3 + EJB3 (all) for JMS and the persistence layer. You need to do the following:

          * Start PgSQL and create a new DB called "jms"
          * remove the sample destinations: deploy-hasingleton/jms/jbossmq-destinations-service.xml
          * remove the HSQL JMS persistence: deploy-hasingleton/jms/hsqldb*
          * deploy a datasource (called jmsDS) for the PostgreSQL DB used for JMS:

          <?xml version="1.0" encoding="UTF-8"?>
          <datasources>
           <local-tx-datasource>
           <jndi-name>jmsDS</jndi-name>
           <use-java-context>true</use-java-context>
           <connection-url>jdbc:postgresql://localhost:5432/jms</connection-url>
           <driver-class>org.postgresql.Driver</driver-class>
           <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
           <user-name>postgres</user-name>
           <password>password</password>
           <min-pool-size>1</min-pool-size>
           <max-pool-size>10</max-pool-size>
           <metadata>
           <type-mapping>PostgreSQL 8.0</type-mapping>
           </metadata>
           </local-tx-datasource>
          </datasources>
          

          * deploy a datasource for your persistence layer
          * add JDBC drivers for PgSQL to server/all/lib
          * deploy the PgSQL JMS persistence: deploy-hasingleton/jms/pgsql-jdbc-service.xml:
          <?xml version="1.0" encoding="UTF-8"?>
          <server>
          
          
           <!-- ==================================================================== -->
           <!-- Persistence and caching using PostgreSQL -->
           <!-- ==================================================================== -->
          
           <!--
           | The destination manager is the core service within JBossMQ
           -->
           <mbean code="org.jboss.mq.server.jmx.DestinationManager" name="jboss.mq:service=DestinationManager">
           <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache</depends>
           <depends optional-attribute-name="PersistenceManager">jboss.mq:service=PersistenceManager</depends>
           <depends optional-attribute-name="StateManager">jboss.mq:service=StateManager</depends>
           </mbean>
          
           <!--
           | The MessageCache decides where to put JBossMQ message that
           | are sitting around waiting to be consumed by a client.
           |
           | The memory marks are in Megabytes. Once the JVM memory usage hits
           | the high memory mark, the old messages in the cache will start getting
           | stored in the DataDirectory. As memory usage gets closer to the
           | Max memory mark, the amount of message kept in the memory cache aproaches 0.
           -->
           <mbean code="org.jboss.mq.server.MessageCache" name="jboss.mq:service=MessageCache">
           <attribute name="HighMemoryMark">50</attribute>
           <attribute name="MaxMemoryMark">60</attribute>
           <attribute name="CacheStore">jboss.mq:service=PersistenceManager</attribute>
           </mbean>
          
           <!--
           | The jdbc2 PersistenceManager is the new improved JDBC implementation.
           | This implementation allows you to control how messages are stored in
           | the database.
           |
           | Use this PM if you want the reliablity a relational database can offer
           | you. The default configuration is known to work with hsqldb, other
           | databases will requrie teaking of the SqlProperties e.g. changing table
           | colum definitions to database supported types.
           |
           | Take care that the selected blob column type can store
           | all message data. Some databases (e.g. mySQL) offer blob types with
           | different maximum capacity (e.g. mySQL-type BLOB=64K, LONGBLOB=2G).
           |
           | If you encouter problems with the configured BLOB_TYPE try a different
           | setting. Valid settings are OBJECT_BLOB, BINARYSTREAM_BLOB and BYTES_BLOB.
           -->
           <mbean code="org.jboss.mq.pm.jdbc3.PersistenceManager" name="jboss.mq:service=PersistenceManager">
           <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=jmsDS</depends>
           <attribute name="SqlProperties">
           BLOB_TYPE=BINARYSTREAM_BLOB
           UPDATE_MARKED_MESSAGES = UPDATE JMS_MESSAGE_LOG SET TXID=?, TXOP=? WHERE TXOP=?
           UPDATE_MARKED_REFERENCES = UPDATE JMS_REFERENCE_LOG SET TXID=?, TXOP=? WHERE TXOP=?
           UPDATE_MARKED_MESSAGES_WITH_TX = UPDATE JMS_MESSAGE_LOG SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
           UPDATE_MARKED_REFERENCES_WITH_TX = UPDATE JMS_REFERENCE_LOG SET TXID=?, TXOP=? WHERE TXOP=? AND TXID=?
           DELETE_MARKED_MESSAGES_WITH_TX = DELETE FROM JMS_MESSAGE_LOG WHERE TXID IN (SELECT TXID FROM JMS_TRANSACTION_LOG) AND TXOP=?
           DELETE_MARKED_REFERENCES_WITH_TX = DELETE FROM JMS_REFERENCE_LOG WHERE TXID IN (SELECT TXID FROM JMS_TRANSACTION_LOG) AND TXOP=?
           DELETE_TX = DELETE FROM JMS_TRANSACTION_LOG WHERE TXID = ?
           DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGE_LOG WHERE TXID=? AND TXOP=?
           DELETE_MARKED_REFERENCES = DELETE FROM JMS_REFERENCE_LOG WHERE TXID=? AND TXOP=?
           DELETE_TEMPORARY_MESSAGES = DELETE FROM JMS_MESSAGE_LOG WHERE TXOP='T'
           DELETE_TEMPORARY_REFERENCES = DELETE FROM JMS_REFERENCE_LOG WHERE TXOP='T'
           INSERT_TX = INSERT INTO JMS_TRANSACTION_LOG (TXID) values(?)
           SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_TRANSACTION_LOG
           SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGE_LOG WHERE DESTINATION=?
           SELECT_REFERENCES_IN_DEST = SELECT R.MESSAGEID, M.MESSAGEBLOB, R.REDELIVERED, R.REDELIVERS FROM JMS_REFERENCE_LOG R, JMS_MESSAGE_LOG M \
           WHERE R.MESSAGEID = M.MESSAGEID AND R.DESTINATION=?
           SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGE_LOG WHERE MESSAGEID=? AND DESTINATION=?
           INSERT_MESSAGE = INSERT INTO JMS_MESSAGE_LOG (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP, LATECLONE) VALUES(?,?,?,?,?,?)
           INSERT_REFERENCE = INSERT INTO JMS_REFERENCE_LOG (MESSAGEID, DESTINATION, TXID, TXOP, REDELIVERED, REDELIVERS) VALUES(?,?,?,?,?,?)
           MARK_MESSAGE = UPDATE JMS_MESSAGE_LOG SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
           MARK_REFERENCE = UPDATE JMS_REFERENCE_LOG SET TXID=?, TXOP=? WHERE MESSAGEID=? AND DESTINATION=?
           DELETE_MESSAGE = DELETE FROM JMS_MESSAGE_LOG WHERE MESSAGEID=? AND DESTINATION=?
           DELETE_REFERENCE = DELETE FROM JMS_REFERENCE_LOG WHERE MESSAGEID=? AND DESTINATION=?
           UPDATE_MESSAGE = UPDATE JMS_MESSAGE_LOG SET MESSAGEBLOB=? WHERE MESSAGEID=? AND DESTINATION=?
           UPDATE_REFERENCE = UPDATE JMS_REFERENCE_LOG SET REDELIVERED=?, REDELIVERS=? WHERE MESSAGEID=? AND DESTINATION=?
           DELETE_ORPHANED_MESSAGES = DELETE FROM JMS_MESSAGE_LOG WHERE LATECLONE = '1' AND MESSAGEID NOT IN (SELECT MESSAGEID FROM JMS_REFERENCE_LOG)
           DELETE_ALL_TXS = DELETE FROM JMS_TRANSACTION_LOG
           CREATE_REFERENCE_TABLE = CREATE TABLE JMS_REFERENCE_LOG ( MESSAGEID INTEGER NOT NULL, \
           DESTINATION VARCHAR(4000) NOT NULL, TXID INTEGER, TXOP CHAR(1), REDELIVERED CHAR(1), \
           REDELIVERS INTEGER, PRIMARY KEY (MESSAGEID, DESTINATION) )
           CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGE_LOG ( MESSAGEID INTEGER NOT NULL, DESTINATION VARCHAR(255) NOT NULL, \
           TXID INTEGER, TXOP CHAR(1), LATECLONE CHAR(1), MESSAGEBLOB BYTEA, PRIMARY KEY (MESSAGEID, DESTINATION) )
           CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTION_LOG ( TXID INTEGER )
           CREATE_TABLES_ON_STARTUP = TRUE
           </attribute>
           </mbean>
          
           <mbean code="org.jboss.mq.sm.jdbc.JDBCStateManager" name="jboss.mq:service=StateManager">
           <depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=jmsDS</depends>
           <attribute name="SqlProperties">
           CREATE_TABLES_ON_STARTUP = TRUE
           CREATE_USER_TABLE = CREATE TABLE JMS_USERS (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, \
           CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
           CREATE_ROLE_TABLE = CREATE TABLE JMS_ROLES (ROLEID VARCHAR(32) NOT NULL, USERID VARCHAR(32) NOT NULL, \
           PRIMARY KEY(USERID, ROLEID))
           CREATE_SUBSCRIPTION_TABLE = CREATE TABLE JMS_SUBSCRIPTIONS (CLIENTID VARCHAR(128) NOT NULL, \
           SUBNAME VARCHAR(128) NOT NULL, TOPIC VARCHAR(255) NOT NULL, \
           SELECTOR VARCHAR(4000), PRIMARY KEY(CLIENTID, SUBNAME))
           GET_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
           LOCK_SUBSCRIPTION = SELECT TOPIC, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
           GET_SUBSCRIPTIONS_FOR_TOPIC = SELECT CLIENTID, SUBNAME, SELECTOR FROM JMS_SUBSCRIPTIONS WHERE TOPIC=?
           INSERT_SUBSCRIPTION = INSERT INTO JMS_SUBSCRIPTIONS (CLIENTID, SUBNAME, TOPIC, SELECTOR) VALUES(?,?,?,?)
           UPDATE_SUBSCRIPTION = UPDATE JMS_SUBSCRIPTIONS SET TOPIC=?, SELECTOR=? WHERE CLIENTID=? AND SUBNAME=?
           REMOVE_SUBSCRIPTION = DELETE FROM JMS_SUBSCRIPTIONS WHERE CLIENTID=? AND SUBNAME=?
           GET_USER_BY_CLIENTID = SELECT USERID, PASSWD, CLIENTID FROM JMS_USERS WHERE CLIENTID=?
           GET_USER = SELECT PASSWD, CLIENTID FROM JMS_USERS WHERE USERID=?
           POPULATE.TABLES.01 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('guest', 'guest')
           POPULATE.TABLES.02 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('j2ee', 'j2ee')
           POPULATE.TABLES.04 = INSERT INTO JMS_USERS (USERID, PASSWD) VALUES ('nobody', 'nobody')
           POPULATE.TABLES.06 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('guest','guest')
           POPULATE.TABLES.14 = INSERT INTO JMS_ROLES (ROLEID, USERID) VALUES ('noacc','nobody')
           </attribute>
           </mbean>
          </server>
          


          * change login-config.xml to use jmsDS for jbossmq realm


          • 2. Re: Using PostgreSQL 8.0 in place of HypersonicSQL
            Paul Malinowski Newbie

            Thanks for answering my post. I was wondering if your answer is a complete replacement to HypersonicSQL?

            • 3. Re: Using PostgreSQL 8.0 in place of HypersonicSQL
              Paul Malinowski Newbie

              What about a schema? Does this use the "public" schema in your "jms" database? Where and how would you define a custom PostgreSQL schema?

              • 4. Re: Using PostgreSQL 8.0 in place of HypersonicSQL
                Steffen Boelaars Newbie

                Even though this solves the problem for JMS, this does not solve it for the ejb-deployer, which is installed by default and relies on the default hypersonic db as well.

                I'm running PostgreSQL 8.0.3, jBoss AS 4.0.3SP1, JAVA 1.4.1_06, PostgreSQL JDBC driver 8.2dev-501 JDBC 3.

                Operating system IRIX64 6.5.29

                The error that occurs when starting jBoss is pasted in the code block below. If someone could point out to me where and how to solve the problem, that would be great.

                Reasing the error it seems to me that I have to configure some DB-specific metadata somewhere?

                Thanks in advance for any help.

                13:14:23,433 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding' to JNDI name 'java:DefaultDS'
                13:14:24,794 ERROR [GeneralPurposeDatabasePersistencePlugin] Cannot create timer table
                java.lang.IllegalStateException: Cannot obtain type mapping from: jboss.jdbc:datasource=DefaultDS,service=metadata
                 at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.createTableIfNotExists(GeneralPurposeDatabasePersistencePlugin.java:97)
                 at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:96)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
                 at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:960)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:428)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
                 at $Proxy27.start(Unknown Source)
                 at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:185)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
                 at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy9.deploy(Unknown Source)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
                 at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:428)
                 at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy5.deploy(Unknown Source)
                 at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
                 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
                 at org.jboss.Main.boot(Main.java:187)
                 at org.jboss.Main$1.run(Main.java:438)
                 at java.lang.Thread.run(Thread.java:536)
                13:14:24,885 WARN [ServiceController] Problem starting service jboss.ejb:persistencePolicy=database,service=EJBTimerService
                org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
                 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1513)
                 at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1298)
                 at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:190)
                 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:437)
                 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:339)
                 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:238)
                 at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
                 at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.selectTimers(GeneralPurposeDatabasePersistencePlugin.java:183)
                 at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:98)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
                 at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:960)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:428)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at org.jboss.system.ServiceController.start(ServiceController.java:446)
                 at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.java:273)
                 at $Proxy27.start(Unknown Source)
                 at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:185)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
                 at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy9.deploy(Unknown Source)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
                 at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
                 at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
                 at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
                 at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
                 at $Proxy0.start(Unknown Source)
                 at org.jboss.system.ServiceController.start(ServiceController.java:428)
                 at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy4.start(Unknown Source)
                 at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
                 at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
                 at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                 at java.lang.reflect.Method.invoke(Method.java:324)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
                 at $Proxy5.deploy(Unknown Source)
                 at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
                 at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
                 at org.jboss.Main.boot(Main.java:187)
                 at org.jboss.Main$1.run(Main.java:438)
                 at java.lang.Thread.run(Thread.java:536)
                13:14:25,497 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
                13:14:26,194 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
                
                --- MBeans waiting for other MBeans ---
                ObjectName: jboss.ejb:persistencePolicy=database,service=EJBTimerService
                 State: FAILED
                 Reason: org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
                 I Depend On:
                 jboss.jca:name=DefaultDS,service=DataSourceBinding
                
                --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                ObjectName: jboss.ejb:persistencePolicy=database,service=EJBTimerService
                 State: FAILED
                 Reason: org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
                 I Depend On:
                 jboss.jca:name=DefaultDS,service=DataSourceBinding
                
                


                • 5. Re: Using PostgreSQL 8.0 in place of HypersonicSQL
                  Dave Cawthorn Newbie

                  Whiter,

                  I had the same problem and found that it was due to and invalid entry in my default datasource. I changed it to <type-mapping>PostgreSQL 7.2</type-mapping>.

                  There are probably correct mappings for postgres 8 that will work but this one solved the problem.