Hi. I have taken a quick look at your archive. Note that you are mixing up gt-22-snapshot and gt-21.2 versions dependencies. Mixing different major versions can easily result into conflicts, missing classes, renames (especially if there was some API change) and so on therefore it is highly discouraged practice and that should be avoided. Please, consider using a single version and your IllegalAttributeException problem should go away. (org.geotools.feature.IllegalAttributeException has been indeed removed moving from 21.x to 22.x).
Hope this helps, Daniele On Wed, Sep 18, 2019 at 1:15 PM Ludwig Moser-Spitzenstätter <luke2...@gmx.at> wrote: > 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 > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virenfrei. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_2672744423497928935_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > GeoTools-GT2-Users mailing list > GeoTools-GT2-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > -- Regards, Daniele Romagnoli == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Daniele Romagnoli Senior Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users