<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    PostgreSQL - empty database - install.demo.db does not exist
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/wishmaster7">wishmaster7</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/787619#787619">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello everybody,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 <a class="jive-link-external-small" href="http://docs.jboss.org/jbpm/v5.4/userguide/ch.installer.html#d0e609">documentation</a> 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".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 "<em>a more advanced process including human task and persistence</em>", and when I run the testProcess() method of the jUnit test class, it gives me an error ending by : </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>ERROR tool.hbm2ddl.SchemaUpdate.execute&#160; - could not get database metadata</p><p>org.h2.jdbc.JdbcSQLException: Table "PG_CLASS" not found; SQL statement:</p><p>select relname from pg_class where relkind='S' [42102-167]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>[ ... ]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Caused by: org.h2.jdbc.JdbcSQLException: Sequence "SESSIONINFO_ID_SEQ" not found; SQL statement:</p><p>select nextval ('SESSIONINFO_ID_SEQ') [90036-167]</p><p>&#160;&#160;&#160; at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)</p><p>&#160;&#160;&#160; at org.h2.message.DbException.get(DbException.java:169)</p><p>&#160;&#160;&#160; at org.h2.message.DbException.get(DbException.java:146)</p><p>&#160;&#160;&#160; at org.h2.schema.Schema.getSequence(Schema.java:474)</p><p>&#160;&#160;&#160; at org.h2.expression.Function.getSequence(Function.java:1281)</p><p>&#160;&#160;&#160; at org.h2.expression.Function.getValueWithArgs(Function.java:1129)</p><p>&#160;&#160;&#160; at org.h2.expression.Function.getValue(Function.java:447)</p><p>&#160;&#160;&#160; at org.h2.command.dml.Select.queryFlat(Select.java:519)</p><p>&#160;&#160;&#160; at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)</p><p>&#160;&#160;&#160; at org.h2.command.dml.Query.query(Query.java:307)</p><p>&#160;&#160;&#160; at org.h2.command.dml.Query.query(Query.java:277)</p><p>&#160;&#160;&#160; at org.h2.command.dml.Query.query(Query.java:36)</p><p>&#160;&#160;&#160; at org.h2.command.CommandContainer.query(CommandContainer.java:86)</p><p>&#160;&#160;&#160; at org.h2.command.Command.executeQuery(Command.java:191)</p><p>&#160;&#160;&#160; at org.h2.server.TcpServerThread.process(TcpServerThread.java:306)</p><p>&#160;&#160;&#160; at org.h2.server.TcpServerThread.run(TcpServerThread.java:149)</p><p>&#160;&#160;&#160; at java.lang.Thread.run(Unknown Source)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; at org.h2.engine.SessionRemote.done(SessionRemote.java:538)</p><p>&#160;&#160;&#160; at org.h2.command.CommandRemote.executeQuery(CommandRemote.java:151)</p><p>&#160;&#160;&#160; at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)</p><p>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)</p><p>&#160;&#160;&#160; at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)</p><p>&#160;&#160;&#160; at $Proxy35.executeQuery(Unknown Source)</p><p>&#160;&#160;&#160; at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:98)</p><p>&#160;&#160;&#160; ... 47 more</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/787619#787619">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>