|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Newbie executing app after deployed in TomcatHi you all,
I have installed jruby 1.1.2. I've made a simple application (copied from [1]), and this application works fine with Mongrel. Problems have come when trying to execute it in Tomcat. I have installed Warbler. I have generated the war and copied in tomcat/webapps (such as explained in [2]) When starting Tomcat, the deployment works correctly (without apparent mistakes). But when going to localhost:8080/myapp/posts, I have: "Application initialization failed: null " In logs I have something like: 29-may-2008 17:18:29 org.apache.catalina.core.ApplicationContext log GRAVE: Exception caught java.lang.NullPointerException at org.jruby.runtime.load.LoadService.findFile(LoadService.java:466) at org.jruby.runtime.load.LoadService.findLibrary(LoadService.java:391) at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:258) at org.jruby.runtime.load.LoadService.require(LoadService.java:346) at org.jruby.Ruby.initBuiltins(Ruby.java:1158) at org.jruby.Ruby.init(Ruby.java:843) at org.jruby.Ruby.newInstance(Ruby.java:158) at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:85) at org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:79) 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) Am i doing something wrong? I mean, do you have any clue about it? [1] http://blog.emptyway.com/2008/04/08/120-seconds-guide-to-jruby-on-rails/ [2] http://wiki.jruby.org/wiki/Jruby_on_Rails_on_Tomcat (the Rails 2.0 section) |
|
|
Re: Newbie executing app after deployed in TomcatI am experiencing the exact same problems (same exception on the same line numbers) and don't know where to begin, b/c the exception is so vague. It would be helpful if more descriptive error messages were provided by JRuby-Rack. Any help would be greatly appreciated.
|
|
|
Re: Newbie executing app after deployed in TomcatHi ,
That's about the same for me... Things works fine with JRuby 1.1 + Warbler 0.9.5, so I'm using this combination for now when deploying on Tomcat. Kana >> Hi you all, >> >> I have installed jruby 1.1.2. I've made a simple application (copied from >> [1]), and this application works fine with Mongrel. >> >> Problems have come when trying to execute it in Tomcat. I have installed >> Warbler. I have generated the war and copied in tomcat/webapps (such as >> explained in [2]) >> When starting Tomcat, the deployment works correctly (without apparent >> mistakes). But when going to localhost:8080/myapp/posts, I have: >> "Application initialization failed: null " >> >> In logs I have something like: >> 29-may-2008 17:18:29 org.apache.catalina.core.ApplicationContext log >> GRAVE: Exception caught >> java.lang.NullPointerException >> at org.jruby.runtime.load.LoadService.findFile(LoadService.java:466) >> at org.jruby.runtime.load.LoadService.findLibrary(LoadService.java:391) >> at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:258) >> at org.jruby.runtime.load.LoadService.require(LoadService.java:346) >> at org.jruby.Ruby.initBuiltins(Ruby.java:1158) >> at org.jruby.Ruby.init(Ruby.java:843) >> at org.jruby.Ruby.newInstance(Ruby.java:158) >> at >> org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:85) >> at >> org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:79) >> 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) >> >> Am i doing something wrong? I mean, do you have any clue about it? >> >> [1] >> http://blog.emptyway.com/2008/04/08/120-seconds-guide-to-jruby-on-rails/ >> [2] http://wiki.jruby.org/wiki/Jruby_on_Rails_on_Tomcat (the Rails 2.0 >> section) >> >> >> > > -- > View this message in context: > http://www.nabble.com/Newbie-executing-app-after-deployed-in-Tomcat-tp17541412p17543167.html > Sent from the JRuby - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Newbie executing app after deployed in TomcatBut this is quite dissapointing. I mean, now is the environment setting but, which are the probability that some other error appears when developing my app? I mean, I' m starting to see Jruby very unstable, and documentation is quite poor out there. I've been trying some conf settings such as in [1] or [2], but all is a bit of a mess, I mean, I dunno want to spend my time googling here and there every time I have an error in Jruby :(.
I will give a try right now to see if with your combination works. Thanks. [1] http://edgibbs.com/2007/05/25/deploying-rails-to-tomcat-as-a-war-with-jruby/ [2] http://blog.nicksieger.com/articles/2007/09/04/warbler-a-little-birdie-to-introduce-your-rails-app-to-java
|
|
|
Re: Newbie executing app after deployed in TomcatHi,
On Fri, May 30, 2008 at 3:13 PM, Damaris <dfl_maradentro@...> wrote: > > But this is quite dissapointing. Work with us, and once the problem is identified, it *will* be fixed. > I mean, now is the environment setting but, > which are the probability that some other error appears when developing my > app? I mean, I' m starting to see Jruby very unstable, and documentation is > quite poor out there. I've never deployed a rails app to Tomcat until today too. And followed the wiki page, and in a couple of minutes, everything was working just fine, deployed on Tomcat. The only info sources I used, is the wiki pages. They actually are quite good and helpful. If you found some problems that are not reflected there, feel free to improve. That's the whole point, everybody helping out a bit. > I've been trying some conf settings such as in [1] or > [2], but all is a bit of a mess, I mean, I dunno want to spend my time > googling here and there every time I have an error in Jruby :(. Theese look like very old entries to me, they would probably add more confusion then help. > I will give a try right now to see if with your combination works. > Thanks. The latest Warbler comes with JRuby 1.1.1, and at that line mentioned in your first email with stacktrace, I see: if (current.getJarEntry(canonicalEntry) != null) { My IDE helpfully notes that there is a chance of NullPointerException for 'current' there! :) And, apparently, you're hitting it. But I can't reproduce it so far, following the same documentations as you do. We need to figure out what's going on there or how to reproduce it reliable, and then the fix will be simple. Btw, what platform do you use? Thanks, --Vladimir --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Newbie executing app after deployed in TomcatHi
The wiki pages have not been helpful for me so far. My Jruby version is 1.1.2, I went to the code where the error apparently appears, but it was a catch(Exception e){}, so reading the code was not helpful either. I'm running on Windows XP. btw, I've installed warbler 0.9.5. and the problem now is that, after deploying and starting Tomcat, a servlet exception appears telling Rails could not be found. I've tried with jruby 1.1 too. I've checked also my jar files, I have copied them in every place I could, under WEB-inf/lib, under tomcat/common/lib, under jruby-xx/lib... Sorry if I'm just complaining :S, but I'm just getting a little bit desperate as time passes :) Thanks for your patience.
|
|
|
Re: Newbie executing app after deployed in TomcatHi,
On Fri, May 30, 2008 at 4:42 PM, Damaris <dfl_maradentro@...> wrote: > The wiki pages have not been helpful for me so far. My Jruby version is > 1.1.2, I went to the code where the error apparently appears, but it was a > catch(Exception e){}, so reading the code was not helpful either. My understanding is that warbler comes with pre-built version of JRuby, and at the moment that version is 1.1.1. If you look at 1.1.1 sources, you'll see the line that fails (I copy-pasted it in my previous email). Nick would know more but he and the gang enjoying the Rubyconf at the moment! :) > I'm running on Windows XP. OK, that's one difference. I use Linux. Will try on Windows. > btw, I've installed warbler 0.9.5. and the problem now is that, after > deploying and starting Tomcat, a servlet exception appears telling Rails > could not be found. I've tried with jruby 1.1 too. That's what I had to adjust in warble.rb file so that my gems are picked up: config.gems = ["activerecord-jdbc-adapter", "jruby-openssl", "rails", "activerecord-jdbcmysql-adapter"] After that, everything went by the book (by the wiki page). > Sorry if I'm just complaining :S, but I'm just getting a little bit > desperate as time passes :) > > Thanks for your patience. And we're getting there! :) If you could debug on your side, and see on which entry that findFile() method chockes, we'd have more info to play with. Meanwhile, I'll try to reproduce on Windows here. Thanks, --Vladimir --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Newbie executing app after deployed in TomcatOn Thu, May 29, 2008 at 10:20 AM, Damaris <dfl_maradentro@...> wrote:
> > Hi you all, > > I have installed jruby 1.1.2. I've made a simple application (copied from > [1]), and this application works fine with Mongrel. > > Problems have come when trying to execute it in Tomcat. I have installed > Warbler. I have generated the war and copied in tomcat/webapps (such as > explained in [2]) > When starting Tomcat, the deployment works correctly (without apparent > mistakes). But when going to localhost:8080/myapp/posts, I have: > "Application initialization failed: null " > > In logs I have something like: > 29-may-2008 17:18:29 org.apache.catalina.core.ApplicationContext log > GRAVE: Exception caught > java.lang.NullPointerException > at org.jruby.runtime.load.LoadService.findFile(LoadService.java:466) > at org.jruby.runtime.load.LoadService.findLibrary(LoadService.java:391) > at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:258) > at org.jruby.runtime.load.LoadService.require(LoadService.java:346) > at org.jruby.Ruby.initBuiltins(Ruby.java:1158) > at org.jruby.Ruby.init(Ruby.java:843) > at org.jruby.Ruby.newInstance(Ruby.java:158) > at org.jruby.javasupport.JavaEmbedUtils.initialize(JavaEmbedUtils.java:85) > at > org.jruby.rack.DefaultRackApplicationFactory.newRuntime(DefaultRackApplicationFactory.java:79) > 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) > > Am i doing something wrong? I mean, do you have any clue about it? It certainly is an unusual error -- I haven't seen it before. Because we're allowing a java stack trace to escape, I'd definitely say it's a JRuby bug. Can you please create an issue in JIRA [1] and provide the version of Tomcat you're using, the complete contents of your server log file? Also, if possible, can you attach the output of "jar tf myapp.war > myapp.txt"? It will help us to track this more effectively than through email. Thanks, /Nick --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Newbie executing app after deployed in TomcatSorry, Nick, there is no [1] reference :S in your post.
|
|
|
Re: Newbie executing app after deployed in TomcatOk, I've got it and I have send the issue with the files.
As for previous posts, yes, I put the config.gems=["rails", ...], but the same.
|
|
|
Re: Newbie executing app after deployed in TomcatBleh. sorry. [1] http://jira.codehaus.org/browse/JRUBY
Thanks. /Nick On Fri, May 30, 2008 at 10:41 AM, Damaris <dfl_maradentro@...> wrote: > > Sorry, Nick, there is no [1] reference :S in your post. > > Nick Sieger-2 wrote: >> >> >> It certainly is an unusual error -- I haven't seen it before. Because >> we're allowing a java stack trace to escape, I'd definitely say it's a >> JRuby bug. >> >> Can you please create an issue in JIRA [1] and provide the version of >> Tomcat you're using, the complete contents of your server log file? >> Also, if possible, can you attach the output of "jar tf myapp.war > >> myapp.txt"? It will help us to track this more effectively than >> through email. >> >> Thanks, >> /Nick >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> >> > > -- > View this message in context: http://www.nabble.com/Newbie-executing-app-after-deployed-in-Tomcat-tp17541412p17564527.html > Sent from the JRuby - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |