Note that there are some explanatory texts on larger screens.

plurals
  1. POGrails deployment on Tomcat
    primarykey
    data
    text
    <p>I am trying to deploy a Grails app using Tomcat 6.0. When I use the db packaged with Grails it works fine. However, when I use PostgreSQL I get a status 404 error. </p> <p>The log give me the following: </p> <pre><code>Nov 12, 2011 7:44:40 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin;;. Nov 12, 2011 7:44:41 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Nov 12, 2011 7:44:41 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 2901 ms Nov 12, 2011 7:44:42 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Nov 12, 2011 7:44:42 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.33 Nov 12, 2011 7:44:42 AM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Nov 12, 2011 7:44:42 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive HighPoint-0.1.war Nov 12, 2011 7:44:43 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Nov 12, 2011 7:44:43 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/HighPoint-0.1] startup failed due to previous errors Nov 12, 2011 7:44:43 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive Test-0.1.war Nov 12, 2011 7:45:00 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive Test2-0.1.war Nov 12, 2011 7:45:20 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Nov 12, 2011 7:45:20 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Nov 12, 2011 7:45:21 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Nov 12, 2011 7:45:21 AM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Nov 12, 2011 7:45:21 AM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/63 config=null Nov 12, 2011 7:45:21 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 39476 ms </code></pre> <p>Any advice would be greatly appreciated.</p> <p>As requested here is the datasource.config:</p> <pre><code>dataSource { pooled = true driverClassName = "org.postgresql.Driver" } hibernate { cache.use_second_level_cache=true cache.use_query_cache=true cache.provider_class = 'net.sf.ehcache.hibernate.EhCacheProvider' } environments { development { dataSource { dbCreate = "create-drop" // one of 'create', 'create-drop','update' url = "jdbc:postgresql:Test" username = "postgres" password = "highpoint" } } test { dataSource { dbCreate = "update" url = "jdbc:postgresql:Test" username = "postgres" password = "highpoint" } } production { dataSource { dbCreate = "create-drop" url = "jdbc:postgresql:Test" username = "postgres" password = "highpoint" } } } </code></pre> <p>Here is the buildconfig file:</p> <pre><code>grails.project.class.dir = "target/classes" grails.project.test.class.dir = "target/test-classes" grails.project.test.reports.dir = "target/test-reports" //grails.project.war.file = "target/${appName}-${appVersion}.war" grails.project.dependency.resolution = { // inherit Grails' default dependencies inherits("global") { // uncomment to disable ehcache // excludes 'ehcache' } log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose' repositories { grailsPlugins() grailsHome() grailsCentral() // uncomment the below to enable remote dependency resolution // from public Maven repositories //mavenLocal() //mavenCentral() //mavenRepo "http://snapshots.repository.codehaus.org" //mavenRepo "http://repository.codehaus.org" //mavenRepo "http://download.java.net/maven/2/" //mavenRepo "http://repository.jboss.com/maven2/" } dependencies { // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg. // runtime 'mysql:mysql-connector-java:5.1.13' } } </code></pre> <p>After making changes to the datasource and config files as suggested by Oliver I get the following result: I do not get the 404 error anymore, but Tomcat now hangs and do not display the website. The error log gives me the following error: </p> <pre><code>Nov 18, 2011 1:03:01 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory docs Nov 18, 2011 1:03:02 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw error java.lang.OutOfMemoryError: PermGen space Nov 18, 2011 1:03:02 PM org.apache.catalina.startup.HostConfig deployDirectory SEVERE: Error deploying web application directory docs java.lang.OutOfMemoryError: PermGen space' </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload