日頃の行い

個人的な日頃の行いをつらつら書いてます\\\\ ٩( 'ω' )و ////

openrdf-sesame のインストール

とりあえずopen-sesame.war をwebappsに置いたが、即エラー\(^o^)/

javax.servlet.ServletException: サーブレット openrdf-http-server のServlet.init()が例外を投げました
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Thread.java:679)
原因

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adunaAppConfig' defined in ServletContext resource [/WEB-INF/openrdf-http-server-servlet.xml]: Invocation of init method failed; nested exception is java.io.IOException: Unable to create logging directory /usr/share/tomcat6/.aduna/openrdf-sesame/logs
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	java.security.AccessController.doPrivileged(Native Method)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
	javax.servlet.GenericServlet.init(GenericServlet.java:212)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Thread.java:679)
原因

java.io.IOException: Unable to create logging directory /usr/share/tomcat6/.aduna/openrdf-sesame/logs
	info.aduna.app.logging.base.LogConfigurationBase.setBaseDir(LogConfigurationBase.java:59)
	info.aduna.app.AppConfiguration.init(AppConfiguration.java:135)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:616)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
	java.security.AccessController.doPrivileged(Native Method)
	org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
	org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
	org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
	org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
	org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
	org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
	org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
	org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
	org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
	org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
	org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
	javax.servlet.GenericServlet.init(GenericServlet.java:212)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	java.lang.Thread.run(Thread.java:679)

/(^o^)\

とりあえず、IOExceptionが起きてる。

$cd /usr/share/tomcat6/
$ls -a
[~tomcat]
.  ..  bin  conf  lib  logs  temp  webapps  work

.adunaなんて奴いないじゃないか。

sudo mkdir .aduna


これでどうだ!?やったか!?


IOExceptionのとこが変わっただけ

java.io.IOException: Unable to create logging directory /usr/share/tomcat6/.aduna/openrdf-sesame/logs

中身がいるのか。
ここでopenrdf-sesami/logs
とかいってるけどこの後のディレクトリを作ったら結局、TOMCAT_HOME/webapps/openrdf-sesamiと同じ物が必要らしかったので、

[~tomcat/.aduna]
$sudo ln -s /usr/share/tomcat/webapps/openrdf-sesami openrdf-sesami

を実行。
そしたら、うまくいきましたとさ。
めでたしめでたし。