-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'll check on this as a bug... but FYI, Here's how I lookup my
database.xml and mapping.xml file (and I use it in my classpath)

jdo = new JDO();
jdo.setClassLoader( getClass().getClassLoader() );
do.setConfiguration(getClass().getResource("/database.xml").toString());
jdo.setDatabaseName(dbname);

and in my database.xml, I have this for the mapping.xml file:

<mapping href="mapping.xml"/>

and both files are in the webapp classpath, (in
          <appname>/WEB-INF/classes
in my case, in the top level, so they are
          <appname>/WEB-INF/classes/database.xml
          <appname>/WEB-INF/classes/mapping.xml

I'll check out the file: case...

> Date: Tue, 21 May 2002 15:58:47 -0500
> From: Keith Visco <[EMAIL PROTECTED]>
> 
> Hi Jessica,
> 
> Looks like a bug to me. Perhaps the JDO guys (Thomas, Bruce, Ned, or
> Low) can have a look into it.
> 
> You might also want to report this via bugzilla (bugzilla.exolab.org) so
> that you can track it more easily and so that it doesn't get lost among
> the other list messages.
> 
> Thanks,
> 
> --Keith
> 
> Jessica Perry Hekman wrote:
> > 
> > The Castor docs seem to imply that, if the database config file gives a
> > relative URL for the mapping file, Castor should look in the same
> > directory as the database file:
> > 
> >  http://castor.exolab.org/database-conf.html
> > 
> >  The mapping file is specified using a URL, typically a file: URL.
> >  If the database configuration file and mapping file reside in the same
> >  directory, use a relative URL.
> > 
> > However, in my Castor 0.9.3.9 installation, when the mapping file is
> > specified with a relative URL, Castor looks relative to the directory in
> > which I ran the Tomcat start script (/home/jphekman/src/clownbike/), not
> > at the directory in which the database file is located
> > (/usr/local/tomcat/webapps/clownbike/WEB-INF/conf/).
> > 
> > The config file:
> > 
> > <!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version
> > 1.0//EN" "http://castor.exolab.org/jdo-conf.dtd";>
> > <database name="clownbike">
> >   <driver class-name="org.postgresql.Driver"
> >     url="jdbc:postgresql://localhost/clownbike">
> >     <param name="user" value="clownbike" />
> >     <param name="password" value="" />
> >   </driver>
> > 
> >   <!-- TODO there seems to be no way to make this relative, but the full
> > path is clearly not a long-term solution -->
> >   <!-- <mapping
> > href="/usr/local/tomcat/webapps/clownbike/WEB-INF/conf/mapping.xml" /> -->
> >   <mapping href="mapping.xml" />
> > 
> > </database>
> > 
> > The error:
> > 
> > Error: Nested error: org.xml.sax.SAXException: Parsing Error : File
> > "file:///home/jphekman/src/clownbike/mapping.xml" not found.
> > Line : 0 Column : 0
> > 
> > Am I doing something wrong? Help!
> > 

- -- 

Virtually, 
Ned Wolpert <[EMAIL PROTECTED]>

D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Public key at http://www.keyserver.net

iD8DBQE868ewiysnOdCML0URAom8AJ9hSnEEh2xpBa1GaJjqCJqZGx3A/ACfb2gQ
LrhzIWgOqWVbnucwW0/9vlE=
=++AX
-----END PGP SIGNATURE-----

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to