I am using JRuby and I have to deploy on Tomcat. My web app is working
fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat
I get "We're sorry, but something went wrong on Tomcat".
The problem is that production.log only shows:
# Logfile created on Mon Oct 12 12:54:36 +0100 2009-bash-3.00
The file permission and directory are 777.
Any idea how I can understand what is the problem.
I am using JRuby and I have to deploy on Tomcat. My web app is working
fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat
I get "We're sorry, but something went wrong on Tomcat".
? literally, it says "went wrong on Tomcat"??? That's, erm, strange.
Any idea how I can understand what is the problem.
Sorry, not litterally, it is the tipical Rails error, but it happens
on Tomcat, we Rails deployed as WAR. There is nothing in Rails logs,
nothing in tomcat log too! I have Tomcat on my PC and I get the same
error. But Tomcat in my PC is running stand alone not as development
server, I have not idea on how to use Tomcat as server.
I created a super simple Rails app with generate scaffolding, one
table with one column. On tomcat on my Win PC the app is working. On
Tomcat on Solaris not. My web.xml is this:
Copied the WAR in Tomcat on my PC and and it worked, on Solaris not.
The database (on MySql) as GRANT ALL *.* for 'root'@'%' it should not
be a problem.
The log of Tomcat:
-bash-3.00$ tail /opt/tomcat/logs/catalina.2009-10-13.log
13-Oct-2009 16:57:30 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive test.war
13-Oct-2009 16:58:10 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
13-Oct-2009 16:58:11 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
13-Oct-2009 16:58:11 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/80 config=null
13-Oct-2009 16:58:11 org.apache.catalina.startup.Catalina start
INFO: Server startup in 42982 ms
The log of production.log is empty but has 777 permission. I have zero
information to figure out what is going on!!!
13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig
deployDescriptor
SEVERE: Error deploying configuration descriptor ROOT.xml
org.xml.sax.SAXParseException: The element type "Context" must be
terminated by the matching end-tag "</Context>".
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse
(AbstractSAXParser.java:1269)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1628)
at org.apache.catalina.startup.HostConfig.deployDescriptor
(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig.deployDescriptors
(HostConfig.java:556)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
491)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
at org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:314)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
443)
at org.apache.catalina.core.StandardService.start
(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:
710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
13-Oct-2009 18:00:12 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive test.war
13-Oct-2009 18:00:53 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
13-Oct-2009 18:00:53 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
13-Oct-2009 18:00:54 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/87 config=null
13-Oct-2009 18:00:54 org.apache.catalina.startup.Catalina start
INFO: Server startup in 43672 ms
I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml
error is gone. But I still have "We're sorry, but something went
wrong." I changed web.xml to development, but I cannot see any log. I
must be a severe error. I have the MySql connector in tomcat/lib
directory. I might be that the web app is not able to connect to
MySql, which is in another server.
I cannot see any error in catalina.2009-10-13.log, so the ROOT.xml
error is gone. But I still have "We're sorry, but something went
wrong." I changed web.xml to development, but I cannot see any log.
Did you restart Tomcat after changing to development mode?
must be a severe error. I have the MySql connector in tomcat/lib
directory. I might be that the web app is not able to connect to
MySql, which is in another server.
So make sure your database.yml entries for both development and
production are correct, and you can connect to the DB manually from
the command line using that info.
The problem is that form that server I cannot connect to the MSql
server, so the error is, no DB connection. Ii there a way to test the
DB connection of a Rails application?