i took the geotools-fx-map test form
https://github.com/awoestmann/geotools-fx-map-test
and tried to upgrade it to GeoTools 22 (latest) - note that i also tried
with 21.2 (without success)
when launched i get Errors reported about JAI registry files and Class
Def not found (i noticed that the referenced Class is in another package!)
JAI ERRORS:
Error while parsing JAI registry file
"file:/C:/Users/BlackPearl/.m2/repository/org/geotools/gt-coverage/21.2/gt-coverage-21.2.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #31
A descriptor is already registered against the name
"org.geotools.ColorReduction" under registry mode "rendered"
Error in registry file at line number #32
A descriptor is already registered against the name
"org.geotools.ColorInversion" under registry mode "rendered"
Error while parsing JAI registry file
"file:/C:/Users/BlackPearl/.m2/repository/org/jaitools/jt-zonalstats/1.5.0/jt-zonalstats-1.5.0.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #4
A descriptor is already registered against the name "ZonalStats"
under registry mode "rendered"
NOTE that i already include
<dependency> <groupId>it.geosolutions.jaiext</groupId> <artifactId>jaiext</artifactId>
<version>1.1.11</version> <type>pom</type> </dependency>
and call
public class View {
static {
// init replacement JAI-EXT operations which do a better job of handling
transparency and no-data JAIExt.initJAIEXT(); }
...
}
2) ClassNotFoundException: org.geotools.feature.IllegalAttributeException
this Class is actually located at
org.opengis.feature.IllegalAttributeException
the line of code that raises this exception is:
WebMapServer wms =new WebMapServer(wmsURL);
and the log is:
WebMapServer(http://ows.terrestris.de/osm/service)
Sep 18, 2019 1:00:00 PM org.geotools.data.ows.AbstractOpenWebService
internalIssueRequest
SEVERE: Failed to execute request
http://ows.terrestris.de/osm/service?REQUEST=GetCapabilities&VERSION=1.3.0&SERVICE=WMS
note that i can open those files/pages in my browser.
I uploaded the source (less than 1MB) and another version with all
dependencies (about 31MB) ) to my webserver
http://www.damn.at/temp/geotools-fx-map-test-gt22.zip
http://www.damn.at/temp/geotools-fx-map-test-gt22-full.zip
--------------- STACKTRACE ------------
Error while parsing JAI registry file
"file:/C:/Users/BlackPearl/.m2/repository/org/geotools/gt-coverage/21.2/gt-coverage-21.2.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #31
A descriptor is already registered against the name
"org.geotools.ColorReduction" under registry mode "rendered"
Error in registry file at line number #32
A descriptor is already registered against the name
"org.geotools.ColorInversion" under registry mode "rendered"
Error while parsing JAI registry file
"file:/C:/Users/BlackPearl/.m2/repository/org/jaitools/jt-zonalstats/1.5.0/jt-zonalstats-1.5.0.jar!/META-INF/registryFile.jai"
:
Error in registry file at line number #4
A descriptor is already registered against the name "ZonalStats" under
registry mode "rendered"
WebMapServer(http://ows.terrestris.de/osm/service)
Sep 18, 2019 1:00:00 PM org.geotools.data.ows.AbstractOpenWebService
internalIssueRequest
SEVERE: Failed to execute request
http://ows.terrestris.de/osm/service?REQUEST=GetCapabilities&VERSION=1.3.0&SERVICE=WMS
Exception in Application start method
Exception in thread "Thread-0" java.lang.RuntimeException: Exception in
Application start method
at
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError:
org/geotools/feature/IllegalAttributeException
at org.geotools.xml.gml.GMLSchema.loadComplexTypes(GMLSchema.java:125)
at org.geotools.xml.gml.GMLSchema.<clinit>(GMLSchema.java:60)
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.geotools.xml.SchemaFactory.loadSchemas(SchemaFactory.java:143)
at org.geotools.xml.SchemaFactory.<init>(SchemaFactory.java:77)
at org.geotools.xml.SchemaFactory.<clinit>(SchemaFactory.java:69)
at
org.geotools.xml.handlers.ElementHandlerFactory.startPrefixMapping(ElementHandlerFactory.java:84)
at org.geotools.xml.XMLSAXHandler.startElement(XMLSAXHandler.java:365)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
at
org.geotools.xml.DocumentFactory.getInstance(DocumentFactory.java:138)
at
org.geotools.ows.wms.response.WMSGetCapabilitiesResponse.<init>(WMSGetCapabilitiesResponse.java:59)
at
org.geotools.ows.wms.WMS1_0_0$GetCapsRequest.createResponse(WMS1_0_0.java:221)
at
org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:439)
at
org.geotools.ows.wms.WebMapServer.issueRequest(WebMapServer.java:433)
at
org.geotools.data.ows.AbstractOpenWebService.negotiateVersion(AbstractOpenWebService.java:260)
at
org.geotools.data.ows.AbstractOpenWebService.<init>(AbstractOpenWebService.java:102)
at
org.geotools.data.ows.AbstractOpenWebService.<init>(AbstractOpenWebService.java:79)
at
org.geotools.data.ows.AbstractOpenWebService.<init>(AbstractOpenWebService.java:73)
at org.geotools.ows.wms.WebMapServer.<init>(WebMapServer.java:368)
at de.alfe.gui.View.<init>(View.java:72)
at de.alfe.gui.View.<init>(View.java:63)
at de.alfe.util.Controller.<init>(Controller.java:20)
at de.alfe.gui.Start.start(Start.java:39)
at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at
com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at
com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at
com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at
com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Caused by: java.lang.ClassNotFoundException:
org.geotools.feature.IllegalAttributeException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 49 more
---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users