That field is in a commons-lang3 public enumeration, JavaVersion, do you
have it in the classpath?
Or maybe have a mix of two commons-lang versions?

Cheers
Andrea

On Fri, Mar 29, 2019 at 7:20 AM Chris Zheng (zcaudate) <z...@caudate.me> wrote:

> I’m using Clojure to do the basic tutorial on displaying a shape file on
> OpenJDK 11:
>
>   (-> (doto (DefaultMapContext.)
>         (.setTitle "Quickstart")
>         (.addLayer (-> (io/resource "geotools/maps/countries.shp")
>                        (FileDataStoreFinder/getDataStore)
>                        (.getFeatureSource))
>                    nil))
>       (JMapFrame/showMap))
>
> However, the call to JMapFrame.showMap gives a strange error that I’m not
> too sure what the cause is:
>
> *tools.map.FeatureLayer[, VISIBLE]*
> *java.lang.NoSuchFieldError: JAVA_9*
> * at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:207)*
> * at org.geotools.util.NIOUtilities.clean(NIOUtilities.java:185)*
> * at
> org.geotools.data.shapefile.dbf.DbaseFileReader.close(DbaseFileReader.java:300)*
> * at
> org.geotools.data.shapefile.ShapefileFeatureSource.readAttributes(ShapefileFeatureSource.java:586)*
> * at
> org.geotools.data.shapefile.ShapefileFeatureSource.buildFeatureType(ShapefileFeatureSource.java:479)*
> * at
> org.geotools.data.shapefile.ShapefileFeatureStore.buildFeatureType(ShapefileFeatureStore.java:137)*
> * at
> org.geotools.data.store.ContentFeatureSource.getAbsoluteSchema(ContentFeatureSource.java:327)*
> * at
> org.geotools.data.store.ContentFeatureSource.getSchema(ContentFeatureSource.java:296)*
> * at
> org.geotools.data.store.ContentFeatureSource.resolvePropertyNames(ContentFeatureSource.java:1101)*
> * at
> org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:362)*
> * at
> org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:351)*
> * at org.geotools.map.FeatureLayer.getBounds(FeatureLayer.java:188)*
> * at org.geotools.map.MapContent.getMaxBounds(MapContent.java:602)*
> * at
> org.geotools.swing.AbstractMapPane.setFullExtent(AbstractMapPane.java:890)*
> * at
> org.geotools.swing.AbstractMapPane.doSetMapContent(AbstractMapPane.java:540)*
> * at org.geotools.swing.AbstractMapPane.<init>(AbstractMapPane.java:197)*
> * at org.geotools.swing.JMapPane.<init>(JMapPane.java:71)*
> * at org.geotools.swing.JMapPane.<init>(JMapPane.java:60)*
> * at org.geotools.swing.JMapFrame.<init>(JMapFrame.java:178)*
> * at org.geotools.swing.JMapFrame.doShowMap(JMapFrame.java:150)*
> * at org.geotools.swing.JMapFrame.access$000(JMapFrame.java:70)*
> * at org.geotools.swing.JMapFrame$1.run(JMapFrame.java:143)*
> * at
> java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)*
> * at
> java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)*
> * at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)*
> * at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)*
> * at java.base/java.security.AccessController.doPrivileged(Native Method)*
> * at
> java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)*
> * at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)*
> * at
> java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)*
> * at
> java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)*
> * at
> java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)*
> * at
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)*
> * at
> java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)*
> * at
> java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)*
>
> It’d be great to figure out what is wrong.
> _______________________________________________
> GeoTools-GT2-Users mailing list
> GeoTools-GT2-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>


-- 

Regards, Andrea Aime == GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
@geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
8844549 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

Reply via email to