Tomcat possible way that don't load TOMCAT JAR from JAXB before my Web Application built in JRUBY
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/web开发者_如何学JAVAapps/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.
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.
精彩评论