No, it gives the same error.  Any other ideas - this is a showstopper for me.
 
I'm running this on Tomcat, using the Spring framework.  Here's the relevant
part of the stacktrace:
 
java.io.FileNotFoundException: castor_mapping.xml\castor_mapping.xml (The
system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(Unknown Source)
at org.exolab.castor.util.DTDResolver.resolveEntity(DTDResolver.java:306)
at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:243)
at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:221)
.... etc.
 
 
-----Original Message-----
From: Singh, Harjit [mailto:[EMAIL PROTECTED] 
Sent: 10 July 2007 20:44
To: [email protected]
Subject: RE: [castor-user] Problem loading xml mapping file



        Try this
         
        Mapping mapping = new
Mapping(Thread.currentThread().getContextClassLoader());

        mapping.loadMapping("castor_mapping.xml");

         

        - Harjit


  _____  

                From: Barron, Ken (KCTP) [mailto:[EMAIL PROTECTED] 
                Sent: Tuesday, July 10, 2007 11:55 AM
                To: [email protected]
                Subject: [castor-user] Problem loading xml mapping file
                
                

                Hi 
                I'm new to castor and I must be doing something very silly,
but I can't get my xml mapping file to load.  I am using the latest version
of castor, castor-1.1.2.1.jar

                I have placed the file castor_mapping.xml on the classpath of
my webapp (directly under WEB-INF/classes where all my other .properties
files and config files are being picked up successfully).

                I am using the instructions: 
                Mapping mapping = XMLContext.createMapping(); 
                mapping.loadMapping("castor_mapping.xml"); 

                and I get the following FileNotfound exception: 
                java.io.FileNotFoundException:
castor_mapping.xml\castor_mapping.xml (The system cannot find the path
specified) 

                Notice how the filename is repeated twice? 

                I tried variations on the load statement such as 
                Mapping mapping = new Mapping(); 
                mapping.loadMapping("castor_mapping.xml"); 

                but they all give the same result. 

                What am i doing wrong? 

                Regards 
                Ken 

        
        This email, including attachments, may include confidential and/or
        proprietary information, and may be used only by the person or entity
        to which it is addressed.  If the reader of this email is not the 
        intended recipient or his or her authorized agent, the reader is 
        hereby notified that any dissemination, distribution or copying of
this 
        email is prohibited. If you have received this email in error, 
        please notify the sender by replying to this message and delete this 
        email immediately.
        
        

Reply via email to