I’m developing a JRuby on Rails app using netbeans 6.1. I’m trying to
deploy
to Tomcat 6. I’ve installed warbler as a plugin, and it’s generated my
WAR
file. I copied it to $TOMCAT_HOME/webapps and I can access it in my
browser
at
http://localhost:8084/$YOUR_APP_NAMEhttp://localhost:8080/$YOUR_APP_NAMEjust
fine. However, none of my images show on the page, and after doing
some research on Google, it’s clear that my app needs to run as the root
webapp in Tomcat because of some of the logic used by the rails asset
tags.
This is my first time using Tomcat, so I’m not quite sure how to
configure
Tomcat to make my app run as the root. Googling the topic gave me
several
things to try (e.g. renaming my war as ROOT.war and removing the
existing
ROOT webapp; creating a ROOT.xml file in
$CATALINA_HOME/conf/[enginename]/[hostname]/ with a docBase element
pointing
to my war file), but none of these are working. In each case, I get a
java.lang.OutOfMemoryError. Here’s the stack trace:
Jun 10, 2008 2:25:30 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception caught
org.jruby.rack.RackInitializationException: IO error –
builtin/java/exceptions
from
file:/C:/Users/Myron/.netbeans/6.1/apache-tomcat-6.0.16_base/webapps/ROOT/WEB-INF/lib/jruby-complete-1.1.2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport.rb:47:in
`file:/C:/Users/Myron/.netbeans/6.1/apache-tomcat-6.0.16_base/webapps/ROOT/WEB-INF/lib/jruby-complete-1.1.2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport.rb’
from
file:/C:/Users/Myron/.netbeans/6.1/apache-tomcat-6.0.16_base/webapps/ROOT/WEB-INF/lib/jruby-complete-1.1.2.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/builtin/javasupport.rb:1
at
org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:85)
at
org.jruby.rack.DefaultRackApplicationFactory.createApplication(DefaultRackApplicationFactory.java:144)
at
org.jruby.rack.DefaultRackApplicationFactory.newApplication(DefaultRackApplicationFactory.java:44)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:52)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:92)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jruby.exceptions.RaiseException: IO error –
builtin/java/exceptions
Caused by: java.lang.OutOfMemoryError: Java heap space
Not sure if this helps, but here’s my environment:
Windows Vista
MySQL 5
Netbeans 6.1
Rails 2.1
JRuby 1.1.2
Tomcat 6.0.16
Anyone know how to get this to work?
Thanks,
Myron