neo4j-contrib / spatial

Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.
http://neo4j-contrib.github.io/spatial
Other
778 stars 192 forks source link

"Failed to load ..." #253

Closed jeremykendall closed 8 years ago

jeremykendall commented 8 years ago

I'm getting a lot of "Failed to load ..." warning using the 3.0.2 spatial plugin with Neo4j Enterprise 3.0.2. Example:

2016-06-13 20:08:41.658+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.geotools.data.DataTestCase` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: junit/frame
work/TestCase
2016-06-13 20:08:42.718+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.geotools.data.AbstractDataStoreTest` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: ju
nit/framework/TestCase
2016-06-13 20:08:53.575+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.geotools.util.logging.Log4JLoggerFactory` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar
`: org/apache/log4j/Logger
2016-06-13 20:08:53.636+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.geotools.util.logging.Log4JLogger` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: org/
apache/log4j/Priority
2016-06-13 20:08:55.574+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `com.sun.media.jai.mlib.MediaLibAccessor` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: [L
com/sun/medialib/mlib/mediaLibImage;
2016-06-13 20:08:56.169+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `com.sun.media.jai.mlib.MlibMosaicOpImage` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: c
om/sun/medialib/mlib/mediaLibImage
2016-06-13 20:08:56.395+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `com.sun.media.jai.mlib.MlibUtils` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: com/sun/m
edialib/mlib/mediaLibImage
2016-06-13 20:09:01.018+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.jdom.xpath.JaxenXPath$NSContext` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: org/ja
xen/SimpleNamespaceContext
2016-06-13 20:09:01.037+0000 WARN  [o.n.k.i.p.Procedures] Failed to load `org.jdom.xpath.JaxenXPath` from plugin jar `/opt/neo4j/plugins/neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar`: org/jaxen/JaxenE
xception

Any ideas?

craigtaverner commented 8 years ago

I'm testing on 3.0.2 enterprise and I do not get this error. Can I ask how you installed the plugin? It should be just to copy the jar into the plugins folder. I tested with both neo4j-spatial-0.16-neo4j-3.0.0-server-plugin.jar and neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar. I was able to add layers and add nodes to layers.

The error you got would indicate missing dependencies. Perhaps you copied the wrong jar, the one without the server-plugin text in the name? That might explain the issue.

jeremykendall commented 8 years ago

Interesting. I've installed Neo4j 3.0.2 Enterprise on an Ubuntu 14.04 server by downloading the tarball, decompressing to /opt, adding neo4j-spatial-0.17-neo4j-3.0.2-server-plugin.jar to the plugins directory, and I still get that output when starting Neo4j (/path/to/neo4j/bin/neo4j start).

I've thrown a bit more of the debug.log in a gist. The warnings start on line 179.

craigtaverner commented 8 years ago

I see the errors now, both on ubuntu 14.04 and MacOSX. The plugin still works, and the errors seem to be generated by the procedures discovery process. No obvious side effects that I can see, yet, but worth investigating further. If you have noticed anything not actually working, let me know.

jeremykendall commented 8 years ago

The plugin still works

Agree.

No obvious side effects that I can see

Good to know!

If you have noticed anything not actually working, let me know.

Will do. Thanks!

craigtaverner commented 8 years ago

The exceptions are thrown here: https://github.com/neo4j/neo4j/blob/3.0/community/kernel/src/main/java/org/neo4j/kernel/impl/proc/ProcedureJarLoader.java#L132

And this is in the method listClassesIn(url...), and so it appears to be part of the new procedures system, in that it searches for all classes in a jar and if they can be compiled to procedures, they are. This general sweep touches on classes that cannot be loaded. I see for example messages like sealing violation: package com.sun.media.jai.rmi is sealed. So I think these messages are natural side effects of the way procedures are found and loaded. I'll discuss with people involved in the procedures infrastructure whether there is more that can be done, or not.

jeremykendall commented 8 years ago

:+1:

ehx-v1 commented 8 years ago

I think the most important question about this is: Do the warnings appear where they are supposed to appear? If yes, one should just not let them propagate. If not, one should do something about them.