Newby goldspike on JBoss problem

Hi,
I am trying to get a sample Rails app running on JBoss. My Rails app
“test”
has a single controller “sample” with an action “list”.
I’m running NetBeans 6.1 with JRuby 1.1 and Rails 2.0.2.

I generated a standalone war using GoldSpike, and then I copied my
“test.war” to my JBoss deploy directory. This starts up fine, and
“localhost:8080/test” delivers the usual Rails index.html page. However,
“localhost:8080/test/sample/list” shows the 500.html page. If I run this
using WebBrick on port 3000, with urls: “localhost:3000” and
“localhost:3000/sample/list” it works as I expect.

I debugged the java side, and the RailsDispatcher code is definitely
getting called. And the FilesDispatcher works fine.

I read somewhere I had to add a jboss-web.xml. But that didn’t help, and
according to JBoss doc, the root url defaults to the name of the war
file
anyway.

I’ve tried adding a route to routes.rb: map.connect
‘test/sample/:action’,
:controller => ‘sample’
but that didn’t help either.

I also tried setting RAILS_RELATIVE_URL_ROOT = ‘/test/’ in
environment.rb,
also without success.

Can anyone offer me any advice? Is there a way to debug the jruby code
running in the JBoss server?
thanks,
Jonathan O’Connor
XCOM Dublin

*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist
allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole
use
of the intended recipient. Any review, distribution by others or
forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.

Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,

Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer
Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach

Jonathon,

You should not have to change any ruby/rails code to get it running
under JBoss vs under Webrick - at least this is my experience so far.
jboss-web.xml not needed.

What does it show being logged in both the rails log and the jboss log
when you get the 500?

–milt

Milt,
thanks for your quick reply. Just before I was going to send a reply, I
trawled through my server tmp directory, and found the production.log.
Here’s what it said:

RuntimeError (The driver encountered an error: can’t convert nil into
String):

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:307:in
`initialize’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in `new’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in
`jdbc_connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in
`connection=’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in
`retrieve_connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/query_cache.rb:8:in `cache’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/caching.rb:677:in `perform_action_with_caching’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:524:in `process’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/filters.rb:685:in `process_with_filters’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/session_management.rb:123:in
`process_with_session_management_support’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:388:in `process’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:171:in `handle_request’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:115:in `dispatch’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:9:in `dispatch’
:1

Rendering H:/server/webf/tmp/deploy/tmp43039VP-exp.war/public/500.html
(500
Internal Server Error)

It seems I never copied over a JDBC driver. I’ll go and fix that problem
first, and then try again. But it sure would be nice if I could display
this stack trace in my 500.html when Rails hits a problem.

Anyway, I now have something I can fix. Thanks again.
Ciao,
Jonathan O’Connor
XCOM Dublin

         [email protected]

         23.05.2008 12:25 

To
[email protected]
cc
Please respond to
[email protected]
Subject
us.org Re: [jruby-user] Newby goldspike
on
JBoss problem

Jonathon,

You should not have to change any ruby/rails code to get it running
under
JBoss vs under Webrick - at least this is my experience so far.
jboss-web.xml not needed.

What does it show being logged in both the rails log and the jboss log
when
you get the 500?

–milt

Jonathan O’Connor wrote:

  Hi,
  I am trying to get a sample Rails app running on JBoss. My Rails 

app
“test” has a single controller “sample” with an action “list”.
I’m running NetBeans 6.1 with JRuby 1.1 and Rails 2.0.2.

  I generated a standalone war using GoldSpike, and then I copied my
  "test.war" to my JBoss deploy directory. This starts up fine, and
  "localhost:8080/test" delivers the usual Rails index.html page.
  However, "localhost:8080/test/sample/list" shows the 500.html 

page.
If I run this using WebBrick on port 3000, with urls:
“localhost:3000” and “localhost:3000/sample/list” it works as I
expect.

  I debugged the java side, and the RailsDispatcher code is 

definitely
getting called. And the FilesDispatcher works fine.

  I read somewhere I had to add a jboss-web.xml. But that didn't 

help,
and according to JBoss doc, the root url defaults to the name of
the
war file anyway.

  I've tried adding a route to routes.rb: map.connect
  'test/sample/:action', :controller => 'sample'
  but that didn't help either.

  I also tried setting RAILS_RELATIVE_URL_ROOT = '/test/' in
  environment.rb, also without success.

  Can anyone offer me any advice? Is there a way to debug the jruby
  code running in the JBoss server?
  thanks,
  Jonathan O'Connor
  XCOM Dublin



  *** XCOM AG Legal Disclaimer ***

  Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und 

