Jruby 1.6, Websphere 6 and warble

Hello,
I’m hoping someone out there has seen this issue before. I saw a lot of
issues out there that seem like they are the same but I’ve tried all the
solutions and nothing worked. Hopefully someone might have ran across
this.
I’ve been trying to deploy a war to websphere on windows and/or AIX.
I’ve
tried every suggestion out in the google world but nothing world. I
tried
changing the web.xml about a hundred ways from Sunday and even freezing
the
gems and a whole slew of different variable settings on websphere.
Everything seems to deploy just fine, but when I go hit the actual
server I
get exceptions. I am testing deployments with engines, but I don’t see
anything in the exceptions that seem to point to the problem being
related
to engines. The current form of my config/web.xml.erb file looks like
this:

<% webxml.context_params.each do |k,v| %> <%= k %> <%= v %> <% end %> files.default rails The files servlet should forward to the rails servlet if no file could be found <%= webxml.servlet_context_listener %> Rails org.jruby.rack.RackServlet Rails /* <% if webxml.jndi then webxml.jndi.each do |jndi| %> <%= jndi %> javax.sql.DataSource Container <% end; end %>

This is generating the correct web.xml file as expected. The exception
I’m
getting is:

[3/9/09 18:10:53:332 CDT] 00000023 ServletWrappe I SRVE0242I:
[my_app_war]
[/my_app] [Rails]: Initialization successful.
[3/9/09 18:10:56:442 CDT] 00000023 WebApp A SRVE0181I:
[my_app_war#my_app.war] [/my_app] [Servlet.LOG]: Exception caught:
org.jruby.rack.RackInitializationException
from file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-complete-1.1.6
from file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-complete-1.1.6
from C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/activesupport/lib
from C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/activesupport/lib
from C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/activesupport/lib
from C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/activesupport/lib
from C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/plugins/my_app_a
from C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/plugins/my_app_a
… 9 levels…
from file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-rack-0.9.3.jar
from file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-rack-0.9.3.jar
from :3

    at

org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:97)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackServlet.service(RackServlet.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
Caused by: org.jruby.exceptions.RaiseException: library `rbconfig’ could
not
be loaded: java.lang.NullPointerException
at (unknown).initialize(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/j
at Kernel.require(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-c
at (unknown).(unknown)(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jr
at (unknown).(unknown)(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jr
at Kernel.require(C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/acti
at (unknown).(unknown)(C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails
at Kernel.require(C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/acti
at (unknown).(unknown)(C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails
at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/
at (unknown).(unknown)(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/ve
at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/
at (unknown).(unknown)(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/ve
at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/
at (unknown).(unknown)(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/ve
at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/environmen
at (unknown).(unknown)(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/envir
at Kernel.load(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-rack
at
JRuby::Rack::RailsServletHelper.load_environment(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/
at #Class:01x20f820f8.new(:3)
at (unknown).(unknown)(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jr
at Kernel.instance_eval(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/j
at Kernel.instance_eval(file:/C:/Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/j
at Rack::Builder.initialize(:3)
at (unknown).(unknown)(:1)

[3/9/09 18:44:07:092 CDT] 00000013 SessionListen I SessionListener
sessionDestroyed(HttpSessionEvent event) session with session
ID=jV22mnSP01nhy2GObc4cwM9getting destroyed
[3/9/09 18:44:07:358 CDT] 00000013 ArchiveDeploy W ADMA0142W: Trying
to
close the archive that is already closed.

Any help would be greatly appreciated.


View this message in context:
http://www.nabble.com/Jruby-1.6%2C-Websphere-6-and-warble.-tp22437062p22437062.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

On Tue, Mar 10, 2009 at 4:43 PM, Mercedes6s [email protected]
wrote:

get exceptions. I am testing deployments with engines, but I don’t see
<%= v %>

<%= jndi %>

   from C:\Program

Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/plugins/my_app_a
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
Caused by: org.jruby.exceptions.RaiseException: library `rbconfig’ could not
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/acti
at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/envir
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/j
Any help would be greatly appreciated.
There’s some Ruby/Rails environment initialization error that’s
somehow getting masked. Do you see anything earlier in your log file?
In the most recent version of warbler, the error is suppposed to be
captured and displayed when you try to request a page in the
application. Do you see anything that way?

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Nope, everything before this point looked very normal. Always giving
false
hope. There were no exceptions in any logs and there were no problems
buidling the war or even deploying it. Just when actually hitting the
server.

Nick S.-2 wrote:

 I’ve
to engines. Â The current form of my config/web.xml.erb file looks like


  <%= jndi %>

    from file:/C:/Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/plugins/my_app_a
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
    at (unknown).(unknown)(file:/C:/Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/vendor/
    at Kernel.require(C:\Program
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jr
[3/9/09 18:44:07:358 CDT] 00000013 ArchiveDeploy W Â ADMA0142W: Trying to

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


View this message in context:
http://www.nabble.com/Jruby-1.6%2C-Websphere-6-and-warble.-tp22437062p22439449.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

Ok, got it to work. Finally. That error about fileServingEnabled=false
was
bogus. It still shows up. It’s some bug that’s fixed in a later
version of
websphere. I did a complete cleanup/paranoid walk through of the
project
and here is what I found/did:

  1. Added the public directory to the directories that were being
    included by
    warbler
  2. Made sure there were no spaces in the directory the app was being
    installed in.
  3. Went over the gems being used by the app at any point and included
    all of
    them even if they were in code that was not currently being used by the
    app.

There were many other trial and error paths, but these were finally what
did
it. Also, here are the warbler.rb file and web.xml.erb files that ended
up
in config directory.

warbler.rb


Warbler::Config.new do |config|
config.dirs = %w(app config lib log vendor tmp public)
config.java_libs += FileList[“lib/java/*.jar”]
config.gems +=
[“jruby-openssl”,“hoe”,“parseexcel”,“prawn”,“trollop”,“activerecord-oracle-adapter”,“fastercsv”,“activerecord-jdbc-adapter”]
config.gems[“rails”] = “2.1.0”
config.gem_dependencies = true
config.webxml.rails.env = ‘staging’
config.webxml.booter = :rails
end


web.xml.erb


<% webxml.context_params.each do |k,v| %> <%= k %> <%= v %> <% end %> <%= webxml.servlet_context_listener %> Rails org.jruby.rack.RackServlet Rails /* <% if webxml.jndi then webxml.jndi.each do |jndi| %> <%= jndi %> javax.sql.DataSource Container <% end; end %> _______________________________________________________________________________


View this message in context:
http://www.nabble.com/Jruby-1.6%2C-Websphere-6-and-warble.-tp22437062p22460420.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

Just an added bonus, the line right before this exception was

Mercedes6s wrote:

issues out there that seem like they are the same but I’ve tried all the
server I
<% webxml.context_params.each do |k,v| %>
file could be found
 /*

[my_app_war#my_app.war] [/my_app] [Servlet.LOG]: Exception caught:
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/vendor/rails/activesupport/lib
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/jruby-rack-0.9.3.jar
    at org.jruby.rack.RackServlet.service(RackServlet.java:42)
    at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/leapoc033Node01Cell/my_app_war.ear/my_app.war/WEB-INF/lib/j
    at Kernel.require(C:\Program
Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\leapoc033Node01Cell\my_app_war.ear\my_app.war\WEB-INF/config/…/ve
    at
    at (unknown).(unknown)(:1)

http://xircles.codehaus.org/manage_email


View this message in context:
http://www.nabble.com/Jruby-1.6%2C-Websphere-6-and-warble.-tp22437062p22440105.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

Mercedes6s wrote:

Ok, got it to work. Finally. That error about fileServingEnabled=false was
bogus. It still shows up. It’s some bug that’s fixed in a later version of
websphere. I did a complete cleanup/paranoid walk through of the project
and here is what I found/did:

Well, it definitely seems like we’re masking some error that should have
helped you. Hopefully we can find a way to improve that error reporting
in Warbler.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email