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

Issue launching lookup service with java commandline #30

Closed
fellahst opened this issue Apr 21, 2016 · 3 comments
Closed

Issue launching lookup service with java commandline #30

fellahst opened this issue Apr 21, 2016 · 3 comments
Assignees

Comments

@fellahst
Copy link

I try to run the lookup service by using the following command line:

java -cp dbpedia-lookup-3.1-jar-with-dependencies.jar org.dbpedia
.lookup.server.Server dbpedia-lookup-index/en/current/core-i18n

The server starts at the port 1111 and when I send a query I have following error

INFO: Initiating Jersey application, version 'Jersey: 1.5 01/14/2011 12:36 PM'
INFO  - Server started in c:\data\lookup listening on http://localhost:1111/
INFO  - KeywordSearch found 0: MaxHits=5 QueryClass=place QueryString=berlin
Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type cla
ss java.lang.String, and MIME media type application/xml was not found
Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type
are:
*/* ->
  com.sun.jersey.server.impl.template.ViewableMessageBodyWriter

Apr 20, 2016 10:59:10 PM com.sun.jersey.spi.container.ContainerResponse logExcep
tion
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A mess
age body writer for Java class java.lang.String, and Java type class java.lang.S
tring, and MIME media type application/xml was not found
        at com.sun.jersey.spi.container.ContainerResponse.write(ContainerRespons
e.java:285)
        at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequ
est(WebApplicationImpl.java:1316)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1229)
        at com.sun.jersey.server.impl.application.WebApplicationImpl.handleReque
st(WebApplicationImpl.java:1219)
        at com.sun.jersey.server.impl.container.httpserver.HttpHandlerContainer.
handle(HttpHandlerContainer.java:191)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
        at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.
java:675)
        at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
        at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.sun.jersey.api.MessageException: A message body writer for Java c
lass java.lang.String, and Java type class java.lang.String, and MIME media type
 application/xml was not found
        ... 14 more

When running the same program using the shell script run.bat, the service behaves normally. I suspect that the uberjar file is not properly formed (resources describing message body writers are not set properly in the jar file?)

@kousun12
Copy link

any updates on this by chance?

@sandroacoelho
Copy link
Contributor

Hi @kousun12 : Please allow two or three days more. I have identified another issue with the index and I do not want to release without fix it

sandroacoelho added a commit that referenced this issue Jun 1, 2016
@sandroacoelho
Copy link
Contributor

sandroacoelho commented Jun 1, 2016

Hi @fellahst, @kousun12

So sorry for the big delay. Our fat jar had a small problem related to jersey server/client components. It was solved by using jersey bundle.

Could you, please try again? Thank you for your patience


Hi @jimkont Could you please run mvn deploy in order to upgrade sonatype repo?

ahmadassaf added a commit to ahmadassaf/dbpedia-lookup that referenced this issue Jun 3, 2016
* 'master' of https://github.com/dbpedia/lookup:
  Update README.md
  Fixing Docker distribution (issue dbpedia#31)
  Fixing issue dbpedia#30 and dbpedia#31
  Update README.md
  Update README.md
  Update WikiStatsExtractor.scala
  Update WikiStatsExtractor.scala
  Update pom.xml
  Update README.md
  WikiStatsExtractor integration
  Update README.md
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

3 participants