ist
allein für den Gebrauch durch den vorgesehenen Empfaenger
bestimmt.
Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail
untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzueglich
vollstaendig zu loeschen und uns eine Nachricht zukommen zu
lassen.

  This email may contain material that is confidential and for the 

sole
use of the intended recipient. Any review, distribution by others
or
forwarding without express permission is strictly prohibited. If
you
are not the intended recipient, please contact the sender and
delete
all copies.

  Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 

664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154
9209-900,
www.xcom.de
Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach

*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist
allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole
use
of the intended recipient. Any review, distribution by others or
forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.

Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,

Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer
Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach

Hi Jonathan,

Have you set up the production db in database.yml? I think Goldspike
configures the war file for production environment by default.

Erno

Jonathan O’Connor wrote:

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in
`cache’
H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:171:in
(500 Internal Server Error)

–milt
I generated a standalone war using GoldSpike, and then I

        Diese E-Mail einschliesslich ihrer Anhaenge ist
        permission is strictly prohibited. If you are not the
        Vorsitzender des Aufsichtsrates: Stefan H. Tarach 

untersagt. Wir bitten, eine fehlgeleitete E-Mail unverzueglich
www.xcom.de
Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Well herds the status right now. I believe we have resolved all the
bugs that people reported as critical to them, but we’ll review that
list. Otherwise there’s a bit over twenty bugs that we wanted to get
in but probably won’t…just not enough resources at the moment. I
would say let’s get it out as is for RailsConf since there will be a
lot of new users as a result. And it’s been about a month so the
timing is pretty good. And it will give us a good clean release to run
the hackfest against.

Any objections? I would expect we could possibly do another 1.1.x
release in another three to four weeks, which would coincide with the
Ruby Kaigi in Japan. Then we take the summer to hit things hard for
Java integration and ongoing perf work.

  • Charlie

On May 25, 2008, at 19:42, Neville B.
<[email protected]

wrote:

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

That sounds good. I too am depending on a critical bug fix in this new
version.

Will there be a concurrent new version of ActiveRecord-JDBC release as
well?

Peter

Any news on JRuby 1.1.2?

1.1.2 fixes some critical bugs for me, and I read somewhere that we
might see it this week?

Kindly,

Neville


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Planning on it, yes. I also have a couple more bugs and patches I’d
like to process, but at any rate there will be a new one to go with
1.1.2.

/Nick

On Sun, May 25, 2008 at 10:08 PM, Peter K Chan [email protected] wrote:

Sent: Sunday, May 25, 2008 9:02 PM
timing is pretty good. And it will give us a good clean release to run

wrote:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Are you going to tackle http://jira.codehaus.org/browse/JRUBY-2422 as
well?

I posted an analysis of the problem a week ago and it should be easy to
fix:
http://www.nabble.com/Autocommit-error-with-AR-JDBC---solved-td17312245.html

Thx
Chris

Nick S.-2 wrote:

To: [email protected]
the hackfest against.

To unsubscribe from this list, please visit:


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


View this message in context:
http://www.nabble.com/Newby-goldspike-on-JBoss-problem-tp17423619p17467017.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

Erno,
your perspicuity is amazing. Yes, this was the problem. It was
compounded
by my inability to find the production.log file. I eventually found it
inside JBoss’ tmp directory, inside the expanded war. Of course, all
this
could have been avoided if Rails had produced a page with the stack
trace
and exception, instead of the 500.html page. I know it does this for
normal
problems, but I guess this was due to a startup problem.

For other newbies out there, this problem is JEE container unspecific
(although it might be easier to find the rails log files using different
containers).
Ciao,
Jonathan O’Connor
XCOM Dublin

         Erno M.
         <Erno.Mononen@sun
         .com> 

To
Sent by: [email protected]
Erno.Mononen@sun.
cc
com
Subject
Re: [jruby-user] Newby goldspike
on
25.05.2008 18:12 JBoss problem

         Please respond to
         [email protected]
              us.org

Hi Jonathan,

Have you set up the production db in database.yml? I think Goldspike
configures the war file for production environment by default.

Erno

Jonathan O’Connor wrote:

Milt,
thanks for your quick reply. Just before I was going to send a reply,
I trawled through my server tmp directory, and found the
production.log. Here’s what it said:

RuntimeError (The driver encountered an error: can’t convert nil into
String):

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:307:in

`initialize’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in

`new’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-jdbc-adapter-0.8
/lib/active_record/connection_adapters/jdbc_adapter.rb:46:in

`jdbc_connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:291:in

