[geotk] Problem with marshalling metadata

Emmanuel Blondel emmanuel.blondel1 at gmail.com
Tue Jul 22 02:32:15 PDT 2014


Hello,

I'm currently doing an attempt to move from Geotoolkit 3.21 to 4.0-M1, 
in order to progressively move to Apache SIS.
I'm getting the following error with a test to marshall the metadata. 
Any idea?

Thanks in advance


javax.xml.bind.MarshalException
  - with linked exception:
[com.sun.istack.internal.SAXException2
java.lang.NullPointerException]
     at 
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:311)
     at 
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:236)
     at 
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:116)
     at 
org.apache.sis.xml.PooledMarshaller.marshal(PooledMarshaller.java:151)
     at org.apache.sis.xml.XML.marshal(XML.java:341)
     at 
org.fao.fi.gems.GeographicEntityMetadataMarshallerTest.testMarshalling(GeographicEntityMetadataMarshallerTest.java:63)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
     at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
     at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
     at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
     at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
     at 
org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
     at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
     at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
     at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
     at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
     at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
     at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
     at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
     at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
     at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: com.sun.istack.internal.SAXException2
java.lang.NullPointerException
     at 
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:235)
     at 
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:250)
     at 
com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:100)
     at 
com.sun.xml.internal.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:124)
     at 
com.sun.xml.internal.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:144)
     at 
com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:343)
     at 
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:582)
     at 
com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:325)
     at 
com.sun.xml.internal.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:483)
     at 
com.sun.xml.internal.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:308)
     ... 29 more
Caused by: java.lang.NullPointerException
     at org.apache.sis.internal.jaxb.gmd.Country.create(Country.java:97)
     at 
org.apache.sis.internal.jaxb.code.PT_Locale$Wrapper.<init>(PT_Locale.java:123)
     at 
org.apache.sis.internal.jaxb.code.PT_Locale.<init>(PT_Locale.java:157)
     at 
org.apache.sis.internal.jaxb.code.PT_Locale.marshal(PT_Locale.java:169)
     at 
org.apache.sis.internal.jaxb.code.PT_Locale.marshal(PT_Locale.java:69)
     at 
com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:98)
     ... 36 more



-- 
*Emmanuel Blondel*
GIS Consultant
Engineer in Agronomy & Environment

Geographic Information Systems
in Agronomy - Environment - Fisheries
Email: emmanuel.blondel1 at gmail.com - Emmanuel.Blondel at fao.org
View my LinkedIn profileView my LinkedIn profile 
<http://fr.linkedin.com/in/emmanuelblondel1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140722/76fbae87/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: btn_in_20x15.png
Type: image/png
Size: 288 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20140722/76fbae87/attachment.png>


More information about the Geotoolkit mailing list