Forum: JRuby Jruby 1.6, Websphere 6 and warble.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mercedes6s (Guest)
on 2009-03-10 17:47
(Received via mailing list)
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:

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<% webxml.context_params.each do |k,v| %>
<context-param>
<param-name><%= k %></param-name>
<param-value><%= v %></param-value>
</context-param>
<% end %>
<context-param>
  <param-name>files.default</param-name>
  <param-value>rails</param-value>
  <description>The files servlet should forward to the rails servlet if
no
file could be found</description>
</context-param>
<listener>
<listener-class><%= webxml.servlet_context_listener %></listener-class>
</listener>
<servlet>
  <servlet-name>Rails</servlet-name>
  <servlet-class>org.jruby.rack.RackServlet</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>Rails</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>
<% if webxml.jndi then webxml.jndi.each do |jndi| %>
    <resource-ref>
    <res-ref-name><%= jndi %></res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
<% end; end %>
</web-app>


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 <script>: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(<script>: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(<script>: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...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Nick S. (Guest)
on 2009-03-10 19:11
(Received via mailing list)
On Tue, Mar 10, 2009 at 4:43 PM, Mercedes6s 
<removed_email_address@domain.invalid>
wrote:
> get exceptions.  I am testing deployments with engines, but I don't see
> <param-value><%= v %></param-value>
> </listener>
>    <res-ref-name><%= jndi %></res-ref-name>
>
>        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
Mercedes6s (Guest)
on 2009-03-10 19:32
(Received via mailing list)
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
>> </context-param>
>> </listener>
>>    <res-ref-name><%= jndi %></res-ref-name>
>>
>>        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...
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 (Guest)
on 2009-03-10 20:03
(Received via mailing list)
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</description>
>>>  <url-pattern>/*</url-pattern>
>>>
>>> [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...
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 (Guest)
on 2009-03-11 19:36
(Received via mailing list)
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
_______________________________________________________________________________
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<% webxml.context_params.each do |k,v| %>
<context-param>
<param-name><%= k %></param-name>
<param-value><%= v %></param-value>
</context-param>
<% end %>
<listener>
<listener-class><%= webxml.servlet_context_listener %></listener-class>
</listener>
<servlet>
  <servlet-name>Rails</servlet-name>
  <servlet-class>org.jruby.rack.RackServlet</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>Rails</servlet-name>
  <url-pattern>/*</url-pattern>
</servlet-mapping>
<% if webxml.jndi then webxml.jndi.each do |jndi| %>
    <resource-ref>
    <res-ref-name><%= jndi %></res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
<% end; end %>
</web-app>
_______________________________________________________________________________




--
View this message in context:
http://www.nabble.com/Jruby-1.6%2C-Websphere-6-and...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Charles Oliver N. (Guest)
on 2009-03-12 19:13
(Received via mailing list)
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
This topic is locked and can not be replied to.