Announcement

Collapse
No announcement yet.

Kann Grails WAR nicht in Tomcat deployen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kann Grails WAR nicht in Tomcat deployen

    Hallo liebes Forum,

    vielleicht könnt ihr mir helfen.
    Ich versuche nun seit geraumer Zeit eine von Grails erstellte WAR-Datei im Tomcat zum Laufen zu bekommen - ohne Erfolg.

    Verwendete Tools:

    Tomcat 6.0.18-16.3.4
    Grails 1.2.2
    Suse Linux 11.1
    Apache 2.2.10-2.9.1

    Folgende Anzeige erscheint in der Log-Datei Catalina.out nach dem Tomcat Neustart


    14.05.2010 16:40:11 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performan\
    ce in production environments was not found on the java.library.path: /usr/lib/\
    jvm/java-1.6.0-sun-1.6.0/jre/lib/i386/server:/usr/lib/jvm/java-1.6.0-sun-1.6.0/\
    jre/lib/i386:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/../lib/i386:/usr/lib/mpi/gcc\
    /openmpi/lib:/usr/java/packages/lib/i386:/lib:/usr/lib
    14.05.2010 16:40:11 org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    14.05.2010 16:40:11 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 664 ms
    14.05.2010 16:40:11 org.apache.catalina.users.MemoryUserDatabase save
    WARNUNG: User database is not persistable - no write permissions on directory
    14.05.2010 16:40:11 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    14.05.2010 16:40:11 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    14.05.2010 16:40:11 org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive sb-0.1.war
    14.05.2010 16:40:20 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Error listenerStart
    14.05.2010 16:40:20 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Context [/sb-0.1] startup failed due to previous errors


    Die angezeigten Fehler in der localhost.log:

    ERROR main org.springframework.web.context.ContextLoader - Context initializati\
    on failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean wi\
    th name 'messageSource': Initialization of bean failed; nested exception is org\
    .springframework.beans.factory.BeanCreationExcepti on: Error creating bean with \
    name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' wh\
    ile setting bean property 'sessionFactory'; nested exception is org.springframe\
    work.beans.factory.BeanCreationException: Error creating bean with name 'sessio\
    nFactory': Cannot resolve reference to bean 'hibernateProperties' while setting\
    bean property 'hibernateProperties'; nested exception is org.springframework.b\
    eans.factory.BeanCreationException: Error creating bean with name 'hibernatePro\
    perties': Cannot resolve reference to bean 'dialectDetector' while setting bean\
    property 'properties' with key [hibernate.dialect]; nested exception is org.sp\
    ringframework.beans.factory.BeanCreationException: Error creating bean with nam\
    e 'dialectDetector': Invocation of init method failed; nested exception is org.\
    springframework.jdbc.support.MetaDataAccessExcepti on: Could not get Connection \
    for extracting meta data; nested exception is org.springframework.jdbc.CannotGe\
    tJdbcConnectionException: Could not get JDBC Connection; nested exception is or\
    g.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFacto\
    ry (File input/output error java.io.FileNotFoundException: prodDb.script.new (P\
    ermission denied) prodDb.script.new)


    Tomcat scheint also irgendwie keine JDBC Connection zu bekommen. Die genutzte Datenbank in Grails ist HSQL spezifiziert als url = "jdbc : hsqldb : file : prodDb ; shutdown=true"

    Habe danach versucht das ganze über SQL hinzubekommen mittels dem Groovy Code

    dbCreate = "update"
    boolean pooled = true
    String url = "jdbc:mysql://localhost:3306/xyz?autoReconnect=true"
    String driverClassName = "com.mysql.jdbc.Driver"
    String username = "buba"
    String password = "bubapw"

    Hiernach zeigen mir die Log-Dateien nur die SCHWERWIEGEND-Fehler an,
    und in der Localhost.log ist nichts außer folgendes zu finden:


    14.05.2010 16:40:15 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    14.05.2010 16:40:22 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    14.05.2010 16:40:22 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    14.05.2010 16:43:43 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextDestroyed()
    14.05.2010 16:43:43 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()
    14.05.2010 16:43:57 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    14.05.2010 16:44:05 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    14.05.2010 16:44:05 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    14.05.2010 18:36:38 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextDestroyed()
    14.05.2010 18:36:38 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()
    14.05.2010 18:37:38 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    14.05.2010 18:37:47 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    14.05.2010 18:37:47 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    14.05.2010 18:39:30 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextDestroyed()
    14.05.2010 18:39:30 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextDestroyed()
    14.05.2010 18:39:50 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    14.05.2010 18:39:59 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    14.05.2010 18:39:59 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()

    Auch das Einstellen bzw. Freischalten der Zeilen in den logging.properties in Tomcat auf
    org.apache.catalina.startup.ContextConfig.level = FINE
    org.apache.catalina.startup.HostConfig.level = FINE

    brachte keine neue Erkenntnis. Da hier nur mehr Logging-Daten angezeigt werden. Ein Auszug um die SCHWERWIEGEND-Fehler herum:

    FEIN: Pipeline Configuration:
    14.05.2010 18:43:07 org.apache.catalina.startup.ContextConfig start
    FEIN: org.apache.catalina.core.StandardContextValve/1.0
    14.05.2010 18:43:07 org.apache.catalina.startup.ContextConfig start
    FEIN: ======================
    14.05.2010 18:43:17 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Error listenerStart
    14.05.2010 18:43:17 org.apache.catalina.core.StandardContext start
    SCHWERWIEGEND: Context [/dn-0.1] startup failed due to previous errors
    14.05.2010 18:43:17 org.apache.catalina.startup.ContextConfig stop

    FEIN: ContextConfig: Processing STOP
    14.05.2010 18:43:18 org.apache.catalina.startup.HostConfig addWatchedResources
    FEIN: Watching WatchedResource '/usr/share/tomcat6/conf/context.xml'
    14.05.2010 18:43:18 org.apache.catalina.startup.HostConfig addWatchedResources
    FEIN: Watching WatchedResource '/srv/tomcat6/webapps/dn-0.1/WEB-INF/web.xml'
    14.05.2010 18:43:18 org.apache.catalina.startup.HostConfig addWatchedResources
    FEIN: Watching WatchedResource '/usr/share/tomcat6/conf/web.xml'
    14.05.2010 18:43:18 org.apache.catalina.startup.HostConfig deployDirectory
    FEIN: Deploying web application directory docs
    14.05.2010 18:43:18 org.apache.catalina.startup.ContextConfig init
    FEIN: ContextConfig: Initializing
    14.05.2010 18:43:18 org.apache.catalina.startup.ContextConfig processContextCon\
    fig
    FEIN: Processing context [/docs] configuration file /usr/share/tomcat6 conf/con\
    text.xml

    Hilfe ...

    Wär cool, wenn mir jemand helfen könnte

  • #2
    Der Fehler beginnt doch viel früher. Würde vermuten er kann Spring nicht finden.
    Christian

    Comment

    Working...
    X