Rails3 with jruby war deployment on tomcat. I am able to access MyApp/public/index.html page. Fails to all other view pages

StackOverflow https://stackoverflow.com/questions/15479669

Domanda

I have debug my application thoroughly by using http://guides.rubyonrails.org/initialization.html process. I am able to see all logs which i have keep inside different init files, able to see print message which is there in routes.rb

Whenever i am trying to access any other path defined in routes.rb it fails and showing me same error all the time. I have checked log file also but not getting any useful information to further debug. Following is my log errors

Mar 18, 2013 7:53:39 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet files threw exception javax.servlet.ServletException: Failed to invoke rails, please see the log for more details at org.jruby.webapp.RailsServlet.service(RailsServlet.java:50) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:342) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.jruby.webapp.FileServlet.service(FileServlet.java:207) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 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:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 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:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source)

Edit: I have noticed my rails-3.2.12 gems directory is empty. There is not files inside. Is there any thing to worry about for this ?

È stato utile?

Soluzione

Its being long time, I am able to resolve my problem. It was due incompatibility of rails, jruby versioning problem. I was migrated my application from very older version of rails ie 2.2.3 version of rails.

Finally i did the hack created new application using new rails 3.2.12 and deployed it successfully on tomcat with the help of Warbler. There is another ariticle to help for deployment on tomcat is here.

Another important point is in you tomcat directory don't give any white space in the path. for eg. C:\apache\apache tomcat-7.0.57\ this will make your application fail, instead you can give C:\apache\apache-tomcat-7.0.57. Make sure there is no spaces between the names.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top