PostgreSQL - empty database - install.demo.db does not exist
wishmaster7 Jan 4, 2013 10:22 AMHello everybody,
I have downloaded the last version of jBPM (5.4.0), unzipped it, launched "ant install.demo", installed a local PostgreSQL database and follow the documentation to create the database with the matching user and configured jBPM to connect to this database. At the end of "3.7.3 Quickstart", when I want to reinstall the demo, it says BUILD FAILED - target "install.demo.db" does not exist in the project "jBPM.install".
At this point, I have a database called "jbpm5" with a user called "jbpm5", and a database called "task" with a user called "task". But they are empty. Then I launch Eclipse, create a new jBPM project with "a more advanced process including human task and persistence", and when I run the testProcess() method of the jUnit test class, it gives me an error ending by :
ERROR tool.hbm2ddl.SchemaUpdate.execute - could not get database metadata
org.h2.jdbc.JdbcSQLException: Table "PG_CLASS" not found; SQL statement:
select relname from pg_class where relkind='S' [42102-167]
[ ... ]
Caused by: org.h2.jdbc.JdbcSQLException: Sequence "SESSIONINFO_ID_SEQ" not found; SQL statement:
select nextval ('SESSIONINFO_ID_SEQ') [90036-167]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:169)
at org.h2.message.DbException.get(DbException.java:146)
at org.h2.schema.Schema.getSequence(Schema.java:474)
at org.h2.expression.Function.getSequence(Function.java:1281)
at org.h2.expression.Function.getValueWithArgs(Function.java:1129)
at org.h2.expression.Function.getValue(Function.java:447)
at org.h2.command.dml.Select.queryFlat(Select.java:519)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)
at org.h2.command.dml.Query.query(Query.java:307)
at org.h2.command.dml.Query.query(Query.java:277)
at org.h2.command.dml.Query.query(Query.java:36)
at org.h2.command.CommandContainer.query(CommandContainer.java:86)
at org.h2.command.Command.executeQuery(Command.java:191)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:306)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:149)
at java.lang.Thread.run(Unknown Source)
at org.h2.engine.SessionRemote.done(SessionRemote.java:538)
at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:151)
at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)
at $Proxy35.executeQuery(Unknown Source)
at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98)
... 47 more
I think the problem comes from the missing "install.demo.db" task in the ant file. I've searched if a script exists to create the tables in my database, but found nothing.
Could someone please tell me what I have to do to create the required tables and sequences? Or, if I'm totally wrong, where is the problem?