sesame 2.6.9 with tomcat 7 set up won't work

女生的网名这么多〃 提交于 2019-12-13 00:43:09

问题


I was trying to install sesame. I first followed these instructions: http://www.openrdf.org/doc/sesame2/users/ch06.html

To install tomcat as a prerequesite I used this tutorial: http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/ (I stopped before the automatic starting part)

The set up tutorial says "The deployment process is container-specific, please consult the documentation for your container on how to deploy a web application." according to this tutorial: http://www.snee.com/bobdc.blog/2009/02/getting-started-with-sesame.htmlmit says

"To install a Sesame server on top of Tomcat, I copied the two war files from openrdf-sesame-2.2.4\war to apache-tomcat-6.0.18\webapps. After I shut down and restarted Tomcat, sending my browser to ttp://localhost:8080/openrdf-workbench and ttp://localhost:8080/openrdf-sesame showed welcome screens about how these apps were running with no problem."

Which I did. ttp://localhost:8080 shows a tomcat welcome page, ttp://localhost:8080/openrdf-workbench shows a site, but ttp://localhost:8080/openrdf-sesame gives only a 404 error. I also can't do anything on the workbench site, as it forces one to stay on the "Change Server" input field. Trying to just type in the path as proposed by "i.e. ttp://localhost:8080/openrdf-sesame" below the input fiels only says "Invalid Server URL" On top of the page it also says

Current Selections
Sesame server   none    change
Repository  none    change

which just looks totally diffrent than how it should be, as like here: http://www.jenitennison.com/blog/node/153

I digged a bit more around and found this: http://www.openrdf.org/doc/sesame/users/ch02.html But it seems outdated, as there is simply no [SESAME_DIR]/WEB-INF/system.conf.example in there. I also found this: http://www.openrdf.org/forum/mvnforum/viewthread?thread=658 But there is also no "example-file" to be renamed.

Also I have shutdown tomcat with the shutdown.sh script in the tomcat bin folder and restarted it with the startup.sh script several times, but that doesn't seem to help any bit either.

Am I missing something? As the "Getting started with Sesame" Blogpost indicated copying them to the webapps folder should have been enough, but it is not working right...

Thanks for any help!


EDIT 1: The workaround with the direct access to localhost:8080/openrdf-sesame/home/overview.view does unfortunately not work either. What I also don't understand, if the Sesame Server were running properly and the trouble were only with the redirect, the workbench should find the server, which is just not the case.


EDIT 2: the catalina.2012-11-01.log contains the following:

Nov 01, 2012 11:49:28 AM org.openrdf.workbench.proxy.WorkbenchGateway canConnect
WARNING: java.io.FileNotFoundException: http://localhost:8080/openrdf-sesame/protocol
java.io.FileNotFoundException: http://localhost:8080/openrdf-sesame/protocol
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1613)
    at java.net.URL.openStream(URL.java:1037)
    at org.openrdf.workbench.proxy.WorkbenchGateway.canConnect(WorkbenchGateway.java:130)
    at org.openrdf.workbench.proxy.WorkbenchGateway.isValidServer(WorkbenchGateway.java:303)
    at org.openrdf.workbench.proxy.WorkbenchGateway.findWorkbenchServlet(WorkbenchGateway.java:209)
    at org.openrdf.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:100)
    at org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:40)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.openrdf.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

It seems looking for some protocol file, but that file doesn't even exist in the war package, so I am kind of clueless what it wants...


EDIT 3: So while trying to figure out what the heck was wrong I tired looking it up according to below answer to look it up with the Tomcat's web application manager. While I still don't get that one to work (keeping to get "403 Access Denied" errors depite editing the tomcat-users.xml), something along the way must have been accidentially done the magic. My only guess is that shutting it down and restarting it at least a dozen times may have helped, as I really didn't do anything else than editing the tomcat-users.xml file and restarting it each time tryingto get the manager working. I have no clue, why that wouldn't have helped before, through, I did restart tomcat at least four times before.


回答1:


There is a nice but slightly out of date walk-through here, which gave me the key tip I needed when I ran into the same trouble you mentioned above.

This strategy has one key difference: it deploys the WAR file (for me: /home/joe/sesame/core/http/server/target/openrdf-sesame.war) from within the Tomcat Manager (http://localhost:8080), rather than via the jar -xf [PATH/TO/]sesame.war command-line invocation from the docs. Perhaps the key feature is just that it deploys to openrdf-sesame rather than sesame...

In any case, now when I visit http://localhost:8080/openrdf-sesame/home/overview.view I get a complaint that I'm not using the OpenRDF Workbench... but otherwise all is well.




回答2:


The FileNotFoundException indicates that the Sesame server is not running. However, it does not tell us why it is not running. Can you doublecheck that you've deployed the openrdf-sesame.war file correctly? Is the OpenRDF Sesame webapp listed (and started) if you enter Tomcat's web application manager? Are there any other errors or warnings in the tomcat logs that indicate problems?

If it is deployed correctly, another possible cause is that the Sesame server has insufficient permissions to write to disk. Sesame creates an application data dir for configuration files and for persisting data, by default (on Linux) in $HOME/.aduna (where $HOME is the homedir of the user under which Tomcat runs). Can you verify that it has sufficient permissions to write there? I vaguely remember this being a problem with the default Tomcat setup that comes with the Ubuntu Linux distribution.

If you can't change the permissions, you can also configure a different location for Sesame to use as datadir. See the Sesame docs, chapter 5, for details.




回答3:


I realize that this answer is not going to be of much help to you after all this time, but I had the EXACT same problem as you and I found a solution that worked for me. In my case it was simply a problem of permissions: once I run

chmod -R 777 /location/of/my/webapps

everything started working smoothly. I hope that this can help anybody who stumbles on this problem.

ps: please note that setting 777 permissions on any folder is often considered unwise, so try to consult the man page for chmod and try some combinations to see which one suits you best.



来源:https://stackoverflow.com/questions/13163410/sesame-2-6-9-with-tomcat-7-set-up-wont-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!