Hi,

looking at the stack trace, you can see that it is the XML parser
directly (Xerces in your case) that reports this fatal error.

Would you have a problem sending me the file (or attaching it to a Jira
issue) so that we can have a more detailed look ?

Kind Regards
Werner

On 25.03.2011 13:55, rag007 wrote:
> 
> Please see this
> 
> org.xml.sax.SAXException: Parsing Error : Premature end of file.
> Line : -1
> Column : -1
> 
>       at
> org.exolab.castor.xml.UnmarshalHandler.fatalError(UnmarshalHandler.java:2228)
>       at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
>       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
>       at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown
> Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>       at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
>       at 
> org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:532)
>       at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:453)
> 
> 
> 
> Werner Guttmann-6 wrote:
>>
>> Hi,
>>
>> can please you show me the complete stack trace ?
>>
>> Kind Regards
>> Werner
>>
>> On 25.03.2011 13:17, rag007 wrote:
>>>
>>> Thanks for your reply.
>>>
>>> I tried what you said. I am getting error like
>>>
>>> Nested error: org.xml.sax.SAXException: Parsing Error : Premature end of
>>> file.
>>> Line : -1
>>> Column : -1
>>>
>>> I used like,
>>>
>>> mapping.loadMapping(new InputSource(mappingUrl.toString());
>>> (toAbsolutePath is not available in this class java.net.URL)
>>>
>>> I tried so many ways. What is the problem? Can you explain?
>>> Thanks in advance.
>>>
>>>
>>>
>>> Werner Guttmann-6 wrote:
>>>>
>>>> Hi,
>>>>
>>>> why not go about using a SAX InputSource for configuring Castor with a
>>>> mapping ? In other words, something similar to ....
>>>>
>>>> URL mappingurl =
>>>>    getClass().getClassLoader().getResource("com/test/mapping.xml");
>>>> mapping.loadMapping(new InputSource(mappingUrl.toAbsolutePath());
>>>>
>>>> Kind Regards
>>>> Werner
>>>>
>>>> On 25.03.2011 08:48, rag007 wrote:
>>>>>
>>>>> Hi All,
>>>>>
>>>>> I am using castor 1.3. I am using mapping file. I placed in my mapping
>>>>> file
>>>>> like this
>>>>>
>>>>> com.test
>>>>>    -TestOne.java
>>>>>    -mapping.xml
>>>>>
>>>>> In TestOne.java, i am using like
>>>>>
>>>>> Mapping mapping = new Mapping();
>>>>> mapping.loadMapping("D:/test/TestProject/com/test/mapping.xml");
>>>>>
>>>>> Instead of the full path, Is it possible to give like this
>>>>> mapping.loadMapping("mapping.xml")?
>>>>>
>>>>> I tried like this also
>>>>> java.net.URL
>>>>> mappingurl=getClass().getClassLoader().getResource("com/test/mapping.xml");
>>>>> Mapping mapping = new Mapping();
>>>>> mapping.loadMapping(mappingurl);
>>>>>
>>>>> I am getting error. I dont know the problem.
>>>> What error are you actually getting ?
>>>>>
>>>>> please help me asap. Thanks in advance.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe from this list, please visit:
>>>>
>>>>     http://xircles.codehaus.org/manage_email
>>>>
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to