Grails

plugin only war file does not work on Tomcat

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.1.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes

Description

Since -nojars does not bundle any application specific dependency (See http://jira.codehaus.org/browse/GRAILS-5174), I created a script based on War.groovy, which creates the WAR file with plugins and any application specific jars but NOT the grails dependencies. This is so that the WAR size is small. The grails dependencies are copied to tomcat6/shared/lib (everything from $GRAILS_HOME/lib and $GRAILS_HOME/dist). However when tomcat is started and the war file (Attached with this issue) is deployed it gives this error and deployment fails:

I am attaching the war file which is from petclinic sample of grails 1.1.1 and the script to create the WAR. To use the script, copy it to $GRAILS_HOME/lib and type grails shared-war inside petclinic sample directory

Oct 1, 2009 8:17:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Oct 1, 2009 8:17:18 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 1, 2009 8:17:18 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 1, 2009 8:17:18 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21 config=null
Oct 1, 2009 8:17:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1336 ms
Oct 1, 2009 8:17:58 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive pet.war
Oct 1, 2009 8:18:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 1, 2009 8:18:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/pet] startup failed due to previous errors

  1. SharedWar.groovy
    01/Oct/09 3:27 PM
    12 kB
    Vivek Pandey
  2. stacktrace.log
    01/Oct/09 4:09 PM
    86 kB
    Vivek Pandey

Activity

Hide
Vivek Pandey added a comment -

Attaching the grails generated stactrace.log file. Looks like grails can not instantiate HibernateGrailsPlugin.
2009-05-01 18:42:11,039 [main] ERROR StackTrace - Sanitizing stacktrace:
org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [HibernateGrailsPlugin]!
at org.codehaus.groovy.grails.commons.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:106)
at org.codehaus.groovy.grails.commons.AbstractGrailsClass.<init>(AbstractGrailsClass.java:71)
at org.codehaus.groovy.grails.plugins.AbstractGrailsPlugin$GrailsPluginClass.<init>(AbstractGrailsPlugin.java:62)

Show
Vivek Pandey added a comment - Attaching the grails generated stactrace.log file. Looks like grails can not instantiate HibernateGrailsPlugin. 2009-05-01 18:42:11,039 [main] ERROR StackTrace - Sanitizing stacktrace: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of class [HibernateGrailsPlugin]! at org.codehaus.groovy.grails.commons.AbstractGrailsClass.newInstance(AbstractGrailsClass.java:106) at org.codehaus.groovy.grails.commons.AbstractGrailsClass.<init>(AbstractGrailsClass.java:71) at org.codehaus.groovy.grails.plugins.AbstractGrailsPlugin$GrailsPluginClass.<init>(AbstractGrailsPlugin.java:62)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Last Reviewed: