Ok.  After alot of consternation, I figured something out.  Castor doesn't
like to be told what file to use.  It will, however, work with an
InputSource.  Fortunately, the InputSource will take the file name normally.
So there is the workaround.  

There are 3 versions of the loadMapping() method:

 void loadMapping(org.xml.sax.InputSource source) 
          Loads the mapping from the specified input source. 
 void loadMapping(java.lang.String url) 
          Loads the mapping from the specified URL. 
 void loadMapping(java.net.URL url) 
          Loads the mapping from the specified URL. 

Use the first one, but not either of the last two.  If anyone has been able
to make the alst two work with directory names, let me know.

Thanks for your help,
David

-----Original Message-----
From: Escandell, David 
Sent: Thursday, August 16, 2001 7:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Problem with MappingFile


Hmmm...  This is very weird.  I tried the URL syntax, and then I get strange
java.net errors such as connection refused.  Castor doesnt seem to like any
directorys added to the filename.  Has anyone else experienced this?  Have
you found a way around it?

Thanks
David

-----Original Message-----
From: Keith Visco [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 2:35 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Problem with MappingFile




Hi David,

Try using URL syntax...I think it's a bug that normal file syntax
doesn't work...but I believe the following works:

file:///C|/.../.../mapping.xml

--Keith


"Escandell, David" wrote:
> 
> I am using Castor for the XMl-Object functionality.  I seem to be having a
> problem when I give Castor filenames which include directories.  It
returns
> an error saying that it cannot find the file.  If I remove the directory
> name from the file name, everything works fine.  Does this make any sense?
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

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

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

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

Reply via email to