Ran warble executable war, it can't find a lib

I ran:

warble executable war

And then:

java -jar myproj.jar

And when I hit localhost:8080 I see:

Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file
to
load – lib/mongo-2.7.3

I looked in my warble.rb file, and there are allot of settings/configs
there. Do I have to do something to tell it to grab the jars from
somewhere?

The only change I made (uncommented the section) was to make it use ruby
1.9:

config.webxml.jruby.compat.version = “1.9”

I’m using RVM locally in case that matters.

Ok it seems to be this line of code:

require ‘java’
require ‘lib/mongo-2.7.3’

That I have in my lib:

/lib/app_name/mongo_service.rb

On my server, I see the mongo-2.7.3.jar in:

/WEB-INF/lib

Why does it work with Trinidad, but when using either the executable war
(locally) or in tomcat it throws this error?

Really stuck here, hoping someone can help out…

Much apprecitiated!

What is the full path to the executable war file? Eventually it contains
illegal characters for the URLClassLoader, then loading jar inside other
jars(or wars) fails.

Greetings
Waldemar Dick

Hi,

On 28.03.2012 17:20, S Ahmed wrote:

Not sure I follow you, you mean where is the actual .war file that I am
executing via

java -jar myapp.war

?

/Users/me/dev/myapp/myappweb/myapp.war

Yes, that is what I meant. JRuby’s class loader fails to load jars, if
the war-File, or the the path to it, cannot be represented as a legal
URL. For example myapp##1.war will fails to load, because # is special
character in URLs.

I was going to file a bug report, but then I forgot again, until you
reminded me.

Waldemar Dick

Ok so my situation doesn’t seem to be related to that right?

Not sure I follow you, you mean where is the actual .war file that I am
executing via

java -jar myapp.war

?

/Users/me/dev/myapp/myappweb/myapp.war

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs