私は Windows で Grails 2.3.5 を使用しており、コマンド ラインから grails create-app コマンドを使用してプロジェクトを作成しました。コマンドラインから grails run-app --verbose を実行すると、以下の例外が発生します。
Caching deactivated: failed to create cache directory: C:/grails/2.3.5/
java.lang.NoClassDefFoundError: org/apache/catalina/startup/Tomcat
at...
Caused by: java.lang.ClassNotFoundException: org.apache.cataliina.startup.Tomcat
以下は私のBuildConfig.groovyファイルの一部です
...
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
//compile 'xlan:serializer:jar:2.7.1'
// runtime 'mysql:mysql-connector-java:5.1.27'
// runtime 'org.postgresql:postgresql:9.3-1100-jdbc41'
//These were added for mongodb
compile 'org.grails:grails-datastore-gorm:3.1.0.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.0.RELEASE'
test 'org.grails:grails-datastore-simple:3.1.0.RELEASE'
compile "net.sf.ehcache:ehcache-core:2.4.6"
compile 'org.grails:grails-async:jar:2.3.8'
compile 'org.springframework:spring-tx:3.2.8.RELEASE'
}
plugins {
// plugins for the build system only
//build ":serializer:2.7.1"
build ':tomcat:7.0.50'
// plugins for the compile step
compile ":scaffolding:2.0.1"
//compile ':cache:1.1.1'
compile ':mongodb:3.0.1'
compile ":jquery-ui:1.10.3"
compile ":spring-security-core:2.0-RC4"
// plugins needed at runtime but not for compilation
// runtime ":hibernate:3.6.10.7" // or ":hibernate4:4.1.11.6"
runtime ":database-migration:1.3.8"
runtime ":jquery:1.10.2.2"
runtime ":resources:1.2.1"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0.1"
//runtime ":cached-resources:1.1"
//runtime ":yui-minify-resources:0.1.5"
}...
ローカルリポジトリを指すこの grails オフラインモードを実行しています。これは、以下にリストされているjarをGroovy/Grailsツールスイートフォルダーのlibフォルダーに追加して、クラスパスに配置した後にのみ正常にコンパイルされました(これにより、カタリナのTomcatKillSwitchエラーが修正されました)
- カタリナ.jar
- カタリナ-ant.jar
- カタリナ-ha.jar
- catalina-tribes.jar
- tomcat-api.jar
- tomcat-coyote.jar
- tomcat-util.jar
grails が Tomcat を見つけられず、キャッシュを作成できないのはなぜですか?