Hello, > -----Original Message----- > From: Ajitesh Das [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 05, 2003 6:12 AM > To: OJB Users List; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Newbie question, and request for any step by > step isolated > example > > > Hi: > Thanks a lot for detailing the steps required to make a > *isolated* example. > Just a quick clarification: > In step 4: > > Copy tutorial1 into a separate directory tree, > > copy the runtime configuration files described above > <snip> > >Try to run your copy of the tutorial1 with some-new-directory/ojb > >location, with all <INSTALL_DIR>/lib/*.jar stuff in the classpath. > > >When you have reached the point where hsql tries to > >open the database, and empty database will be created > <snip>
> How did you do that? Did you copy build.xml to your location As I pointed out, I did not do it the way I described it. I tried to imaging what could have worked ... I see two possibilities for step 4: 1. copy the build.xml and modify it to use the absolute paths to your actual OJB installation (rather then the relative ones.) As this involves understanding that script, this is not a good idea 2. use an IDE (or your own ant file or the like). That is what I did. > and modified the the targets to compile to copied > source and invoke to generate sqls.Can you please explain > this in little details. Here's what I actually did: I copied (nearly) the complete installation tree, especially the build-scripts, and the src and target subdirectories. Then I threw away step-by-step the non-tutorial and non-junit stuff, i.e., the OJB sourcen themselves. I used an IDE to compile my own copy of the tutorial, so I did not have to modify the build.xml. I tried for a while to separate the torque-xml stuff, which is needed to prepare the database but I did not succeed, in particular because I tried to use sybase, which is not perfectly supported. In the end, I took the generated sql scripts as a starting point and modified them according to my needs. I am afraid I cannot give you more detailed advice. I bet you realize that what I did was not systematic either. Meanwhile I have managed to integrate torque into my build-process. Some (not self-contained) snippets from my build.xml below. But, again, I cannot offer you something isolated that actually works, sorry. ------------------------------------------------------------------ <path id="torque.classpath"> <pathelement location="${dir.lib}/${jar.torque}"/> <pathelement location="${dir.lib}/${jar.velocity}"/> <pathelement location="${dir.lib}/${jar.commons-collections}"/> <pathelement location="${dir.lib}/${jar.commons-lang-mod}"/> <pathelement location="${dir.lib}/${jar.log4j}"/> <pathelement location="${hsqldb.jar}"/> <pathelement location="${jconn.jar}"/> </path> <!-- executes an sql script against a specified database. --> <taskdef name="torque-insert-sql" classname="org.apache.torque.task.TorqueSQLExec" classpathref="torque.classpath"> </taskdef> <!-- Create the hsqldb test database from scratch. --> <target name="database-create-hsqldb" depends="delete-database-hsqldb"> <mkdir dir="${dir.testing.run}"/> <torque-insert-sql driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:${dir.testing.run}/TESTBASE" userid="sa" password="" autocommit="true" onerror="continue" sqldbmap="${dir.gen_ddl}/hsqldb/sqldb.map" srcDir="${dir.gen_ddl}/hsqldb"> > </torque-insert-sql> </target> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]