Martin,
I remove all the dependencies from GeoTk in my code and only use the Apache
SIS dev-1.0-snapshot as you can see in the snippet below.
+--- project :regp:profile:gpfm
| +--- com.fasterxml.jackson.core:jackson-annotations:2.9.8
| +--- org.springframework.boot:spring-boot-starter-log4j2:2.1.3.RELEASE
(*)
| +--- org.apache.sis.core:sis-metadata:dev-1.0-SNAPSHOT
| | +--- org.apache.sis.core:sis-utility:dev-1.0-SNAPSHOT
| | | +--- javax.measure:unit-api:1.0
| | | \--- org.opengis:geoapi-pending:4.0-SNAPSHOT
| | | \--- javax.measure:unit-api:1.0
| | +--- javax.measure:unit-api:1.0
| | \--- org.opengis:geoapi-pending:4.0-SNAPSHOT (*)
| +--- javax.xml.bind:jaxb-api:2.3.0
| +--- com.sun.xml.bind:jaxb-core:2.3.0
| +--- com.sun.xml.bind:jaxb-impl:2.3.0
| \--- javax.activation:javax.activation-api:1.2.0
I looked in my code any reference to Polari*z*ationOrientation and
Polari*s*ationOrientation.
I have found none.
I attached an example of Unit Test that fails with the same error
junit.framework.AssertionFailedError: Exception in constructor:
testMarshalling (java.lang.TypeNotPresentException: Type
org.opengis.metadata.content.PolarizationOrientation not present
at
sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at
sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
at
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
at
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at
sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90)
at java.lang.Class.getGenericSuperclass(Class.java:777)
at
com.sun.xml.bind.v2.model.nav.ReflectionNavigator$1.onClass(ReflectionNavigator.java:98)
at
com.sun.xml.bind.v2.model.nav.ReflectionNavigator$1.onClass(ReflectionNavigator.java:88)
at com.sun.xml.bind.v2.model.nav.TypeVisitor.visit(TypeVisitor.java:57)
at
com.sun.xml.bind.v2.model.nav.ReflectionNavigator.getBaseClass(ReflectionNavigator.java:262)
at
com.sun.xml.bind.v2.model.nav.ReflectionNavigator.getBaseClass(ReflectionNavigator.java:64)
at
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.isApplicable(PropertyInfoImpl.java:217)
at
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.getApplicableAdapter(PropertyInfoImpl.java:234)
at
com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:126)
at
com.sun.xml.bind.v2.model.impl.ERPropertyInfoImpl.<init>(ERPropertyInfoImpl.java:57)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.<init>(ElementPropertyInfoImpl.java:100)
at
com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.<init>(RuntimeElementPropertyInfoImpl.java:63)
at
com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.createElementProperty(RuntimeClassInfoImpl.java:175)
at
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:882)
at
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findGetterSetterProperties(ClassInfoImpl.java:1007)
at
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:313)
at
com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:186)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:261)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:290)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:347)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:173)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:122)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:71)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:113)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:75)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:96)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:73)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:62)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:78)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:76)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:290)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:347)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:173)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:122)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:71)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:113)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:75)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:96)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:73)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:62)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:78)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:76)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:347)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:173)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:122)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:71)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:113)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:75)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:96)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:73)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:62)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:78)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:76)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:347)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:173)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:122)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:71)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:113)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:75)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:96)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:73)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:62)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:78)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:76)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:290)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:290)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.addAllSubtypes(ReferencePropertyInfoImpl.java:347)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.calcTypes(ReferencePropertyInfoImpl.java:173)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.getElements(ReferencePropertyInfoImpl.java:122)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.getElements(RuntimeReferencePropertyInfoImpl.java:71)
at
com.sun.xml.bind.v2.model.impl.ReferencePropertyInfoImpl.ref(ReferencePropertyInfoImpl.java:113)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:75)
at
com.sun.xml.bind.v2.model.impl.RuntimeReferencePropertyInfoImpl.ref(RuntimeReferencePropertyInfoImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.calcRef(TypeRefImpl.java:96)
at
com.sun.xml.bind.v2.model.impl.TypeRefImpl.getTarget(TypeRefImpl.java:73)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:62)
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(RuntimeTypeRefImpl.java:55)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:78)
at
com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(ElementPropertyInfoImpl.java:76)
at java.util.AbstractList$Itr.next(AbstractList.java:358)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:275)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:103)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:227)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:98)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:84)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:375)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:390)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:465)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:303)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1156)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:165)
at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:247)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:234)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:441)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:641)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:584)
at
org.apache.sis.internal.jaxb.TypeRegistration.getSharedContext(TypeRegistration.java:219)
at org.apache.sis.xml.MarshallerPool.<init>(MarshallerPool.java:168)
at org.apache.sis.xml.XML.getPool(XML.java:423)
at org.apache.sis.xml.XML.marshal(XML.java:440)
at
gov.geoplatform.regp.profile.gpfm.test.GeoplatformTestCase.initialize(GeoplatformTestCase.java:76)
at
gov.geoplatform.regp.profile.gpfm.test.GeoplatformTestCase.<init>(GeoplatformTestCase.java:45)
at
gov.geoplatform.regp.profile.gpfm.GP_DataIdentificationTest.<init>(GP_DataIdentificationTest.java:7)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at junit.framework.TestSuite.createTest(TestSuite.java:60)
at junit.framework.TestSuite.addTestMethod(TestSuite.java:307)
at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:150)
at junit.framework.TestSuite.<init>(TestSuite.java:129)
at
org.junit.internal.runners.JUnit38ClassRunner.<init>(JUnit38ClassRunner.java:74)
at
org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:11)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:78)
at
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
at
org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
at
org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)
at
org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at
org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at
org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at
org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at
org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at
org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
at
org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
at
org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
at
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at
org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException:
org.opengis.metadata.content.PolarizationOrientation
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at
sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
... 258 more
I have the same error for each class of the profile I am testing. The error
must be either in the GeoAPI or Apache SIS code. I spend some time trying
to search in the code reference to different spelling but without success.
I am at a loss.
Regards
Stephane
On Fri, May 10, 2019 at 4:54 AM Martin Desruisseaux <
[email protected]> wrote:
> Hello Stéphane
>
> I just checked; "PolarizationOrientation" (with a "z") has been renamed
> "PolarisationOrientation" (with a "s") only in the geoapi-4.0 branch, as
> expected. The geoapi-3.1 branch already kept the old spelling. The Geotk
> project depends on geoapi-4.0 branch, which is why you got this renaming.
>
> GeoAPI 4.0 has not yet been released, so we can debate those renaming. I
> agree that the "Polarization" -> "Polarisation" change alone is arguably
> not worth an incompatible change. But there is a few bigger renaming in
> latest ISO specifications, for example "GeodeticDatum" renamed
> "GeodeticReferenceFrame". Those renaming have not yet been applied on
> the GeoAPI 4.0 branch (and will never been applied on the 3.1 branch),
> but they are on the radar if we want to be consistent with latest ISO
> standards.
>
> About Apache SIS "geoapi-3.1" and "geoapi-4.0" branches having the same
> "dev-1.0-SNAPSHOT" artifact version, I agree that this is confusing. I
> will post a proposal in a separated email.
>
> To resolve your issue, I see two possibilities. If you have a
> possibility to update your code for searching for
> "PolarisationOrientation", it may be the most future-proof approach.
> Otherwise we can try to downgrade some Geotk modules to GeoAPI 3.1 on a
> separated branch, but the list of modules to downgrade should be small
> (downgrading the whole projects may be a lot of work).
>
> Regards,
>
> Martin
>
> Le 09/05/2019 à 23:22, Stephane Fellah a écrit :
>
> > Thanks for responding so quickly. I will upgrade the code tomorrow and
> > check if it works. I also notice that the artifact name for geoapi-3.1
> and
> > geoapi-4.0 have the same artifact name dev-1.0-SNAPSHOT. This is
> confusing
> > because we don't know which code is deployed on the maven repository.
> > Please make sure that the Gtk also reflects the latest changes and use
> the
> > compatible GeoAPI.
> >
> > Regards
>
>
--
Stephane Fellah
Chief Knowledge Scientist
Image Matters LLC
Office: +(703) 669 5510
Cell: 703 431 9420
package gov.geoplatform.regp.profile.gpfm;
import gov.geoplatform.regp.profile.gpfm.test.GeoplatformTestCase;
import gov.geoplatform.regp.profile.gpfm.utils.GeoplatformProfile;
import org.apache.sis.xml.Namespaces;
public class GP_DataIdentificationTest extends GeoplatformTestCase {
private static final String dataIdXML =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
"<gpfm:MD_DataIdentification xmlns:gco=\"" + Namespaces.GCO + "\"" +
" xmlns:mri=\"" + Namespaces.MRI + "\"" +
" xmlns:gpfm=\"" + GeoplatformProfile.NAMESPACE + "\">\n" +
" <mri:purpose>\n" +
" <gco:CharacterString>Purpose</gco:CharacterString>\n" +
" </mri:purpose>\n" +
" <gpfm:identifier>http://www.example.com</gpfm:identifier>\n" +
"</gpfm:MD_DataIdentification>\n";
public void testMarshalling() throws Exception {
// Unmarshal the XML to an object.
final Object obj = unmarshal(dataIdXML);
// Check that the object is of the correct class.
assertEquals("Expected a GPFM instance.", GP_DataIdentification.class, obj.getClass());
// Cast to GP_DataIdentification.
GP_DataIdentification dataId = (GP_DataIdentification) obj;
// Marshal back to XML and ensure it matches the expected XML.
final String actual = marshal(dataId);
assertEquals("Marshaled XML does not match expected XML.", trimNamespaces(dataIdXML), trimNamespaces(actual));
}
}
package gov.geoplatform.regp.profile.gpfm.test;
import gov.geoplatform.regp.profile.gpfm.utils.GeoplatformProfile;
import junit.framework.TestCase;
import org.apache.commons.io.IOUtils;
import org.apache.sis.metadata.iso.DefaultMetadata;
import org.apache.sis.xml.MarshallerPool;
import org.apache.sis.xml.XML;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import java.io.InputStream;
import java.io.StringWriter;
/**
* Parent class for all Geoplatform metadata profile test cases.
*
* @author Cullen Rombach (Image Matters)
*/
public abstract class GeoplatformTestCase extends TestCase {
/**
* Marshaller used to generate XML from Java objects.
*/
protected Marshaller marshaller;
/**
* Unmarshaller used to generate Java objects from XML.
*/
protected Unmarshaller unmarshaller;
/**
* Pool containing marshallers and unmarshallers with context set to the Geoplatform profile.
*/
protected MarshallerPool pool;
/**
* Creates a new test case.
* @throws JAXBException
*/
protected GeoplatformTestCase() {
try {
initialize();
} catch (JAXBException e) {
// Do nothing. This should never happen.
}
}
/**
* Remove the namespace declarations from the given XML string.
* This methods assumes the given XML begins with the following line:
*
* <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
*
* @param xml
* @return The given XML with namespace declarations stripped.
*/
public String trimNamespaces(String xml) {
// Cut off the header (<?xml version="1.0" encoding="UTF-8" standalone="yes"?>)
String noHeader = xml.substring(xml.indexOf("\n")+1);
// Cut out the namespace declarations.
String beforeNamespaces = noHeader.substring(0, noHeader.indexOf(" "));
String afterNamespaces = noHeader.substring(noHeader.indexOf(">"));
String trimmed = beforeNamespaces + afterNamespaces;
return trimmed;
}
/**
* Set up the marshaller and unmarshaller used for working with Geoplatform metadata.
* @throws JAXBException
*/
public void initialize() throws JAXBException {
// Marshal something to ISO 19115-3 using Apache SIS so the SIS context is using the right version.
XML.marshal(new DefaultMetadata());
// Initialize the pool to use Geoplatform classes as its context.
pool = new MarshallerPool(JAXBContext.newInstance(GeoplatformProfile.getClasses(), null), null);
marshaller = pool.acquireMarshaller();
unmarshaller = pool.acquireUnmarshaller();
}
/**
* Unmarshal the given XML String to a Java object.
* @param xml The String to unmarshal.
* @throws JAXBException
*/
public Object unmarshal(String xml) throws JAXBException {
InputStream input = IOUtils.toInputStream(xml);
return unmarshaller.unmarshal(input);
}
/**
* Marshal the given Java object to an XML String.
* @param obj The object to marshal.
* @throws JAXBException
*/
public String marshal(Object obj) throws JAXBException {
StringWriter writer = new StringWriter();
marshaller.marshal(obj, writer);
return writer.toString();
}
}