`connection=’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:259:in

`retrieve_connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in

`connection’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/activerecord-2.0.2
/lib/active_record/query_cache.rb:8:in

`cache’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/caching.rb:677:in

`perform_action_with_caching’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:524:in

`process’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/filters.rb:685:in

`process_with_filters’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/session_management.rb:123:in

`process_with_session_management_support’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/base.rb:388:in

`process’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:171:in

`handle_request’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:115:in

`dispatch’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:126:in

`dispatch_cgi’

H:/server/webf/./tmp/deploy/tmp43039VP-exp.war/WEB-INF/gems/gems/actionpack-2.0.2
/lib/action_controller/dispatcher.rb:9:in

Anyway, I now have something I can fix. Thanks again.
[email protected]
Subject
jboss-web.xml not needed.
I am trying to get a sample Rails app running on JBoss. My
“localhost:3000” and “localhost:3000/sample/list” it works
as I expect.

        I debugged the java side, and the RailsDispatcher code is
        definitely getting called. And the FilesDispatcher works

fine.

        environment.rb, also without success.

        distribution by others or forwarding without express
        Marty, Dr. Rainer Fuchs

Dritten ist das Lesen, Verteilen oder Weiterleiten dieser E-Mail
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,
www.xcom.de
Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist
allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole
use
of the intended recipient. Any review, distribution by others or
forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.

Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,

Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer
Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach

herds! I am thinking tomorrow (Tuesday) may work best for us…We
have one serious regression (JRUBY-2573) and we/I will start running
some real stuff today against trunk to make sure we have no others.
I thought it may be funny to pull the trigger at the hackfest, but I
agree it would be much better to have a new release for the
hackfest/railsconf.

-Tom

On Sun, May 25, 2008 at 9:02 PM, Charles Oliver N.
[email protected] wrote:

Japan. Then we take the summer to hit things hard for Java integration and

might see it this week?


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Jonathan O’Connor wrote:

(although it might be easier to find the rails log files using different
containers).

Maybe you can add a FAQ entry somewhere on wiki.jruby.org. I think
there’s a FAQ there for Rails stuff…don’t remember offhand.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Christian S. wrote:

Are you going to tackle http://jira.codehaus.org/browse/JRUBY-2422 as well?

I posted an analysis of the problem a week ago and it should be easy to fix:
http://www.nabble.com/Autocommit-error-with-AR-JDBC---solved-td17312245.html

This won’t hold up the release of 1.1.2, since it’s an ARJDBC issue, but
we definitely want it fixed in the short term.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Charlie,
this old dog has to learn some new tricks! I guess Wiki’s are more
useful
than searching mailing lists. Running Rails FAQ in Wiki updated.
Ciao,
Jonathan O’Connor
XCOM Dublin

         Charles Oliver
         Nutter
         <charles.nutter@s 

To
un.com> [email protected]
Sent by:
cc
Charles.O.Nutter@
sun.com
Subject
Re: [jruby-user] Newby goldspike
on
JBoss problem
26.05.2008 22:03

         Please respond to
         [email protected]
              us.org

Jonathan O’Connor wrote:

(although it might be easier to find the rails log files using different
containers).

Maybe you can add a FAQ entry somewhere on wiki.jruby.org. I think
there’s a FAQ there for Rails stuff…don’t remember offhand.

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

*** XCOM AG Legal Disclaimer ***

Diese E-Mail einschliesslich ihrer Anhaenge ist vertraulich und ist
allein
für den Gebrauch durch den vorgesehenen Empfaenger bestimmt. Dritten ist
das Lesen, Verteilen oder Weiterleiten dieser E-Mail untersagt. Wir
bitten,
eine fehlgeleitete E-Mail unverzueglich vollstaendig zu loeschen und uns
eine Nachricht zukommen zu lassen.

This email may contain material that is confidential and for the sole
use
of the intended recipient. Any review, distribution by others or
forwarding
without express permission is strictly prohibited. If you are not the
intended recipient, please contact the sender and delete all copies.

Hauptsitz: Bahnstrasse 37, D-47877 Willich, USt-IdNr.: DE 812 885 664
Kommunikation: Telefon +49 2154 9209-70, Telefax +49 2154 9209-900,

Handelsregister: Amtsgericht Krefeld, HRB 10340
Vorstand: Matthias Albrecht, Renate Becker-Grope, Marco Marty, Dr.
Rainer
Fuchs
Vorsitzender des Aufsichtsrates: Stefan H. Tarach