Re: Schema 'OPENJMS' does not exist

Tim Anderson <[email protected]> Thu, 31 May 2007 11:32:27 +1000
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
You need to specify the derby system property "derby.system.home"

This is currently configured in $OPENJMS_HOME/bin/setenv.bat as:
  -Dderby.system.home=%OPENJMS_HOME%\db

-Tim

michaelcouck wrote:
> Hi,
>
> I am starting the server programatically like the following:
>
> System.setProperty("openjms.home", "C:/openjms-0.7.7-beta-1");
> String configuration = "config/openjms.xml";
> JmsServer jmsServer = new JmsServer(configuration);
> jmsServer.init();
>
> Everything goes well until I get the below exception from the database. I
> assume that the database (Derby?) doesn't have the schema, like the
> exception says, how do I create the schema for the database?
>
>
> OpenJMS 0.7.7-beta-1
> The OpenJMS Group. (C) 1999-2007. All rights reserved.
> http://openjms.sourceforge.net
> Exception in thread "main" org.exolab.jms.server.ServerException:
> org.exolab.jms.persistence.PersistenceException:
> org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from
> pool failed
> 	at
> org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:93)
> 	at
> org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:185)
> 	at
> org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:278)
> 	at
> org.exolab.jms.persistence.RDBMSAdapter.getSchemaVersion(RDBMSAdapter.java:862)
> 	at org.exolab.jms.persistence.RDBMSAdapter.<init>(RDBMSAdapter.java:179)
> 	at
> org.exolab.jms.persistence.DatabaseService.createAdapter(DatabaseService.java:311)
> 	at
> org.exolab.jms.persistence.DatabaseService.doStart(DatabaseService.java:240)
> 	at org.exolab.jms.service.Service.start(Service.java:97)
> 	at org.exolab.jms.service.ServiceManager.doStart(ServiceManager.java:176)
> 	at org.exolab.jms.service.Service.start(Service.java:97)
> 	at org.exolab.jms.server.JmsServer.init(JmsServer.java:146)
> 	at com.norkom.jms.BootStrap.main(BootStrap.java:13)
> Caused by: SQL Exception: Schema 'OPENJMS' does not exist
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
> Source)
> 	at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
> Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
> Source)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
> Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown
> Source)
> 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown
> Source)
> 	at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
> Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown
> Source)
> 	at
> org.apache.commons.dbcp.PoolingConnection.makeObject(PoolingConnection.java:188)
> 	at
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:747)
> 	at
> org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:87)
> 	... 11 more
>
>
>
>
> Thanks in advance.
>
> Michael
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/