Take the 2-minute tour ×

I get this error on my application when i try to run in "Tomcat", in WEBrick works fine:

SEVERE: Application Error org.jruby.rack.RackInitializationException: wrong # of arguments(0 for 1) from /home/gpereira/apache/apache-tomcat-6.0.18/webapps/vtsbackoffice/WEB-INF/app/controllers/application_controller.rb:5

and in line 5 i have the import :

5  import javax.xml.bind.JAXBContext
6  import javax.xml.bind.Unmarshaller

I am using Rails version 3, jruby 1.5.1, JWSD2.0 installed. O.S. : Ubuntu

I need this because i am connecting: REST API and i have XSD files.

What i was capable to find:

If i try to put other class for example "javaxii.kkk", it gives me not found. When i put that import and remove jar files from my app lib it still get me the error!!!! So he find something that i don't want...

I try to install JWSDP2.0 in TOMCAT, but it seems that don't work either. same error...

so i am desperate to find something that first loads me jar and after this add tomcat class...

Thank you for your help.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The problem was that in my config/environment.rb

I was writing

load RAILS_ROOT + "/lib/mypack.jar" 

and i change to this :

load "#{RAILS_ROOT}/lib/mypack.jar" 

and now it works in tomcat/jboss/weblogic/webrick...

I don't get why he give me errors on imports instead on environment.rb, but what is important is that now it works just fine.

share|improve this answer
add comment

Your Answer


