Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work for me. #9

Open
jdk4401 opened this issue Jun 16, 2016 · 19 comments
Open

Doesn't work for me. #9

jdk4401 opened this issue Jun 16, 2016 · 19 comments

Comments

@jdk4401
Copy link

jdk4401 commented Jun 16, 2016

Using this code, and following the directions exactly, I get the following error on server startup:
Starting Neo4j failed: org.neo4j.server.web.NeoServletContainer-38f50e36@4455cbe0==org.neo4j.server.web.NeoServletContainer,-1,false

@dmontag
Copy link
Owner

dmontag commented Jun 17, 2016

Are you using Windows? If so, how did you install Neo4j?

@jdk4401
Copy link
Author

jdk4401 commented Jun 17, 2016

I am using Windows 7 Enterprise. I installed Neo4j with the usual defaults except on the D drive instead of the C as I didn't want to stomp over the previous version, just in case.
John

On Friday, June 17, 2016 4:04 AM, David Montag <notifications@github.com> wrote:

Are you using Windows? If so, how did you install Neo4j?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 17, 2016

Try running the standalone Windows version from ZIP (just unpack it to a directory and start it with "neo4j.bat console" from cmd.exe) and let me know how it works.

Also, can you provide me the full path of the plugins directory that the config dialog button opens?

@jdk4401
Copy link
Author

jdk4401 commented Jun 17, 2016

Didn't know the zip existed, I'll try that next
The plugins path of my current setup is "D:\neo4jDatabase\bathymetry-3.0.1.db\plugins"
John

On Friday, June 17, 2016 8:31 AM, David Montag <notifications@github.com> wrote:

Try running the standalone Windows version from ZIP (just unpack it to a directory and start it with "neo4j.bat console" from cmd.exe) and let me know how it works.Also, can you provide me the full path of the plugins directory that the config dialog button opens?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 17, 2016

Could you also check if you have a secondary plugins directory under your user's appdata, maybe something like C:\Users\yourusername\AppData\Roaming\Neo4j Community Edition\plugins? If you can find such a directory, could you try putting the JAR file in that directory instead of the one indicated in the dialog?

@jdk4401
Copy link
Author

jdk4401 commented Jun 17, 2016

Ok so I can run it from console. It claims to be loading the unmanaged extension, but nothing shows up in the "extensions" part of :GET db/data
At least it doesn't crash on startup.
John

On Friday, June 17, 2016 8:37 AM, John Koch <jdkoch@rocketmail.com> wrote:

Didn't know the zip existed, I'll try that next
The plugins path of my current setup is "D:\neo4jDatabase\bathymetry-3.0.1.db\plugins"
John

On Friday, June 17, 2016 8:31 AM, David Montag <notifications@github.com> wrote:

Try running the standalone Windows version from ZIP (just unpack it to a directory and start it with "neo4j.bat console" from cmd.exe) and let me know how it works.Also, can you provide me the full path of the plugins directory that the config dialog button opens?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@jdk4401
Copy link
Author

jdk4401 commented Jun 17, 2016

There is a "C:\Users\yourusername\AppData\Roaming\Neo4j Community Edition" directory, but no plugins subdirectory.
Should I make one and put the extensions there?

On Friday, June 17, 2016 8:56 AM, John Koch <jdkoch@rocketmail.com> wrote:

Ok so I can run it from console. It claims to be loading the unmanaged extension, but nothing shows up in the "extensions" part of :GET db/data
At least it doesn't crash on startup.
John

On Friday, June 17, 2016 8:37 AM, John Koch <jdkoch@rocketmail.com> wrote:

Didn't know the zip existed, I'll try that next
The plugins path of my current setup is "D:\neo4jDatabase\bathymetry-3.0.1.db\plugins"
John

On Friday, June 17, 2016 8:31 AM, David Montag <notifications@github.com> wrote:

Try running the standalone Windows version from ZIP (just unpack it to a directory and start it with "neo4j.bat console" from cmd.exe) and let me know how it works.Also, can you provide me the full path of the plugins directory that the config dialog button opens?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 20, 2016

