./data/transactions/foobarのBerkeley DBから開いて読み込むTomcat用のGrails Webアプリケーションを作成しました。Grails/Tomcat Webappの現在の作業ディレクトリを取得するにはどうすればよいですか?
このコードは、Eclipse環境で正常に動作します。
しかし、サーバーに移動すると、この例外が発生します。私はGrailsをWARファイルにサーバー上のWebアプリケーションWebアプリケーションとしてデプロイするときに、現在の作業ディレクトリの場所がわかりません。
com.sleepycat.je.EnvironmentNotFoundException: (JE 4.1.10) ./data/transactions/Foobar
Home directory: ./data/transactions/Foobar ENV_NOT_FOUND:
EnvironmentConfig.setAllowCreate is false so environment creation is not permitted, but there are no log files in the environment directory. Environment is invalid and must be closed.
LinuxサーバーのMy Tomcatインストールディレクトリは、/ usr/share/tomcat6です。 webappsのルートディレクトリは/ usr/share/tomcat6/webappsです。 WARディレクトリは、 "bridge"という名前のサブディレクトリにインストールされています。私のGrailsアプリケーションへのWARパスは/ usr/share/tomcat6/webapps/bridgeにあります。
私は/ usr/share/tomcat6/webappsと/ usr/share/tomcat6/webapps/bridge、運がない。
私は/ usr/share/tomcat6にbaseディレクトリをインストールすることもできました。
次は、私はTomcatサーバーから参照エラーです:
Error 500: Executing action [index] of controller[com.ecmhp.ecmdatabridge.generators.GenerateEmiDigestsController]
caused exception: (JE 4.1.10) ./data/transactions/Foobar
Home directory: ./data/transactions/Foobar ENV_NOT_FOUND:
EnvironmentConfig.setAllowCreate is false so environment creation is not permitted, but there are no log files in the environment directory. Environment is invalid and must be closed.
サーブレット:Grailsの
URI:/bridge/grails/generateEmiDigests/index.dispatch
Exception Message: (JE 4.1.10) ./data/transactions/Foobar
Home directory: ./data/transactions/Foobar ENV_NOT_FOUND:
EnvironmentConfig.setAllowCreate is false so environment creation is not permitted, but there are no log files in the environment directory. Environment is invalid and must be closed.
Caused by: (JE 4.1.10) ./data/transactions/Foobar
Home directory: ./data/transactions/Foobar ENV_NOT_FOUND:
EnvironmentConfig.setAllowCreate is false so environment creation is not permitted, but there are no log files in the environment directory. Environment is invalid and must be closed.
どれでも私のTomcat WARの現在の作業ディレクトリをBerkeley DB ./data/transactionファイルを見つけるためにどのように設定できるのか?または、現在の作業ディレクトリがGrailsアプリケーションであることを知ることができますか?