Uploaded image for project: 'GeoTools'
  1. GeoTools
  2. GEOT-5418

ProcessFunctionFactory is not robust to failing processes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15.0, 16-M0
    • Component/s: process
    • Labels:
      None

      Description

      If any process that would be retrieved by the ProcessFunctionFactory cannot be instantiated, org.geotools.process.function.ProcessFunctionFactory.getFunctionNames() will fail.

      This can be observed by running ProcessFunctionFactory.getFunctionNames() while JAI and JAI-Tools is not on the classpath (for example, in the GeoMesa codebase):

      Caused by: java.lang.ClassNotFoundException: org.jaitools.numeric.Statistic
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
        at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
        at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
        at sun.reflect.annotation.AnnotationParser.parseSig(AnnotationParser.java:439)
        at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:420)
        at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:349)
        at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
        at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:226)
        at sun.reflect.annotation.AnnotationParser.parseParameterAnnotations2(AnnotationParser.java:184)
        at sun.reflect.annotation.AnnotationParser.parseParameterAnnotations(AnnotationParser.java:161)
        at org.geotools.process.factory.AnnotationDrivenProcessFactory.getParameterInfo(AnnotationDrivenProcessFactory.java:111)
        at org.geotools.process.function.ProcessFunctionFactory.init(ProcessFunctionFactory.java:146)
        at org.geotools.process.function.ProcessFunctionFactory.getFunctionNames(ProcessFunctionFactory.java:123)
        at org.locationtech.geomesa.convert.cql.CqlFunctionFactory$$anonfun$1.apply(CqlFunctionFactory.scala:28)
        at org.locationtech.geomesa.convert.cql.CqlFunctionFactory$$anonfun$1.apply(CqlFunctionFactory.scala:24)
        at org.locationtech.geomesa.convert.cql.CqlFunctionFactory.<init>(CqlFunctionFactory.scala:24)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at org.locationtech.geomesa.convert.Transformers$.<init>(Transformers.scala:34)
        at org.locationtech.geomesa.convert.Transformers$.<clinit>(Transformers.scala)
        at org.locationtech.geomesa.convert.common.TransformersTest$$anonfun$1$$anonfun$apply$100$$anonfun$apply$101$$anonfun$apply$105.apply(TransformersTest.scala:41)
        at org.locationtech.geomesa.convert.common.TransformersTest$$anonfun$1$$anonfun$apply$100$$anonfun$apply$101$$anonfun$apply$105.apply(TransformersTest.scala:40)
      

        Attachments

          Activity

            People

            • Assignee:
              jody.garnett jody.garnett
              Reporter:
              tbarsballe Torben Barsballe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: