Problem creating war file with warbler

Discussion in 'Ruby' started by Thomas Kellerer, Mar 25, 2008.

  1. Hi,

    we are trying to move from the (deprecated) goldspike rails plugin to the new warbler gem to create a war file from our RoR application, but I cannot get the war file to run.

    Everything seems to be OK, all needed gems (especially ruby-net-ldap) are packaged in the right places.

    Tomcat and the application startup fine, I can access my login screen.
    Authentication is done agains a LDAP server but when my app tries to contact the LDAP server, it throws an error:

    "no such file to load -- net/ldap"

    but the gem is part of the war file and is located in the same place as all the other gems (rails, jdbc-adapter etc)

    I'm using JRuby 1.1RC2 and warbler 0.9.4

    I wouldn't be that confused if it failed to load /any/ gem, but it seems to be limited to the ldap gem as the rails gems and the activerecord-jdbc-adapter are loaded fine (and are working)

    Any ideas? What am I missing here?

    Any help is greatly appreciated

    Thanks in advance
    Thomas
    Thomas Kellerer, Mar 25, 2008
    #1
    1. Advertising

  2. Thomas Kellerer

    Dick Davies Guest

    net/ldap is native code, so you can't run that on jruby yet.
    My guess is you'd need to call out to JNDI if you wanted to talk to
    LDAP on JRuby.

    On Tue, Mar 25, 2008 at 4:04 PM, Thomas Kellerer
    <> wrote:

    > "no such file to load -- net/ldap"


    --
    Rasputnik :: Jack of All Trades - Master of Nuns
    http://number9.hellooperator.net/
    Dick Davies, Mar 25, 2008
    #2
    1. Advertising

  3. Dick Davies, 25.03.2008 17:11:
    > net/ldap is native code, so you can't run that on jruby yet.
    > My guess is you'd need to call out to JNDI if you wanted to talk to
    > LDAP on JRuby.
    >
    > On Tue, Mar 25, 2008 at 4:04 PM, Thomas Kellerer
    > <> wrote:
    >
    >> "no such file to load -- net/ldap"

    >

    jruby-ldap-net is running fine from within NetBeans with JRuby 1.1 and it's running fine when beeing packed with the old goldspike plugin....

    Thomas
    Thomas Kellerer, Mar 25, 2008
    #3
  4. Thomas Kellerer

    Nick Sieger Guest

    On Tue, Mar 25, 2008 at 11:30 AM, Thomas Kellerer
    <> wrote:
    > Dick Davies, 25.03.2008 17:11:
    >
    > > net/ldap is native code, so you can't run that on jruby yet.
    > > My guess is you'd need to call out to JNDI if you wanted to talk to
    > > LDAP on JRuby.
    > >
    > > On Tue, Mar 25, 2008 at 4:04 PM, Thomas Kellerer
    > > <> wrote:
    > >
    > >> "no such file to load -- net/ldap"

    > >

    > jruby-ldap-net is running fine from within NetBeans with JRuby 1.1 and it's running fine when beeing packed with the old goldspike plugin....


    Are you using jruby-ldap or ruby-net-ldap?
    (http://ola-bini.blogspot.com/2007/10/announcing-jrubyldap.html)

    There was a bug w/ gems that had native components that was fixed in
    Warbler 0.9.4. Maybe you could try that.

    /Nick
    Nick Sieger, Mar 25, 2008
    #4
  5. Nick Sieger, 25.03.2008 18:33:
    > On Tue, Mar 25, 2008 at 11:30 AM, Thomas Kellerer
    > <> wrote:
    >> Dick Davies, 25.03.2008 17:11:
    >>
    >>> net/ldap is native code, so you can't run that on jruby yet.
    >> > My guess is you'd need to call out to JNDI if you wanted to talk to
    >> > LDAP on JRuby.
    >> >
    >> > On Tue, Mar 25, 2008 at 4:04 PM, Thomas Kellerer
    >> > <> wrote:
    >> >
    >> >> "no such file to load -- net/ldap"
    >> >

    >> jruby-ldap-net is running fine from within NetBeans with JRuby 1.1 and it's running fine when beeing packed with the old goldspike plugin....

    >
    > Are you using jruby-ldap or ruby-net-ldap?
    > (http://ola-bini.blogspot.com/2007/10/announcing-jrubyldap.html)
    >
    > There was a bug w/ gems that had native components that was fixed in
    > Warbler 0.9.4. Maybe you could try that.
    >
    > /Nick
    >

    Hi Nick, thanks for your answer.

    Sorry for the confusion, I'm using ruby-net-ldap (no J involved here)

    I tried Warbler 0.9.4 and Warbler 0.9.5 none of them worked.

    Thomas
    Thomas Kellerer, Mar 26, 2008
    #5
  6. Thomas Kellerer, 25.03.2008 17:02:
    > Hi,
    >
    > we are trying to move from the (deprecated) goldspike rails plugin to
    > the new warbler gem to create a war file from our RoR application, but I
    > cannot get the war file to run.
    >
    > Everything seems to be OK, all needed gems (especially ruby-net-ldap)
    > are packaged in the right places.
    >
    > Tomcat and the application startup fine, I can access my login screen.
    > Authentication is done agains a LDAP server but when my app tries to
    > contact the LDAP server, it throws an error:
    >
    > "no such file to load -- net/ldap"
    >
    > but the gem is part of the war file and is located in the same place as
    > all the other gems (rails, jdbc-adapter etc)
    >

    Follow-up:

    I found this piece of code on the JRuby Wiki pages to detect all needed gems:

    BUILD_GEMS = %w(warbler rake rcov)
    for gem in Gem.loaded_specs.values
    next if BUILD_GEMS.include?(gem.name)
    config.gems[gem.name] = gem.version.version
    end

    interesting enough this does not include ruby-net-ldap as well.

    So what's so special about this gem?

    (Btw: I have tried using jruby-ldap as well, but that broke our code)

    Thomas
    Thomas Kellerer, Mar 26, 2008
    #6
  7. Thomas Kellerer, 25.03.2008 17:02:
    > we are trying to move from the (deprecated) goldspike rails plugin to
    > the new warbler gem to create a war file from our RoR application, but I
    > cannot get the war file to run.
    >
    > Everything seems to be OK, all needed gems (especially ruby-net-ldap)
    > are packaged in the right places.
    >
    > Tomcat and the application startup fine, I can access my login screen.
    > Authentication is done agains a LDAP server but when my app tries to
    > contact the LDAP server, it throws an error:
    >
    > "no such file to load -- net/ldap"
    >
    > I'm using JRuby 1.1RC2 and warbler 0.9.4
    >

    I was finally able to get this to run:

    I upgraded to JRuby 1.1RC3 (for running "warble") and replaced the jruby-complete-1.1RC2.jar and goldspike-1.5.jar in the Warbler's lib directory with jruby-complete-1.1RC3.jar and goldspike-1.6.jar.

    Now everythings seems to be working fine.

    Thomas
    Thomas Kellerer, Mar 26, 2008
    #7
  8. Thomas Kellerer wrote:
    > Hi Nick, thanks for your answer.
    >
    > Sorry for the confusion, I'm using ruby-net-ldap (no J involved here)
    >
    > I tried Warbler 0.9.4 and Warbler 0.9.5 none of them worked.


    Could you file a bug about this, ideally with a reproducible test case
    or app?

    http://jira.codehaus.org/browse/JRUBY

    It would also help if you could hunt us down on the mailing list or on
    FreeNode IRC in #jruby...we're standing by to help with this sort of thing.

    - Charlie
    Charles Oliver Nutter, Apr 3, 2008
    #8
  9. Thomas Kellerer wrote:
    > I was finally able to get this to run:
    >
    > I upgraded to JRuby 1.1RC3 (for running "warble") and replaced the
    > jruby-complete-1.1RC2.jar and goldspike-1.5.jar in the Warbler's lib
    > directory with jruby-complete-1.1RC3.jar and goldspike-1.6.jar.


    Oops, I saw this too late...glad to hear you got it working :)

    - Charlie
    Charles Oliver Nutter, Apr 3, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Jessel
    Replies:
    2
    Views:
    428
    John C. Bollinger
    Nov 4, 2003
  2. Viv
    Replies:
    2
    Views:
    1,691
  3. Replies:
    3
    Views:
    873
    Wayne
    Sep 27, 2007
  4. Bahaw Anyone

    Problem with warbler

    Bahaw Anyone, Oct 16, 2008, in forum: Ruby
    Replies:
    7
    Views:
    166
    Nick Sieger
    Oct 17, 2008
  5. Laura Schmidt

    problem creating WAR file with ant

    Laura Schmidt, Nov 18, 2012, in forum: Java
    Replies:
    4
    Views:
    473
    Arne Vajhøj
    Nov 19, 2012
Loading...

Share This Page