I have some previously working code that fails when run under a framework
using the VFSClassLoader
Specifically, I have code running in an Accumulo server side iterator
(distributed database filtering agent). Under accumulo 1.4x it worked
without issue, but swapping to 1.5x it now breaks repeatably. I don't
think this is an accumulo issue, as it's failing at some core GeoTools
functionality - specifically I'm calling
ECQL.toFilter(filterStr);
The relevant portion of the stack trace is:
Caused by: org.geotools.factory.FactoryNotFoundException: No factory of
kind "FilterFactory" found.
at
org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:375)
at
org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:145)
at
org.geotools.factory.CommonFactoryFinder.lookup(CommonFactoryFinder.java:346)
at
org.geotools.factory.CommonFactoryFinder.getFilterFactory(CommonFactoryFinder.java:300)
at
org.geotools.filter.text.commons.AbstractCompilerFactory.makeCompiler(AbstractCompilerFactory.java:55)
at
org.geotools.filter.text.commons.CompilerUtil.parseFilter(CompilerUtil.java:195)
at org.geotools.filter.text.ecql.ECQL.toFilter(ECQL.java:120)
at org.geotools.filter.text.ecql.ECQL.toFilter(ECQL.java:99)
at
com.bennight.gt.query.CqlQueryFilterIterator.init(CqlQueryFilterIterator.java:178)
So it seems to be the GeoTools SPI / discovery not playing nicely under the
VFSClassLoader environment? The geotools libraries are definitly in the
same directory as my jars (which are loading and working fine - until they
try and invoke the ECQL.toFilter function) - here is the output ls gt*
gt-api-10.4.jar gt-cql-10.4.jar gt-graph-10.4.jar
gt-metadata-10.4.jar gt-process-10.4.jar gt-render-10.4.jar
gt-wps-10.4.jar gt-xsd-core-10.4.jar gt-xsd-filter-10.4.jar
gt-xsd-gml3-10.4.jar gt-xsd-wfs-10.4.jar
gt-coverage-10.4.jar gt-data-10.4.jar gt-main-10.4.jar
gt-opengis-10.4.jar gt-referencing-10.4.jar gt-shapefile-10.4.jar
gt-xml-10.4.jar gt-xsd-fes-10.4.jar gt-xsd-gml2-10.4.jar
gt-xsd-ows-10.4.jar gt-xsd-wps-10.4.jar
There's another project that was having similar (slightly different - but
geotools/classloader related issues)
https://github.com/geomesa/geomesa/blob/wip_hadoop_2_0_accumulo_1_5_0/geomesa-core/src/main/scala/geomesa/core/iterators/SpatioTemporalIntersectingIterator.scala#L319
they added the initClassLoader method. Unfortunately a similar pattern
did not work for me in this case.
If anyone has any suggestions about what could cause this, or how to start
debugging & fixing it I'd appreciate it.
Chris
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends. Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users