Hi Phil,

----- Original Message -----
From: "Phil Warrick" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, October 29, 2002 8:33 PM
Subject: j2EE: how to deploy the test hsqldb


> Hi,
>
> I'm getting close to finally getting the cvs head ejb examples to work
> with a remote client (more on the pain involved with the
> build-xdoclet.xml file and creating a client perhaps later).  My
problem
> is that I don't know how to deploy the hsqldb with the test tables
> (table "Artikle", etc.) to jboss.
>

Do a
bin\build.bat prepare-testdb
on OJB to generate hsql test tables.
Take the generated OJB.script file from .../target/test
and rename the file to default.script.
Replace the in
JBoss\server\default\db\hypersonic
default.script with the new file.

In your repository file define

<jdbc-connection-descriptor
     platform="Hsqldb"
     jdbc-level="2.0"
     jndi-datasource-name="java:DefaultDS"
     username="sa"
     password=""
  eager-release="true"
   />

That's it.

HTH
regards,
Armin

> 1) If I use the default hsqldb location java:DefaultDS, I get a file
i/o
> error, and I can't see that the correct table definitions would exist
by
> default:
>
> 14:24:11,490 INFO  [Server] JBoss (MX MicroKernel) [3.0.3
> Date:200209301503] Started in 0m:20s:379ms
> 14:24:22,466 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:24:22,466 INFO  [STDOUT] ojbPrepare was called
> 14:24:22,476 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:24:22,476 INFO  [STDOUT] Use OJB repository file: repository.xml
> 14:24:22,526 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:24:22,526 INFO  [STDOUT] getArticleCount was called
> 14:24:22,526 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:24:22,526 INFO  [STDOUT] getBroker was called
> 14:24:22,536 INFO  [STDOUT]
> [org.apache.ojb.broker.ta.PersistenceBrokerFactoryDe
> faultImpl] INFO:
> 14:24:22,536 INFO  [STDOUT] Already created persistence broker
instances: 0
> 14:24:22,636 INFO  [STDOUT] settign eager: false
> 14:24:22,827 INFO  [STDOUT]
> [org.apache.ojb.broker.util.sequence.SequenceManager
> Factory] INFO:
> 14:24:22,837 INFO  [STDOUT] Use sequence manager class: class
> org.apache.ojb.bro
> ker.util.sequence.SequenceManagerHiLoImpl
> 14:24:22,907 INFO  [STDOUT]
> [org.apache.ojb.broker.accesslayer.AbstractConnectio
> nFactory] ERROR:
> 14:24:22,907 INFO  [STDOUT] Error getting Connection from
DriverManager
> with url
>   (jdbc:hsqldb:java:/DefaultDS) and driver (org.hsqldb.jdbcDriver)
> 14:24:22,917 INFO  [STDOUT] File input/output error:
> java:/DefaultDS.properties
> 14:24:22,917 ERROR [STDERR] java.sql.SQLException: File input/output
> error: java:/DefaultDS.properties
> 14:24:22,927 ERROR [STDERR]     at
org.hsqldb.Trace.getError(Trace.java:180)
> 14:24:22,927 ERROR [STDERR]     at
org.hsqldb.Trace.getError(Trace.java:144)
> 14:24:22,937 ERROR [STDERR]     at
org.hsqldb.Trace.error(Trace.java:205)
> 14:24:22,937 ERROR [STDERR]     at
> org.hsqldb.Log.saveProperties(Log.java:630)
> 14:24:22,937 ERROR [STDERR]     at org.hsqldb.Log.create(Log.java:521)
> 14:24:22,947 ERROR [STDERR]     at org.hsqldb.Log.open(Log.java:159)
> 14:24:22,947 ERROR [STDERR]     at
> org.hsqldb.Database.<init>(Database.java:96)
> 14:24:22,947 ERROR [STDERR]     at
> org.hsqldb.jdbcConnection.openStandalone(jdbc
> Connection.java:926)
>
>
> 2) If I put the hsqldb files OJB.script and OJB.properties in the .sar
> file (say in target\test\OJB), there is a complaint about writing to
> that file.
>
> 3) If I put them in the jboss\bin directory, I get a "wrong database
> version" problem:
>
> 14:18:35,440 INFO  [MainDeployer] Deployed package:
> file:/C:/jboss/jboss-3.0.3/s
> erver/default/conf/jboss-service.xml
> 14:18:35,450 INFO  [Server] JBoss (MX MicroKernel) [3.0.3
> Date:200209301503] Started in 0m:20s:28ms
> 14:18:50,772 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean]
> 14:18:50,772 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:18:50,772 INFO  [STDOUT] ojbPrepare was called
> 14:18:50,772 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:18:50,772 INFO  [STDOUT] Use OJB repository file: repository.xml
> 14:18:50,822 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:18:50,822 INFO  [STDOUT] getArticleCount was called
> 14:18:50,832 INFO  [STDOUT] [org.apache.ojb.ejb.PBSessionBean] INFO:
> 14:18:50,832 INFO  [STDOUT] getBroker was called
> 14:18:50,832 INFO  [STDOUT]
> [org.apache.ojb.broker.ta.PersistenceBrokerFactoryDe
> faultImpl] INFO:
> 14:18:50,842 INFO  [STDOUT] Already created persistence broker
instances: 0
> 14:18:50,943 INFO  [STDOUT] settign eager: false
> 14:18:51,143 INFO  [STDOUT]
> [org.apache.ojb.broker.util.sequence.SequenceManager
> Factory] INFO:
> 14:18:51,153 INFO  [STDOUT] Use sequence manager class: class
> org.apache.ojb.bro
> ker.util.sequence.SequenceManagerHiLoImpl
> 14:18:51,223 INFO  [STDOUT]
> [org.apache.ojb.broker.accesslayer.AbstractConnectio
> nFactory] ERROR:
> 14:18:51,233 INFO  [STDOUT] Error getting Connection from
DriverManager
> with url
>   (jdbc:hsqldb:target/test/OJB) and driver (org.hsqldb.jdbcDriver)
> 14:18:51,243 INFO  [STDOUT] Wrong database file version
> 14:18:51,243 ERROR [STDERR] java.sql.SQLException: Wrong database file
> version
> 14:18:51,243 ERROR [STDERR]     at
org.hsqldb.Trace.getError(Trace.java:180)
> 14:18:51,253 ERROR [STDERR]     at
org.hsqldb.Trace.getError(Trace.java:144)
> 14:18:51,253 ERROR [STDERR]     at
org.hsqldb.Trace.check(Trace.java:276)
> 14:18:51,253 ERROR [STDERR]     at
org.hsqldb.Trace.check(Trace.java:260)
> 14:18:51,263 ERROR [STDERR]     at org.hsqldb.Log.open(Log.java:185)
> 14:18:51,263 ERROR [STDERR]     at
> org.hsqldb.Database.<init>(Database.java:96)
> 14:18:51,263 ERROR [STDERR]     at
> org.hsqldb.jdbcConnection.openStandalone(jdbc
> Connection.java:926)
>
> Any help would be most appreciated.
>
> Thanks,
>
> Phil
>
>
> --
> To unsubscribe, e-mail:
<mailto:ojb-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ojb-user-help@;jakarta.apache.org>
>
>
>


--
To unsubscribe, e-mail:   <mailto:ojb-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-user-help@;jakarta.apache.org>

Reply via email to