<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Ok, i've finally found the problem....<br>
The setLocales() method in DefaultMetadata was using
Locale.ENGLISH.... I've solved using Locale.UK<br>
Is it a normal behavior that we cannot speficy Locale.ENGLISH
here??<br>
<br>
Emmanuel<br>
<br>
<br>
Le 22/07/2014 11:32, Emmanuel Blondel a écrit :<br>
</div>
<blockquote cite="mid:53CE2F9F.70008@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<font size="-1">Hello,<br>
<br>
I'm currently doing an attempt to move from Geotoolkit 3.21 to
4.0-M1, in order to progressively move to Apache SIS.<br>
I'm getting the following error with a test to marshall the
metadata. Any idea?<br>
<br>
Thanks in advance<br>
<br>
<br>
javax.xml.bind.MarshalException<br>
- with linked exception:<br>
[com.sun.istack.internal.SAXException2<br>
java.lang.NullPointerException]<br>
at
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:311)<br>
at
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:236)<br>
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:116)<br>
at
org.apache.sis.xml.PooledMarshaller.marshal(PooledMarshaller.java:151)<br>
at org.apache.sis.xml.XML.marshal(XML.java:341)<br>
at
org.fao.fi.gems.GeographicEntityMetadataMarshallerTest.testMarshalling(GeographicEntityMetadataMarshallerTest.java:63)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:606)<br>
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)<br>
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)<br>
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)<br>
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)<br>
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br>
at
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)<br>
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)<br>
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)<br>
at
org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)<br>
at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)<br>
at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)<br>
at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)<br>
at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)<br>
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)<br>
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)<br>
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br>
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br>
Caused by: com.sun.istack.internal.SAXException2<br>
java.lang.NullPointerException<br>
at
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:235)<br>
at
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:250)<br>
at
com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:100)<br>
at
com.sun.xml.internal.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:124)<br>
at
com.sun.xml.internal.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:144)<br>
at
com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:343)<br>
at
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:582)<br>
at
com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:325)<br>
at
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:483)<br>
at
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:308)<br>
... 29 more<br>
Caused by: java.lang.NullPointerException<br>
at
org.apache.sis.internal.jaxb.gmd.Country.create(Country.java:97)<br>
at
org.apache.sis.internal.jaxb.code.PT_Locale$Wrapper.<init>(PT_Locale.java:123)<br>
at
org.apache.sis.internal.jaxb.code.PT_Locale.<init>(PT_Locale.java:157)<br>
at
org.apache.sis.internal.jaxb.code.PT_Locale.marshal(PT_Locale.java:169)<br>
at
org.apache.sis.internal.jaxb.code.PT_Locale.marshal(PT_Locale.java:69)<br>
at
com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:98)<br>
... 36 more<br>
<br>
</font></blockquote>
</body>
</html>