You could give it a shot. Did you manage to get it working from the ZIP installation?

@jdk4401
Copy link
Author

jdk4401 commented Jun 20, 2016

The zip installation doesn't crash with the extension installed (copied to plugin directory & setting set in neo4j.conf), but it also doesn't show up when neo4j is running.
Currently deleting all the old versions and getting rid of all old config files/settings/etc. just in case one of them is being read instead.
John

On Monday, June 20, 2016 4:02 AM, David Montag <notifications@github.com> wrote:

You could give it a shot. Did you manage to get it working from the ZIP installation?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@jdk4401
Copy link
Author

jdk4401 commented Jun 20, 2016

Finally found the log file where the startup/mounting error is being thrown. Here is the trace:
2016-06-20 19:14:45.144+0000 INFO  [o.n.s.m.ThirdPartyJAXRSModule] Mounted unmanaged extension [org.neo4j.examples.server.unmanaged] at [/examples/unmanaged]Jun 20, 2016 3:14:45 PM com.sun.jersey.api.core.PackagesResourceConfig initINFO: Scanning for root resource and provider classes in the packages: org.neo4j.examples.server.unmanagedJun 20, 2016 3:14:45 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiateINFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'Jun 20, 2016 3:14:45 PM com.sun.jersey.server.impl.application.RootResourceUriRules SEVERE: The ResourceConfig instance does not contain any root resource classes.2016-06-20 19:14:45.248+0000 ERROR [o.n.s.CommunityNeoServer] Failed to start Neo4j on arl15031.arl.psu.edu:7474: org.neo4j.server.web.NeoServletContainer-3929baa7@20cf15f6==org.neo4j.server.web.NeoServletContainer,-1,false2016-06-20 19:14:45.248+0000 INFO  [o.n.s.d.LifecycleManagingDatabase] Stopping...2016-06-20 19:14:46.187+0000 INFO  [o.n.s.d.LifecycleManagingDatabase] Stopped.

On Monday, June 20, 2016 8:20 AM, John Koch <jdkoch@rocketmail.com> wrote:

The zip installation doesn't crash with the extension installed (copied to plugin directory & setting set in neo4j.conf), but it also doesn't show up when neo4j is running.
Currently deleting all the old versions and getting rid of all old config files/settings/etc. just in case one of them is being read instead.
John

On Monday, June 20, 2016 4:02 AM, David Montag <notifications@github.com> wrote:

You could give it a shot. Did you manage to get it working from the ZIP installation?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 21, 2016

Can you paste the package name you're using in your extension and the full config setting for the extensions in neo4j.conf? This template uses the com.neo4j.example.extension package, so the setting should be something like:

dbms.unmanaged_extension_classes=com.neo4j.example.extension=/example/ext

You should then be able to browse to http://localhost:7474/example/ext/service/helloworld

@jdk4401
Copy link
Author

jdk4401 commented Jun 21, 2016

The package name is "org.neo4j.examples.server.unmanaged" 
And the full config setting is what was already in the file, which I merely uncommented:dbms.unmanaged_extension_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged

Does it matter that they start with "org" instead of "com"? I would have thought that wouldn't matter as long as they match.

On Tuesday, June 21, 2016 4:31 AM, David Montag <notifications@github.com> wrote:

Can you paste the package name you're using in your extension and the full config setting for the extensions in neo4j.conf? This template uses the com.neo4j.example.extension package, so the setting should be something like:dbms.unmanaged_extension_classes=com.neo4j.example.extension=/example/extYou should then be able to browse to http://localhost:7474/example/ext/service/helloworld—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 21, 2016

Ah, yeah, unfortunately the value in the file doesn't match the package name in my example package. You need to change the org.... part to the com.... part I pasted above. Try it out and see if you can get the extension mounted.

@jdk4401
Copy link
Author

jdk4401 commented Jun 21, 2016

