Monday March 09, 2009
TOTD # 72: JRuby and GlassFish Integration Test #3: JRuby 1.2.0 RC2 + Rails 2.2.x + GlassFish v3
TOTD
#70 and #71
shows the first two integration tests that I typically run to ensure
that the
latest JRuby and GlassFish versions work nicely with each other.
#70
showed how to create a trivial Rails application and run it using GlassFish
Gem. #71
showed how the same application can be deployed on GlassFish
v3 Prelude.
The third test (explained in this blog) ensures that the
same
application can be easily deployed using GlassFish
v3. GlassFish v3 will be available later this year with full
support for Java EE 6.
JRuby 1.2.0 RC2 is now released. Test
#1 passed, Test
#2 gives the following error:
| Caused by: java.lang.NumberFormatException: For input
string: "0RC2" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:456) at java.lang.Integer.parseInt(Integer.java:497) at com.sun.grizzly.jruby.RailsAdapter$JRubyVersion.<init>(RailsAdapter.java:137) at com.sun.grizzly.jruby.RailsAdapter$JRubyVersion.<init>(RailsAdapter.java:131) at com.sun.grizzly.jruby.RailsAdapter.<init>(RailsAdapter.java:110) at com.sun.grizzly.jruby.RubyRuntime.<init>(RubyRuntime.java:48) ... 22 more |

| ~/tools/glassfish/v3/b39/glassfishv3/glassfish
>./bin/asadmin
start-domain Name of the domain started: [domain1] and its location: [/Users/arungupta/tools/glassfish/v3/b39/glassfishv3/glassfish/domains/domain1]. Admin port for the domain: [4848]. |
| ~/tools/glassfish/v3/b39/glassfishv3/glassfish
>./bin/asadmin
create-jvm-options -DJRUBY_HOME="/Users/arungupta/tools/jruby-1.2.0RC2" created 1 option(s) Command create-jvm-options executed successfully. |
| ~/tools/jruby-1.2.0RC1/samples/rails >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin
deploy runner Command deploy executed successfully. |
| ActionController::RoutingError (No route matches
"s" with {:method=>:get}): /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/recognition_optimisation.rb:66:in `recognize_path' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:386:in `recognize' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:182:in `handle_request' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi' /Users/arungupta/tools/jruby-1.2.0RC1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch' file:/Users/arungupta/tools/glassfish/v3/b39/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:82:in `serve_rails' file:/Users/arungupta/tools/glassfish/v3/b39/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/adapter/rails.rb:109:in `call' file:/Users/arungupta/tools/glassfish/v3/b39/glassfishv3/glassfish/modules/grizzly-jruby.jar!/jruby/rack/rails.rb:81:in `call' file:/Users/arungupta/tools/glassfish/v3/b39/glassfishv3/glassfish/modules/grizzly-jruby.jar!/rack/handler/grizzly.rb:55:in `call' :1 |
| ~/tools/jruby-1.2.0RC1/samples/rails >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin
deploy --contextroot runlog --force=true runner Command deploy executed successfully. |
| ~/tools/jruby-1.2.0RC2/samples/rails >~/tools/glassfish/v3/b39/glassfishv3/bin/asadmin
deploy runlog Command deploy executed successfully. |

Posted by Arun Gupta in web2.0 | Comments[5]
|
|
|
|
|
Today's Page Hits: 3074
Total # blog entries: 1002
Posted by Arun Gupta's Blog on March 11, 2009 at 01:22 PM PDT #
Posted by Arun Gupta's Blog on March 16, 2009 at 11:49 AM PDT #
Posted by Arun Gupta's Blog on March 16, 2009 at 11:53 AM PDT #
Hi Arun Gupta,
I've a problem with deployment jruby rails inside the glassfish :
C:\work\jrubyonrails>C:\program\glassfishv3-prelude\bin\asadmin.bat deploy hello
remote failure: Module type not recognized
Command deploy failed.
C:\work\jrubyonrails>_
When i saw at the server.log files said that :
[#|2009-04-14T14:29:23.875+0800|FINE|glassfish|javax.enterprise.system.util|_ThreadID=17;_ThreadName=Thread-3;ClassName=null;MethodName=null;C:\program\glassfishv3-prelude\glassfish\domains\beepcast\applications\hello;|UTIL6049: Attempt to delete C:\program\glassfishv3-prelude\glassfish\domains\beepcast\applications\hello failed; the file is reported as non-existent|#]
[#|2009-04-14T14:29:23.890+0800|FINE|glassfish|javax.enterprise.system.util|_ThreadID=17;_ThreadName=Thread-3;ClassName=null;MethodName=null;|No local string for deploy.unknownmoduletpe|#]
[#|2009-04-14T14:29:23.890+0800|SEVERE|glassfish|javax.enterprise.system.core|_ThreadID=17;_ThreadName=Thread-3;|Module type not recognized|#]
Any idea why it can happen for "Module type not recognized" ? I've used the latest version of :
- jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996) [x86-java]
- GlassFish v3 Prelude (build b28c)
Posted by Benny Iskandar on April 13, 2009 at 11:37 PM PDT #
Benny,
Did you follow the instructions as explained at: http://blogs.sun.com/arungupta/entry/totd_71_jruby_and_glassfish ?
Posted by Arun Gupta on April 16, 2009 at 01:43 PM PDT #