Hello,

Yes, there does seem to be a problem still.

I've just tried building an executable jar for the Quickstart app
(http://geotools.org/quickstart.html) using maven assembly with the
"jar-with-dependencies" descriptor (see pom.xml below).  When I run
the jar I get the same error that John reported previously...

guanaco:target michael$ java -jar
example-standalone-1.0-jar-with-dependencies.jar
Exception in thread "main" java.lang.RuntimeException: Unable to find
function Length
        at 
org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:177)
        at 
org.geotools.filter.FunctionFinder.findFunction(FunctionFinder.java:74)
        at 
org.geotools.filter.FilterFactoryImpl.function(FilterFactoryImpl.java:468)
        at 
org.geotools.feature.AttributeTypeBuilder.lengthRestriction(AttributeTypeBuilder.java:625)
        at 
org.geotools.feature.AttributeTypeBuilder.buildType(AttributeTypeBuilder.java:456)
        at 
org.geotools.feature.AttributeTypeBuilder.buildDescriptor(AttributeTypeBuilder.java:517)
        at 
org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:735)
        at 
org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:638)
        at 
org.geotools.data.AbstractFileDataStore.getFeatureSource(AbstractFileDataStore.java:74)
        at org.geotools.demo.Quickstart.main(Quickstart.java:42)

Ah... (thinking very slowly)... the problem is in the file
org.opengis.filter.expression.function in the jar's META-INF/services
folder. The file exists but only contains this one line:

org.geotools.filter.function.PropertyExistsFunction

...instead of the gazillion lines for the filter function classes.

I think this problem was discussed on the list a while ago...
something to do with multiple copies of the META-INF/services files
overwriting each other rather than being combined when you do maven
assembly.  I'll dig around in the list archives and see if I can find
The Answer.

Michael

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to