3 Replies Latest reply on Jan 31, 2006 5:41 AM by Tarcisio Fedrizzi

    JBoss and PostgreSQL

    Tarcisio Fedrizzi Newbie

      Hi all,
      I have to configure JBoss with PostgreSQL as DefaultDS so I downloaded the driver for PostgreSQL 8.1 version (of the driver) 8.1 404 JDBC 3, I copied the configuration file from the example directory of jboss to the directory deploy of the all configuration of the server. Obviously I created a user and a database for JBoss and I verified that the user created is able to login on the db. And finally I adapted the postfres deploy file to my configuration.
      The version of JBoss that I'using is the 4.0.3SP1 configured to use EJB-3.0_RC4-PFD.

      The problem seems to be the missed creation of the table "timers", but checking on the output of Postgres (using the maximum levels for the log) there's no evidence of the creation query for the table "timers".

      So my question is someone can help me to figure out where is the problem?

      Thank you! Bye! =)

      This is the log of JBoss, I shortened some StackTrace to reduce the size of the message but if you want or if you need I can post it entirely.

      22:06:53,667 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      22:06:54,684 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      22:06:55,184 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.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:595)
      22:06:55,196 WARN [ServiceController] Problem starting service jboss.ejb:service=EJBTimerService,persistencePolicy=database
      org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      ...
      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:595)
      22:06:55,289 WARN [ServiceController] Problem starting service jboss.mq:service=PersistenceManager
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.postgresql.util.PSQLException: ERROR: syntax error at or near "TXID")
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:416)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1499)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
      ...
      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:595)
      Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "TXID"
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:346)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:250)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:211)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:384)
      ... 111 more
      22:06:55,348 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      22:06:55,698 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
      State: FAILED
      Reason: org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=DefaultDS

      ObjectName: jboss.mq:service=PersistenceManager
      State: FAILED
      Reason: org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.postgresql.util.PSQLException: ERROR: syntax error at or near "TXID")
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=DefaultDS
      Depends On Me:
      jboss.mq:service=DestinationManager

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.mq:service=PersistenceManager
      State: FAILED
      Reason: org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.postgresql.util.PSQLException: ERROR: syntax error at or near "TXID")
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=DefaultDS
      Depends On Me:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
      State: FAILED
      Reason: org.postgresql.util.PSQLException: ERROR: relation "timers" does not exist
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=DefaultDS


      22:06:57,501 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
      22:06:57,631 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
      22:06:57,637 INFO [JkMain] Jk running ID=0 time=0/18 config=null
      22:06:57,643 INFO [Server] JBoss (MX MicroKernel) [4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)] Started in 40s:142ms