Didn't help. I still get this error in the neo4j.log:SEVERE: The ResourceConfig instance does not contain any root resource classes.

On Tuesday, June 21, 2016 10:44 AM, David Montag <notifications@github.com> wrote:

Ah, yeah, unfortunately the value in the file doesn't match the package name in my example package. You need to change the org.... part to the com.... part I pasted above. Try it out and see if you can get the extension mounted.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 21, 2016

Odd. Can you recount to me the steps you take to build and deploy it, from scratch?

@jdk4401
Copy link
Author

jdk4401 commented Jun 21, 2016

I downloaded the zip file, unzipped it and cd into it.
Inside I run "mvn -e clean package" to compile it with maven.
This produces "unmanaged-extension-template-1.0.jar" in the target directory, which I copy to my plugins directory. Currently I am using the default database directory that came with neo4j 3.0.3. "C:\Users\jdk11\Documents\Neo4j\default.graphdb".
In the neo4j.conf file I insert the following line:dbms.unmanaged_extension_classes=com.neo4j.example.extension=/example

Then I close and save that file, and start Neo4j.
And get the following error:Starting Neo4j failed: org.neo4j.server.web.NeoServletContainer-5eac703a@5a92f5ed==org.neo4j.server.web.NeoServletContainer,-1,false

In the neo4j.log file I get the following trace:2016-06-21 16:37:24.561+0000 INFO  [o.n.s.m.ThirdPartyJAXRSModule] Mounted unmanaged extension [com.neo4j.example.extension] at [/example]Jun 21, 2016 12:37:24 PM com.sun.jersey.api.core.PackagesResourceConfig initINFO: Scanning for root resource and provider classes in the packages: com.neo4j.example.extensionJun 21, 2016 12:37:24 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiateINFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'Jun 21, 2016 12:37:24 PM com.sun.jersey.server.impl.application.RootResourceUriRules SEVERE: The ResourceConfig instance does not contain any root resource classes.2016-06-21 16:37:24.824+0000 ERROR [o.n.s.CommunityNeoServer] Failed to start Neo4j on arl15031.arl.psu.edu:7474: org.neo4j.server.web.NeoServletContainer-5eac703a@5a92f5ed==org.neo4j.server.web.NeoServletContainer,-1,false
And, BTW, when I try to close neo4j, it doesn't really close and there remains a "neo4j-ce.exe" process running which I have to end with the windows task manager.

On Tuesday, June 21, 2016 12:21 PM, David Montag <notifications@github.com> wrote:

Odd. Can you recount to me the steps you take to build and deploy it, from scratch?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 21, 2016

The build process for the extension looks fine, as does the configuration. Did you try this with a ZIP installation of Neo4j though? Download Neo4j as a ZIP for Windows, unpack it, put the extension JAR file into the plugins directory in the unpacked ZIP, update the config in conf\neo4j.com, and then start Neo4j using "bin\Neo4j.bat console". Does that still give you an error?

@jdk4401
Copy link
Author

jdk4401 commented Jun 21, 2016

I just tried that and it seems to work. No idea why the "real" installation doesn't.
But why doesn't the extension show up in "extensions"  when I run ":get /db/data" in the Neo4j browser? Isn't it supposed to?

On Tuesday, June 21, 2016 12:47 PM, David Montag <notifications@github.com> wrote:

The build process for the extension looks fine, as does the configuration. Did you try this with a ZIP installation of Neo4j though? Download Neo4j as a ZIP for Windows, unpack it, put the extension JAR file into the plugins directory in the unpacked ZIP, update the config in conf\neo4j.com, and then start Neo4j using "bin\Neo4j.bat console". Does that still give you an error?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dmontag
Copy link
Owner

dmontag commented Jun 22, 2016

I believe there are some fixes coming in the next version around this.

The resource /db/data/ext is somewhat confusingly named, as it shows server plugins loaded and not extensions. Server plugins are a deprecated code loading mechanism in Neo4j that should not be used any more. The correct way to load code in Neo4j is via extensions and/or stored procedures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants