Running on WinXP Pro, not as a service. I'm just starting it up from the command line.

Regarding file permissions, I'm pretty certain that these aren't causing any problems because the relevant files are apparently being read... as I mentioned before, I know this because if I put some bad markup into the files, I get exceptions telling me so.

phil.

Daniel Perry wrote:

I have it working in tomcat 5 and 4.

Is this under linux or windows?

Have you checked file permissions? (especially if XP and tomcat service ?)

Have you tried running tomcat in user mode rather than service?

Daniel.




-----Original Message-----
From: WHIRLYCOTT [mailto:[EMAIL PROTECTED]
Sent: 24 June 2004 14:19
To: OJB Users List
Subject: Re: OJB + tomcat + OJB.properties


Yes, I have the repository.dtd in my WEB-INF/classes dir as well. I'm using that in Eclipse to validate my repository.xml file.

One difference is that I'm using Tomcat 5.0.18.  Would you mind
repeating your experiment using a version of Tomcat 5?

I'm trying to figure out what I know at this point:

1) when working on the command line, I can use my OJB.properties and
repository.xml file just fine (and can pass 12 junit tests against my
database)

2) when running inside Tomcat, OJB.properties is being read

3) when running inside Tomcat, repository.xml is being read

4) the error message that OJB is giving is either incorrect or not very
useful

If you can try your test out in Tomcat 5, I'd love to know if that makes
a difference.

phil.

Thomas Dudziak wrote:


WHIRLYCOTT wrote:


I have this in my OJB.properties file:

   repositoryFile=repository.xml

I purposely put some jibberish in the repository.xml file earlier on
and I did indeed get an exception indicating that there was a problem
reading the file.  Based on this, I am assuming that the file is
accessible and is being read.

I also know that the repository.xml file is valid because when I run
my test cases inside Eclipse, I'm able to insert/update/select/delete
from the database using the default connection.

It's very odd, but I'm thinking that there is a bug somewhere in the
OJB code that loads the file.  I started poking around the source
earlier on and will try to get into it more later.

If you have more ideas, I'd love to hear them and try them out.


I just tried a very simple servlet that uses PB-Api with OJB, Tomcat
4.1.18, JDK 1.4.2 on WinXP, and it works. One thing I stumbled upon was
that I forgot to put the repository.dtd into the classes folder. Since
OJB parses XML files with validation turned on, this lead to an

error in

the XML parser. This is the layout that worked for me:

\<webappname>
 \WEB-INF
   web.xml
   \classes
     <servlet classes>
     OJB.properties
     repository.dtd
     repository.xml
     repository_user.dtd
     repository_database.dtd

The connection descriptor is:

   <jdbc-connection-descriptor
          jcd-alias="default"
          default-connection="true"
          platform="MySQL"
          jdbc-level="3.0"
          driver="com.mysql.jdbc.Driver"
          protocol="jdbc"
          subprotocol="mysql"
          dbalias="//localhost/test"
          username="***"
          password="***"
               eager-release="false"
          batch-mode="false"
       useAutoCommit="1"
       ignoreAutoCommitExceptions="false"
    />


Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


-- Whirlycott Philip Jacob [EMAIL PROTECTED] http://www.whirlycott.com/phil/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to