neo4j constructor issue

86 views
Skip to first unread message

neo4j-na

unread,
May 1, 2012, 5:19:08 PM5/1/12
to Neo4j
Hi.
I have a Spring based program and I am trying to get it to connect to
the neo4j remote database using REST.
When I run the jar....I get the following exception:

com.sun.jersey.api.client.ClientHandlerException:
com.sun.jersey.api.client.Clie
ntHandlerException: A message body writer for Java type, class
java.lang.String,
and MIME media type, application/json, was not found
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle
(URLConnectionClientHandler.java:131)
at
com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasic
AuthFilter.java:81)
at com.sun.jersey.api.client.Client.handle(Client.java:616)
at
com.sun.jersey.api.client.WebResource.handle(WebResource.java:559)
at com.sun.jersey.api.client.WebResource.access
$200(WebResource.java:72)

at com.sun.jersey.api.client.WebResource
$Builder.get(WebResource.java:45
4)
at
org.neo4j.rest.graphdb.ExecutingRestRequest.get(ExecutingRestRequest.
java:114)
at
org.neo4j.rest.graphdb.query.RestCypherQueryEngine.query(RestCypherQu
eryEngine.java:56)
at
org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query
(SpringRestCypherQueryEngine.java:35)
at
org.springframework.data.neo4j.rest.SpringRestCypherQueryEngine.query
(SpringRestCypherQueryEngine.java:25)
at
com.rfp.application.CorrelationApplicationRun.run(CorrelationApplicat
ion.java:51)
at
com.rfp.application.CorrelationApplication.main(CorrelationApplicatio
n.java:37)
at com.rfp.application.Start.main(Start.java:22)
Caused by: com.sun.jersey.api.client.ClientHandlerException: A message
body writ
er for Java type, class java.lang.String, and MIME media type,
application/json,
was not found
at
com.sun.jersey.api.client.TerminatingClientHandler.writeRequestEntity
(TerminatingClientHandler.java:293)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invok
e(URLConnectionClientHandler.java:182)
at
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle
(URLConnectionClientHandler.java:129)
... 12 more

If I am reading this right, it is able to connect but it does not know
how to process the data that is returning...
I have the jersey-json in my dependency list but I am still seeing the
error. Do I need to pass something into the constructor via the
appContext?

Thanks.

Michael Hunger

unread,
May 1, 2012, 5:31:17 PM5/1/12
to ne...@googlegroups.com
Can you please share the code that you use to create the RestGraphdatabase ? and also the uri and auth parameters used?
Best would be a test that exhibits the problem.

Is the server running on the given port?

Which version of server and java-rest-client did you use?
Also which maven dependency did you use (or did you pull or build the jar on your own) ?

Cheers

Michael
Reply all
Reply to author
Forward
0 new messages