http://neo4j.org/nabble/#nabble-td3475710
I'm using version 1.5 (not a milestone). Everything "normal" works,
but I cant get the unmanaged hello world to work, running it unchanged
and placing the jar in lib and plugins and the required config in
server.config.
--
HTTP ERROR 503
Problem accessing /examples/unmanaged/helloworld/55555. Reason:
com.sun.jersey.api.container.ContainerException: The
ResourceConfig instance does not contain any root resource classes.
Caused by:
javax.servlet.UnavailableException:
com.sun.jersey.api.container.ContainerException: The ResourceConfig
instance does not contain any root resource classes.
at
org.mortbay.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:
415)
--
But before I even attempt to run the unmanaged url, this error happens
at startup, which I suspect is related:
..
Dec 14, 2011 4:38:42 PM com.sun.jersey.api.core.PackagesResourceConfig
init
INFO: Scanning for root resource and provider classes in the packages:
org.neo4j.server.rest.discovery
Dec 14, 2011 4:38:42 PM com.sun.jersey.api.core.ScanningResourceConfig
logClasses
INFO: Root resource classes found:
class org.neo4j.server.rest.discovery.DiscoveryService
Dec 14, 2011 4:38:42 PM com.sun.jersey.api.core.ScanningResourceConfig
init
INFO: No provider classes found.
Dec 14, 2011 4:38:42 PM com.sun.jersey.spi.service.ServiceFinder
filterServiceURLsWithVersion
FINE: Including service URL: jar:file:/home/kfitch/neo/neo4j-
community-1.5/system/lib/jersey-server-1.9.jar!/META-INF/services/
com.sun.jersey.spi.container.Web
ApplicationProvider
Dec 14, 2011 4:38:42 PM
com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer
initialize
CONFIG: The EJB interceptor binding API is not available. JAX-RS EJB
support is disabled.
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource
file: java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
645)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:
325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
com.sun.jersey.server.impl.ejb.EJBComponentProviderFactoryInitilizer.initialize(EJBComponentProviderFactoryInitilizer.java:
64)
at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:
574)
at com.sun.jersey.spi.container.servlet.ServletContainer
$InternalWebComponent.configure(ServletContainer.java:311)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:
608)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:
210)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
373)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
556)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
440)
at
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
263)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:
140)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:
152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.neo4j.server.web.Jetty6WebServer.startJetty(Jetty6WebServer.java:
168)
at
org.neo4j.server.web.Jetty6WebServer.start(Jetty6WebServer.java:105)
at
org.neo4j.server.NeoServerWithEmbeddedWebServer.startWebServer(NeoServerWithEmbeddedWebServer.java:
252)
at
org.neo4j.server.NeoServerWithEmbeddedWebServer.start(NeoServerWithEmbeddedWebServer.java:
106)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:52)
Dec 14, 2011 4:38:42 PM
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer
initialize
CONFIG: The CDI BeanManager is not available. JAX-RS CDI support is
disabled.
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource
file: java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
645)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:
325)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
com.sun.jersey.server.impl.cdi.CDIComponentProviderFactoryInitializer.initialize(CDIComponentProviderFactoryInitializer.java:
66)
at
com.sun.jersey.spi.container.servlet.WebComponent.configure(WebComponent.java:
576)
at com.sun.jersey.spi.container.servlet.ServletContainer
$InternalWebComponent.configure(ServletContainer.java:311)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:
608)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:
210)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
373)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:
556)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
440)
at
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
263)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:
140)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:
152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.neo4j.server.web.Jetty6WebServer.startJetty(Jetty6WebServer.java:
168)
at
org.neo4j.server.web.Jetty6WebServer.start(Jetty6WebServer.java:105)
at
org.neo4j.server.NeoServerWithEmbeddedWebServer.startWebServer(NeoServerWithEmbeddedWebServer.java:
252)
at
org.neo4j.server.NeoServerWithEmbeddedWebServer.start(NeoServerWithEmbeddedWebServer.java:
106)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:52)
Dec 14, 2011 4:38:42 PM
com.sun.jersey.server.impl.managedbeans.ManagedBeanComponentProviderFactoryInitilizer
initialize
CONFIG: The managed beans injection manager API is not available. JAX-
RS managed beans support is disabled.
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource
file: java.naming.factory.initial
...
I wondering what jar files I need at run time. Aside from the
"usual", I've added these to /lib:
jsr311-api-1.1.1.jar
jaxb-impl-2.1.13.jar
jaxb-api-2.1.jar
commons-configuration-1.6.jar
neo4j-server-1.5.jar
server-api-1.5.jar
Thanks,
Kent Fitch
Cheers,
/peter neubauer
TC CEO of the year - vote for Emil Eifrém!
http://crunchies2011.techcrunch.com/nominate/
Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter @peterneubauer
brew install neo4j && neo4j start
heroku addons:add neo4j
I've tarred and gzipped our neo4j 1.5 installation and placed it here:
http://dl.dropbox.com/u/53419165/copy-neo4j-1.5.tar.gz
Our data is not stored within that directory structure (but I dont
think this is data related). The installation is standard except for
changes to the config (one of which includes the unmanaged extension
config code), the extra jars, and a change I made to the start script
to provide the full path to lsof (needed in our case). The unmanaged
extension is in myeg.jar, in both plugins and lib. The source for the
unmanaged extension is identical to the hello word example provided in
the neo4j doco, but I have also placed it here:
http://dl.dropbox.com/u/53419165/HelloWorldResource.java
Any help is gratefully appreciated,
Regards,
Kent Fitch
Just tested your server with the original example jar. Works. Will check tomorrow for packaging problems with your jar.
/peter
Sent from my phone, please excuse typos and autocorrection.
Cheers,
/peter neubauer
TC CEO of the year - vote for Emil Eifrém!
http://crunchies2011.techcrunch.com/nominate/
Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter @peterneubauer
brew install neo4j && neo4j start
heroku addons:add neo4j
thanks for looking in to this. I've compiled and built the jar using
the unix command line.
compiled with:
javac -classpath $NEOJARS org/neo4j/examples/server/unmanaged/
HelloWorldResource.java
(where $NEOJARS is a string with the names of all jar files in the
neo4j lib directory)
jar created with:
jar -cvf myeg.jar org/neo4j/examples/server/unmanaged/
HelloWorldResource.class
I've just noticed that the doco for server plugins
http://docs.neo4j.org/chunked/stable/server-plugins.html
states that "The .jar file must include the file META-INF/services/
org.neo4j.server.plugins.ServerPlugin with the fully qualified name of
the implementation class". Maybe this is also required for umanaged
extensions?
Regards,
Kent Fitch
On Dec 17, 3:24 am, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:
> Kent,
> how did you produce the jar with the extension in it? I start to
> suspect packaging errors in how the .jar is produced. Could you share
> your project setup?
>
> Cheers,
>
> /peter neubauer
>
> TC CEO of the year - vote for Emil Eifrém!http://crunchies2011.techcrunch.com/nominate/
>
> Google:neubauer.peter
> Skype:peter.neubauer
> Phone: +46 704 106975
> LinkedIn http://www.linkedin.com/in/neubauer
> Twitter @peterneubauer
>
> brew install neo4j && neo4j start
> heroku addons:add neo4j
>
> On Thu, Dec 15, 2011 at 10:39 PM, Peter Neubauer
>
>
>
>
>
>
>
> <peter.neuba...@neotechnology.com> wrote:
> > Just tested your server with the original example jar. Works. Will check
> > tomorrow for packaging problems with your jar.
>
> > /peter
>
> > Sent from my phone, please excuse typos and autocorrection.
>
Kent,
The services file is not required. The server-examples jar is compiled using maven. Could you please do a simple maven project and test producing the jar? I gave seen this with an export from Eclipse before... There was some setting about directory structure that needed to be set during jar export.
I would then like to know if the maven produced jar works. Seems like the maven har process us different than the pure cli version.
/peter
Sent from my phone, please excuse typos and autocorrection.
I created a simple maven project to compile and package the sample
unmanaged extension. There were 2 differences in the created jar:
1) using plain old jar -cvf to create the jar, the META-INF/
MANIFEST.MF file contained this:
--
Manifest-Version: 1.0
Created-By: 1.6.0_07 (Sun Microsystems Inc.)
--
(last line blank)
using mvn, the same file contained this:
--
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: kfitch
Build-Jdk: 1.6.0_07
--
(last line blank)
If I replaced the maven-created manifest in my original jar, copied it
to the plugins directory and restarted neo4j server, the unmanaged
sample extension worked.
2) The maven-created class file contained a LocalVariableTable
section, I guess because maven supplies "-g" flag to javac. This
didnt seem to matter, as all it took was the maven manifest to get it
to work.
I don't know why this makes a difference, but hopefully it helps
someone else!
Kent
On Dec 17, 6:42 pm, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:
> Kent,
> The services file is not required. The server-examples jar is compiled
> using maven. Could you please do a simple maven project and test producing
> the jar? I gave seen this with an export from Eclipse before... There was
> some setting about directory structure that needed to be set during jar
> export.
>
> I would then like to know if the maven produced jar works. Seems like the
> maven har process us different than the pure cli version.
>
> /peter
>
> Sent from my phone, please excuse typos and autocorrection.
Cheers,
/peter neubauer
Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter @peterneubauer
brew install neo4j && neo4j start
heroku addons:add neo4j
Orginally, I created it like this:
jar -cvf myeg.jar org/neo4j/examples/server/unmanaged/
HelloWorldResource.class
jar -tvf myeg.jar shows:
0 Wed Dec 14 14:48:50 EST 2011 META-INF/
71 Wed Dec 14 14:48:50 EST 2011 META-INF/MANIFEST.MF
1546 Wed Dec 14 14:43:12 EST 2011 org/neo4j/examples/server/
unmanaged/HelloWorldResource.class
BUT if I create it like this:
jar -cvf myeg.jar *
then
jar -tvf myeg.jar shows:
0 Tue Dec 20 17:10:30 EST 2011 META-INF/
71 Tue Dec 20 17:10:30 EST 2011 META-INF/MANIFEST.MF
0 Tue Dec 20 17:08:28 EST 2011 org/
0 Tue Dec 20 17:08:28 EST 2011 org/neo4j/
0 Tue Dec 20 17:08:28 EST 2011 org/neo4j/examples/
0 Tue Dec 20 17:08:28 EST 2011 org/neo4j/examples/server/
0 Tue Dec 20 17:08:28 EST 2011 org/neo4j/examples/server/
unmanaged/
1546 Wed Dec 14 14:43:12 EST 2011 org/neo4j/examples/server/
unmanaged/HelloWorldResource.class
I think the act of nominating a specific class (rather than an *)
causes the intermediate directories to not appear in the jar, which is
the root cause of the problem!
Regards,
Kent Fitch
On Dec 20, 5:03 pm, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:
Cheers,
/peter neubauer
Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter @peterneubauer
brew install neo4j && neo4j start
heroku addons:add neo4j
Cheers,
/peter neubauer
Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter @peterneubauer
brew install neo4j && neo4j start
heroku addons:add neo4j
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/0dNqGXvEbNg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.
$ jar tf unmanaged-extension-template-1.0.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/neo4j/
com/neo4j/example/
com/neo4j/example/extension/
com/neo4j/example/extension/MyService$Labels.class
com/neo4j/example/extension/MyService$RelTypes.class
com/neo4j/example/extension/MyService.class
META-INF/maven/
META-INF/maven/unmanaged-extension-template/
META-INF/maven/unmanaged-extension-template/unmanaged-extension-template/
META-INF/maven/unmanaged-extension-template/unmanaged-extension-template/pom.xml
META-INF/maven/unmanaged-extension-template/unmanaged-extension-template/pom.properties