JRuby on Rails, GlassFish - question about stability

Hello

I thinking currently about choosing technology to thesis. I am
positively interested in combination: JRuby on Rails, GlassFish,
PostgreSQL. But i have a couple o questions.

After installation of NetBeans 6.9.1 ml-ruby and running a simple
project my enthusiasm broke:
SEVERE: library `socket’ could not be loaded: java.lang.LinkageError:
loader (instance of java/net/URLClassLoader): attempted duplicate
class definition for name: “org/jruby/ext/socket/RubySocket”

I tried run also run through GlassFish Gem 1.0.2:
Missing the Rails 2.3.8 gem. Please gem install -v=2.3.8 rails,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION to
use the latest version installed.

Look like WEBrick is working OK:

Generally i would like to know is there anybody who wrote something
advanced in this combination(JRuby, Rails, GlassFish). I am worried
about that if i will be bombed with errors/exceptions i wont write
thesis in time.
I do not want to be in situation where i written 85% functionality and i
suddenly discovers there is a bug who is almost impossible to fix.

Is there anybody who can share about impression with making application
in JRuby on Rails with GlassFish?

PS I apologize for my English. I am not native speaker.
PS2 I work on Netbeans 6.9.1, JRuby 1.5.1, GlassFish Server Open Source
Edition 3.0.1 and PostgreSQL 9.0.1.

On Tue, Oct 19, 2010 at 7:50 AM, Matthias Kowalski
[email protected] wrote:

I thinking currently about choosing technology to thesis. I am
positively interested in combination: JRuby on Rails, GlassFish,
PostgreSQL. But i have a couple o questions.

Is there anybody who can share about impression with making application
in JRuby on Rails with GlassFish?

PS2 I work on Netbeans 6.9.1, JRuby 1.5.1, GlassFish Server Open Source
Edition 3.0.1 and PostgreSQL 9.0.1.

I am currently involved with a large application running JRuby 1.5.1
on GF 3.0 and it is quite stable.

That said, I don’t believe future GF releases (3.1 forward) will support
(at least officially) JRuby, so you may want to consider alternatives
:slight_smile:

HTH,

Hassan S. ------------------------ [email protected]
twitter: @hassan

On Tue, Oct 19, 2010 at 7:50 AM, Matthias Kowalski
[email protected] wrote:

I am currently involved with a large application running JRuby 1.5.1
on GF 3.0 and it is quite stable.

So i guess i’m in chapter: difficult beginnings? After that there will
be much easier?

That said, I don’t believe future GF releases (3.1 forward) will support
(at least officially) JRuby, so you may want to consider alternatives
:slight_smile:
Do you read about that in web or do you suspect that? If you read about
that in web, can you please give me a source?

On Tue, Oct 19, 2010 at 11:40 AM, Matthias Kowalski
[email protected] wrote:

That said, I don’t believe future GF releases (3.1 forward) will support
(at least officially) JRuby, so you may want to consider alternatives
:slight_smile:
Do you read about that in web or do you suspect that? If you read about
that in web, can you please give me a source?

People who’ve installed 3.1 have reported that references to JRuby
have been removed. You might want to ask directly on the GF list to
see if someone from Oracle will officially confirm or deny.


Hassan S. ------------------------ [email protected]
twitter: @hassan

Hello -

I thinking currently about choosing technology to thesis. I am
positively interested in combination: JRuby on Rails, GlassFish,
PostgreSQL. But i have a couple o questions.

After installation of NetBeans 6.9.1 ml-ruby and running a simple
project my enthusiasm broke:
SEVERE: library `socket’ could not be loaded: java.lang.LinkageError:
loader (instance of java/net/URLClassLoader): attempted duplicate
class definition for name: “org/jruby/ext/socket/RubySocket”

This is a problem we have had as well - and it is a problem with Java6
builds above u17. What version of Java6 are you using?

This is a known issue to the jruby guys - it is said to be fixed in
jruby 1.6 branch - but we had to make sure to downgrade java to u17 to
get our apps to work. This is a jruby issue that needs to be fixed. It
has to do with inner classes.

We have a jruby/rails/postgres app via Glassfish 3.0.1 - and works OK
with the above “fix”. But as for Glassfish 3.1 - completely different
story. There doesn’t seem to be any chatter anymore about the status of
that working the way it does in GF 3.0/3.0.1 - since the jruby plugin is
removed and the 3.0.1 plugin blows up in 3.1.

HTH.

Robert W.
Senior Software Developer
EXTENSION Inc.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753
www.OpenTheRedBox.com

That said, I don’t believe future GF releases (3.1 forward) will support
(at least officially) JRuby, so you may want to consider alternatives :slight_smile:

This is actually a sad statement - being that it (GF3) was being touted
as the premiere deployment platform for JRuby apps - and some people
actually planned on this being the case. Now that 3.1 is not working
well with it, it is hurting development of bigger apps (hybrid apps
especially) that were relying on GF being that platform.

