./data/transactions/foobar の Berkeley DB を開いて読み取る Tomcat 用の Grails Web アプリケーションを作成しました。
このコードは、私の Eclipse 環境で正常に動作します。
しかし、サーバーに移動すると、この例外が吐き出されます。サーバー上の webapps Web アプリケーションとして Grails を WAR ファイルにデプロイするときに、現在の作業ディレクトリがどこにあるのかわかりません。
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 サーバーの Tomcat インストール ディレクトリは /usr/share/tomcat6 です。Web アプリケーションのルート ディレクトリは /usr/share/tomcat6/webapps です。WAR ディレクトリは、「bridge」という名前のサブディレクトリにインストールされます。Grails アプリへの WAR パスは /usr/share/tomcat6/webapps/bridge にあります
./data/transaction/Foobar を /usr/share/tomcat6/webapps と /usr/share/tomcat6/webapps/bridge の両方に配置しようとしましたが、うまくいきませんでした。
また、./data/transaction/Foobar を /usr/share/tomcat6 インストール ベース ディレクトリに配置しようとしましたが、運もありませんでした。
以下は、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 アプリが起動されている現在の作業ディレクトリを見つけることができるアイデアはありますか?