Grails deploys on Tomcat6

when trying to deploy the Grails application to tomcat6. I ran into some problems: I used the command grails warto create a war, and then copied it to var/lib/tomcat6/webappsand tried to restart the container.

I had to change the default Tomcat policy to skip security exceptions, because I could not access the environment variable (e.g. grails.env), and then tried again, but this gives me an exception related to creating something, but it is not clear where I trying to fix the error, according to tomcat6 log the problem is this:

SEVERE: initialized event of sending exceptions for an instance of the listener of class org.codehaus.groovy.grails.web.context.GrailsC $ org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext $ in java .lang.Thread.run (Thread.java:619) Called: org.codehaus.groovy.grails.exceptions.NewInstanceCreationException: Could not create a new instance of the class [Hiberna $ ... 1 more Called: java.lang.NoClassDefFoundError: org .hibernate.cfg.Environment

It seems that it can not load the class org.hibernate.cfg.Environment.

I checked applicationContext.xmland links to grails.xmlthe search for plugins in this last file I have HibernateGrailsPlugin.

Where should I look for a plugin?

+3
3

, , , . .jar , . - Grails War, , .

+1

,

grails clean

grails run-war

, .

, grails, .

+4

jar hibernate-core-3.3.2.GA.jar tomcat/lib . , !

: jar , . NetBeans Jetty, tomcat .

In any case, it now works by putting the jar file hibernate-core-3.3.2.GA.jarin tomcat / lib.

Thanks again

+2
source

Source: https://habr.com/ru/post/1744193/


All Articles