I wonder how many will actually move away from Glassfish now because of
this. I know I don’t want to, but being the lack of feedback and
response from the jruby team on this, I am not sure if we can really
rely on this at all.

There was some talk on the GF list about this - but it hasn’t really
gotten too far.

It is kind of confusing actually, since during JavaOne - there were
tweets going back and forth between @jruby and @glassfish that were
talking about how important Glassfish was to the EngineYard folks - but
that seems to have dropped off the map.

I hope to hear more about this before we decide to completely abandon
Glassfish and try to figure out a different route.

Robert W.
Senior Software Developer
EXTENSION Inc.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753
www.OpenTheRedBox.com

Robert W. wrote in post #955759:

This is a problem we have had as well - and it is a problem with Java6
builds above u17. What version of Java6 are you using?
I am using Java6 u22. Thanks for advice.

This is a known issue to the jruby guys - it is said to be fixed in
jruby 1.6 branch - but we had to make sure to downgrade java to u17 to
get our apps to work. This is a jruby issue that needs to be fixed. It
has to do with inner classes.
Well JRuby 1.6 is still in development and it is probably unstable.

Robert W. wrote in post #955783:

I hope to hear more about this before we decide to completely abandon
Glassfish and try to figure out a different route.
Yesterday, I read that JBoss Torquebox is quite good alternative. And
what about Tomcat?

Robert W. wrote in post #955783:

I hope to hear more about this before we decide to completely abandon
Glassfish and try to figure out a different route.
Yesterday, I read that JBoss Torquebox is quite good alternative. And
what about Tomcat?

I had looked into this - but our app is relying on OSGi bundles for
extensions, as well as the built in MQ support and EJB support in
Glassfish is great. Our only big problem now is jruby in this
environment.

I am looking into using warble and deploying into GF as a webapp - I
haven’t worked on this much yet (this is my next path to determine
feasibility) - because I truly do not want to get out of the Glassfish
space.

Robert W.
Senior Software Developer
EXTENSION Inc.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753
www.OpenTheRedBox.com

From what I know, Torquebox is pretty heavyweight, but it might be what
you
are looking for. If you are looking at using Tomcat and you previously
were
using the glassfish-gem then I would recommend checking out Trinidad (
http://calavera.github.com/trinidad/). I think it’s a very simple way
to
get started using Rails on Tomcat.

Joe

From what I know, Torquebox is pretty heavyweight, but it might be what
you are looking for. If you are looking at using Tomcat and you
previously were using the glassfish-gem then I would recommend checking
out Trinidad (http://calavera.github.com/trinidad/). I think it’s a
very simple way to get started using Rails on Tomcat.

It might be if we were a completely ruby/rails app - but we are not. We
are utilizing OSGi and EJB (3.1) as well - and from testing Torquebox
out - didn’t seem to be the way to go.

This is what made/makes Glassfish such a perfect solution…

Robert W.
Senior Software Developer
EXTENSION Inc.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753
OpenTheRedBox.comhttp://OpenTheRedBox.com

On Wed, Oct 20, 2010 at 9:28 AM, Robert W. [email protected]
wrote:

That said, I don’t believe future GF releases (3.1 forward) will support
(at least officially) JRuby, so you may want to consider alternatives :slight_smile:

This is actually a sad statement - being that it (GF3) was being touted as the
premiere deployment platform for JRuby apps - and some people actually planned on
this being the case. Now that 3.1 is not working well with it, it is hurting
development of bigger apps (hybrid apps especially) that were relying on GF being
that platform.

I wonder how many will actually move away from Glassfish now because of this. I
know I don’t want to, but being the lack of feedback and response from the jruby
team on this, I am not sure if we can really rely on this at all.

It’s important to point out that the only component that isn’t in 3.1
is the JRuby-specific deployment container, which allows you to deploy
Ruby applications directly in exploded-directory form.

Using Warbler and deploying applications as a .war file will continue
to work just fine, as the only thing Warbler (and JRuby-Rack) needs to
run is the servlet environment.

/Nick

It’s important to point out that the only component that isn’t in 3.1
is the JRuby-specific deployment container, which allows you to deploy
Ruby applications directly in exploded-directory form.

Using Warbler and deploying applications as a .war file will continue
to work just fine, as the only thing Warbler (and JRuby-Rack) needs to
run is the servlet environment.

Cool - thanks Nick - that is our next plan of attack here. We were using
the exploded deploy because we are also using some EJB/MDB items to load
in scripts that are also a part of our rails app.

If using warbler for our main app is still going to work - this will
help tremendously - will just have to figure out how to re-do the items
that load in the files from the path to do so without it (was basically
getting a current rails app that utilized pollers to do it via java).

Thanks again for the reply.

Robert W.
Senior Software Developer
EXTENSION Inc.
Email: [email protected]
Office: 260-797-0200 x4228
General: 877-207-3753
OpenTheRedBox.comhttp://OpenTheRedBox.com

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