Page 1 of 1

Startup Database Errors

Posted: Mon Feb 02, 2015 11:19 pm
by alan@groupbyinc
I'm trying to get the Broadlead Commerce Enterprise 1.5 edition up-and-running on Tomcat. I've built the mycompany.war and all I want to do is deploy it to a standalone Tomcat instance with a HSQLDB datasource (for demo purposes).

Whenever I startup the application, the logs in Tomcat's catalina.out show numerous errors, most of them being something like:
[ERROR] 18:35:35 SchemaExport - HHH000389: Unsuccessful: alter table BLC_TRANS_ADDITNL_FIELDS drop foreign key FK376DDE4B9E955B1D
[ERROR] 18:35:35 SchemaExport - user lacks privilege or object not found: PUBLIC.BLC_TRANS_ADDITNL_FIELDS
[ERROR] 18:35:35 ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'blCloneCacheInitializer': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: user lacks privilege or object not found: BLC_SNDBX_WRKFLW_CLONE_LIB

There must some configuration I'm missing somewhere that I haven't figured out at the moment.
What I've done:
- started HSQLDB using the Ant start-db target
- for my standalone Tomcat I've set CATALINA_OPTS to:
-javaagent:/Users/alan/.m2/repository/org/springframework/spring-instrument/4.1.4.RELEASE/spring-instrument-4.1.4.RELEASE.jar
- added to Tomcat's conf/context.xml file the following JNDI entries:
<Resource name="jdbc/web" auth="Container" type="javax.sql.DataSource"
username="sa" password="" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/broadleaf"/>
<Resource name="jdbc/secure" auth="Container" type="javax.sql.DataSource"
username="sa" password="" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/broadleaf"/>
<Resource name="jdbc/storage" auth="Container" type="javax.sql.DataSource"
username="sa" password="" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/broadleaf"/>
<Resource name="jdbc/event" auth="Container" type="javax.sql.DataSource"
username="sa" password="" driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:hsql://localhost/broadleaf"/>

My guess is that this could be related to the hibernate.hbm2ddl.auto property configuration somewhere, but how do I know which properties file is being used as the default on startup?