Yes, we were hit with that bug as well in the 0.9.6 version too. Using the
InputSource object worked for us too.
Does anyone know why the FileReader is appending the path twice?
Just curious,
- Tim
-----Original Message-----
From: Bhatia Saurabh (CHA) [mailto:[EMAIL PROTECTED]
Sent: Monday, November 29, 2004 10:03 AM
To: '[EMAIL PROTECTED]'
Subject: Re: [castor-user] Mapping file not found
Ar,
Use the InputSource object and not the FileReader when you load the mapping
and when you unmarshal.
Example
mapping.loadMapping(new InputSource(new
FileInputStream(defaultFileNameMapping)));
unmar = new Unmarshaller(mapping);
yourObj = (yourObj)unmar.unmarshal(new InputSource(new
FileReader(defaultFileName)));
This should solve your problem.
Saurabh
-----Message d'origine-----
De : ar [mailto:[EMAIL PROTECTED]
Envoy� : lundi, 29. novembre 2004 15:40
� : [EMAIL PROTECTED]
Objet : [castor-user] Mapping file not found
Hi all,
Having duplicate attributes problem, I decided to upgrade my Castor XML jar
library to castor-0.9.5.4-xml.jar.
Now, I get a java.io.FileNotFoundException. With castor-0.9.5.3-xml.jar I
didn't have such an error.
The path of the file Castor can't find is something like :
C:\Java\myproject\mapping\common\C:\Java\myproject\mapping\common\MyMapping.
xml
It should search for :
C:\Java\myproject\mapping\common\MyMapping.xml
The filename I gave to the setMapping method was :
C:\\Java\\myproject/mapping/common/MyMapping.xml
where "C:\\Java\\myproject" is got using System.getProperty(...) and
completed with "/mapping/common/MyMapping.xml".
Can somebody tell me how to solve this problem ?
--
A. ROY
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user