Jody Garnett wrote:
> Okay so I have managed to accomplish the following:
>
> gt-metadata
> - now depends on jaxb 2.1.5 as "provied"
> - a java 5 profile is used to add the dependency
> - the dummy dependency stays as "provided"; it just occurs after
>
> gt-core
> - now depends on jaxb 2.1.5 explicitly
> - the dummy jar is not showing up in the mvn eclipse:eclipse generated 
> project
>
> I was only ever able to find jaxb-api and jaxb-impl --- I was unable to 
> find jaxb-libs for 2.1.5.
> As a result I have one test failure:
> XSQNameBindingTest:
>   
>> java (1)
>> org.geotools.xs.bindings.XSQNameBindingTest
>> testWithNoPrefix(org.geotools.xs.bindings.XSQNameBindingTest)
>> java.lang.IllegalArgumentException: prefix bar is not bound to a namespace
>>     at javax.xml.bind.DatatypeConverterImpl._parseQName(Unknown Source)
>>     at javax.xml.bind.DatatypeConverterImpl.parseQName(Unknown Source)
>>     at javax.xml.bind.DatatypeConverter.parseQName(Unknown Source)
>>     at 
>> org.geotools.xs.bindings.XSQNameBinding.parse(XSQNameBinding.java:106)
>>     at 
>> org.geotools.xs.bindings.XSQNameBindingTest.testWithNoPrefix(XSQNameBindingTest.java:44)
>>     
The test case appears good; it is just that the functionality of JaxB 
has changed!
Internally XSQNameBinding is using a couple of java classes:
- NamespaceContext
- DatatypeConverter - we are using an internal

I have a patch for XSQNameBinding to follow the "new" contract of 
throwing an IllegalArgumentException - rather than returning a null QName.
>     public Object parse(InstanceComponent instance, Object value)
>         throws Exception {
>         
>         try {
>             QName qName = DatatypeConverter.parseQName((String) value, 
> namespaceContext);
>
>             if (qName != null) {
>                 return qName;
>             }
>         }
>         catch (IllegalArgumentException noNamespace){
>             Logger.getLogger("org.geotools.xs.bindings").fine( 
> noNamespace.toString() );
>         }
>         if (value == null) {
>             return new QName(null);
>         }
With this patch applied the build runs; and I will try testing in 
eclipse shortly.
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to