I was bemoaning the inconvenience in Solr that the JTS jar file has to be placed in WEB-INF/lib instead of being placeable in more convenient places, like the 'lib' of the node or at a core level. Essentially, this is because spatial4j.jar is inside WEB-INF/lib which is loaded by a lower-level more internal classloader, and so it can only refer to things at its level or lower still.
If all the JTS using classes in Spatial4j were spun off into a separate jar, perhaps named spatial4j-jts-ctx.jar then that jar could go into a convenient lib dir as well as JTS, and it should work.
Another side benefit is that anyone fearing that Spatial4j is somehow tainted in that it refers to LGPL code (even though it's "optional") would be assuaged.
On the down side, especially for anyone without any classpath conundrums, this is yet another 'jar' file. I think it's worth it though.
I was bemoaning the inconvenience in Solr that the JTS jar file has to be placed in WEB-INF/lib instead of being placeable in more convenient places, like the 'lib' of the node or at a core level. Essentially, this is because spatial4j.jar is inside WEB-INF/lib which is loaded by a lower-level more internal classloader, and so it can only refer to things at its level or lower still.
If all the JTS using classes in Spatial4j were spun off into a separate jar, perhaps named spatial4j-jts-ctx.jar then that jar could go into a convenient lib dir as well as JTS, and it should work.
Another side benefit is that anyone fearing that Spatial4j is somehow tainted in that it refers to LGPL code (even though it's "optional") would be assuaged.
On the down side, especially for anyone without any classpath conundrums, this is yet another 'jar' file. I think it's worth it though.