Hello all,

I recently started writing a (fairly simple) webapplication using
Struts, but I needed something to handle object persistence from my DB.
I thought for a bit about writing my own code to do this, then realized
that someone must have done it already. :) So I found Torque.

Setting up Torque, while difficult (I tried running through the tutorial
with no success.  Is it written for the current (3.0-b3) version?),
wasn't too bad.  I managed to integrate it with my existing build
system, to auto-generate the SQL to create the database and schema, and
even to roll it into a WAR for easy deployment.

I then wrote a small command-line test app, which worked fine.  But when
I tried to integrate Torque with my webapp, I had several problems.
First was that I wasn't sure how to initialize Torque inside the webapp,
given that the Torque.properties file was also inside the webapp.  After
a busy day of coding, I figured out how to load the properties file as a
resource (via the classloader), convert that to a
PropertiesConfiguration, and initialize Torque with that.  I was on my
way!

Except.  I cannot figure out what to do with the logs Torque is trying
to open.  Torque initialization is trying to open the logs, and Tomcat
is reporting various types of AccessControlException.  The odd part is
that I updated the properties file to write all the logs to
/var/log/webapps/, but the exception is coming from an attempt to acces
'./logs', which isn't mentioned in the properties file anywhere!  I also
noticed that whenever I run the Torque build scripts (from ant, from the
commandline) a file named 'velocity.log' is created in the current
directory.

How can I reconfigure Torque to put the logs in the proper place?  Am I
doing something incredibly stupid?  Does anyone have any advice for my
silly little webapp?

Thanks for your help,
John Cater
[EMAIL PROTECTED]

Attachment: msg00575/pgp00000.pgp
Description: PGP signature

Reply via email to