在我的 Web 应用程序在 JRUBY 中构建之前,Tomcat 可能不会从 JAXB 加载 TOMCAT JAR
当我尝试在“Tomcat”中运行时,我的应用程序出现此错误,在 WEBrick 中工作正常:
严重:应用程序错误 org.jruby.rack.RackInitializationException:参数数量错误(0 为 1) 来自/home/gpereira/apache/apache-tomcat-6.0.18/webapps/vtsbackoffice/WEB-INF/app/controllers/application_controller.rb:5
并在第 5 行我有导入:
5 import javax.xml.bind.JAXBContext
6 import javax.xml.bind.Unmarshaller
我正在使用 Rails 版本 3,jruby 1.5.1、安装JWSD2.0。操作系统:Ubuntu
我需要这个,因为我正在连接:REST API 并且我有 XSD 文件。
我能够找到什么:
如果我尝试放置其他类,例如“javaxii.kkk”,它会让我找不到。当我从我的应用程序库中导入并删除 jar 文件时,它仍然给我带来错误!!!!所以他发现了一些我不想要的东西...
我尝试在TOMCAT中安装JWSDP2.0,但似乎也不起作用。同样的错误...
所以我迫切希望找到一些首先加载我的 jar 的东西,然后添加 tomcat 类...
谢谢您的帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是在我的 config/environment.rb 中
我正在编写
并更改为:
现在它可以在 tomcat/jboss/weblogic/webrick 中工作...
我不明白为什么他在导入上给我错误而不是在环境上.rb,但重要的是现在它工作得很好。
The problem was that in my config/environment.rb
I was writing
and i change to this :
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.