Patricia,

what XML parser are you using ? Let's see whether we can find any issues
related to XML parsing .. ;-)

Werner

Parker, Patricia (Contr) wrote:
> Werner,
> 
> Thanks for your reply.  I tried you suggestion, and still get the same
> error.  Since nobody else seems to be having the same problem, I have
> come to the conclusion that it must be something with my environment.
> When I first downloaded Castor a couple of months ago, I was using WSAD
> and developed a prototype project and everything worked great.  Since
> then, our project has "upgraded" to RAD 6.0, and things still worked
> pretty well in my prototype project.  However, when I went to integrate
> my solution into the main code base of my project, which is deployed as
> multiple web and java projects in RAD, I have not been able to get
> Castor to recognize any schemas, including the binding schema (as
> mentioned below) and custom-written schemas.  I have downloaded the
> Castor source, and have traced through the binding process using a
> debugger and the problems always occur when it tries to locate/load
> schema files. I may have my properties files in the wrong locations or
> something, but after spending two weeks trying everything I can think
> of, I'm at a loss.
> 
> Thanks for your help
> 
> Patty
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 21, 2006 2:55 PM
> To: [email protected]
> Subject: Re: [castor-user] [XML] Binding file schema issue
> 
> Patricia,
> 
> can you please change your binding file to the following:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <n1:binding xmlns:n1="http://castor.exolab.org/SourceGenerator/Binding";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://castor.exolab.org/SourceGenerator/Binding
> http://castor.org/binding.xsd";>
> <n1:elementBinding  name="/G00999012">
>       <java-class name="SomeJavaClass">
>                       <extends>AbstractJavaClass</extends>
>       </java-class>
> </n1:elementBinding>
> </n1:binding>
> 
> and see whether this makes a difference. Please note, though, that this
> should not be the final solution, as you'll be going to the
> http://castor.org on every access to your binding file. But let's first
> check whether this makes a difference .. ;-)
> 
> The small change to the xsi:schemaLocation attribute signals to the XML
> parser that it should try to download the XML Schema instance associated
> with the 'http://castor.exolab.org/SourceGenerator/Binding' from the
> castor.org site.
> 
> Alternatively, you could instruct the underlying parser (Xerces) no not
> validate your binding file (i.e. any XML document against its grammar).
> 
> Regards
> Werner
> 
> Parker, Patricia (Contr) wrote:
>> Hi Ralf,
>>
>> Unfortunately, I'm still having issues getting any XML to work with 
>> the binding.xsd that you reference below, or that I pull from the jar
> file.
>>
>> I thought that the problem may be with my XML, eventhough I basically 
>> just copied it from the website example binding.xml (and have even 
>> tested with the straight binding.xml from the web site).  So, I 
>> generated some new XML from the schema using XMLSpy, and ran the 
>> following XML against the schema through SourceGenerator:
>>
>> <?xml version="1.0" encoding="UTF-8"?> <n1:binding 
>> xmlns:n1="http://castor.exolab.org/SourceGenerator/Binding";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>>      
>> xsi:schemaLocation="http://castor.exolab.org/SourceGenerator/Binding
>>      binding.xsd">
>> <n1:elementBinding  name="/G00999012">
>>      <java-class name="SomeJavaClass">
>>                      <extends>AbstractJavaClass</extends>
>>      </java-class>
>> </n1:elementBinding>
>> </n1:binding>
>>
>> When I try to run SourceGenerator, I get the following error:
>>
>> --Unable to load a binding file due to the following Exception:
>> --------------------------------
>> Stack Trace for :Parsing Error : cvc-elt.1: Cannot find the 
>> declaration of element 'n1:binding'.
>> Line : 4
>> Column : 16
>> {file: file:///C:/cc_dev/ParkePa1/binding.xml; line: 4; column: 16} 
>> Parsing Error : cvc-elt.1: Cannot find the declaration of element 
>> 'n1:binding'.
>> Line : 4
>> Column : 16
>> {file: file:///C:/cc_dev/ParkePa1/binding.xml; line: 4; column: 16}
>>      at
>> org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:671)
>>      at
>> org.exolab.castor.builder.binding.BindingLoader.loadBinding(BindingLoa
>> de
>> r.java:128)
>>      at
>> org.exolab.castor.builder.binding.BindingLoader.createBinding(BindingL
>> oa
>> der.java:248)
>>      at
>> org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:84
>> 5) Caused by: org.xml.sax.SAXException: Parsing Error : cvc-elt.1: 
>> Cannot find the declaration of element 'n1:binding'.
>> (etc....)
>>
>> I then decided to run the XML against the schema outside Castor using 
>> a SAXParser utility I had written for my application that traps and 
>> reports all validation errors.  I get the following:
>>
>> Message List from test parser:  39-TargetNamespace.2: Expecting no 
>> namespace, but the schema document has a target namespace of 
>> 'http://castor.exolab.org/SourceGenerator/Binding'.
>>
>> Message List from test parser:  39-TargetNamespace.2: Expecting no 
>> namespace, but the schema document has a target namespace of 
>> 'http://castor.exolab.org/SourceGenerator/Binding'.
>>
>> I've been working on this problem for about a week now, and have 
>> consulted many people in my office and we are about out of ideas.
>>
>> Thanks for your help
>>
>> Patty
>>
>> -----Original Message-----
>> From: Ralf Joachim [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, April 12, 2006 5:34 PM
>> To: [email protected]
>> Subject: Re: [castor-user] [XML] Binding file schema issue
>>
>> Hi Patty,
>>
>> at 6-April-2006 we released 1.0 of castor and also updated the whole 
>> website but I am not aware of any influence this should have on your 
>> application. Having said that I double checked if anything had 
>> previously been available under 
>> http://www.castor.org/SourceGenerator/Binding and unfortionatly didn't
> 
>> find anything. If you like to refer to binding.xsd you better use 
>> http://www.castor.org/binding.xsd
>>
>> Hope you can find the problem soon
>> Ralf
>>
>>
>> Stephen Bash schrieb:
>>> Patty-
>>>
>>> I just checked, and there isn't a resource at 
>>> castor.org/SourceGenerator/Binding (though I can't say it never 
>>> existed), so my guess is something else in your local configuration 
>>> changed.  You might try assigning a namespace prefix to the current 
>>> default namespace to see if the error message changes (I'm not sure 
>>> if
>>> the error is null:java-class is expected or if it is 
>>> defaultNS:java-class is expected).  One possibility is that either 
>>> namespace processing or validation got toggled based on some settings
> 
>>> file used for something else, and either of those might cause 
>>> problems.
>>>
>>> Sorry I can't be more specific, but I'm not entirely sure what could 
>>> have changed...
>>>
>>> Stephen
>>>
>>>
>>> On 4/12/06, Parker, Patricia (Contr) <[EMAIL PROTECTED]>
> wrote:
>>>> Hi,
>>>>
>>>> I have been using the following binding XML for several weeks with 
>>>> no trouble...
>>>>
>>>> <binding
>>>> xmlns="http://www.castor.org/SourceGenerator/Binding";
>>>>
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>
>>>> xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding
>>>>                binding.xsd"
>>>>            defaultBindingType="element">
>>>>
>>>>   <elementBinding name="/MyElement">
>>>>      <java-class name="MyJavaClass">
>>>>
> <extends>com.package.ExtendThisClass</extends>
>>>>        </java-class>
>>>>   </elementBinding>
>>>> </binding>
>>>>
>>>> Yesterday (11-Apr-2006) I started getting the following parsing
> error:
>>>> Invalid content was found starting with element 'java-class'.  One 
>>>> of '{"":java-class, "":interface, "":member}' is expected
>>>>
>>>> I have not modified the binding.xsd that came with Castor.  Has 
>>>> something changed with www.castor.org/SourceGenerator/Binding?
>>>>
>>>> I am using Castor 0.9.9.1.  Unfortunately, I am constrained by my 
>>>> deployment environment to running Java 1.3, so I cannot upgrade to
>> Castor 1.0.
>>>> Thanks for your help!
>>>>
>>>> Patty
>> -------------------------------------------------
>> If you wish to unsubscribe from this list, please send an empty 
>> message to the following address:
>>
>> [EMAIL PROTECTED]
>> -------------------------------------------------
>>
>>
>> -------------------------------------------------
>> If you wish to unsubscribe from this list, please send an empty 
>> message to the following address:
>>
>> [EMAIL PROTECTED]
>> -------------------------------------------------
>>
>>
> 
> 
> -------------------------------------------------
> If you wish to unsubscribe from this list, please send an empty message
> to the following address:
> 
> [EMAIL PROTECTED]
> -------------------------------------------------
> 
> 
> -------------------------------------------------
> If you wish to unsubscribe from this list, please 
> send an empty message to the following address:
> 
> [EMAIL PROTECTED]
> -------------------------------------------------
> 
> 


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to