所以我在 Gemini 运行时下使用 OSGi 中的 JSTL。当我尝试访问我的 servlet 的 url 时,出现以下异常:-
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /WEB-INF/login.jsp (line: 3, column: 66) Unable to read TLD "META-INF/c.tld" from JAR file "file:/D:/OSGi%20Runtime/Gemini/gemini-web/dep/com.springsource.javax.servlet.jsp.jstl-1.2.0.v20110728.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
但是,我已经检查过,我的运行时中已经拥有所有必需的包。我拥有的相关 bundle 是:-
71 ACTIVE javax.servlet_3.0.0.v201103241009
73 ACTIVE javax.el_2.2.0.v201105051105
74 ACTIVE javax.servlet.jsp_2.2.0.v201103241009
75 ACTIVE com.springsource.javax.servlet.jsp.jstl_1.2.0.v20110728
121 ACTIVE com.springsource.org.apache.taglibs.standard_1.1.2.v20110517
有更多的 bundle ,但那些是相关的。所以,我不明白哪里出了问题。
来自Spring Source Repository ,从我下载包的地方,很明显,org.apache.taglibs.standard bundle - Bundle 121,包含 JSTLCoreTLV 类。
所以,不确定这里发生了什么。
这是我正在使用的 JSP header (以防万一,它是相关的):-
<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
我正在使用:-
Servlet 3.0JSP 2.2双子座运行时 2.1JSTL 1.2.0更新:-
下面描述的问题似乎已经解决,现在我没有收到如下所示的任何警告。那是因为,我有 taglibs.standard_1.1.2 - (Bundle 121),它与其他人不兼容。所以,我删除了它,警告消失了。
因此,从这里开始您可以忽略任何内容。但是,上面的问题仍然存在。我仍然收到 JasperException。这可能会进一步提供帮助,因为由于@BalusC 提供的宝贵意见,问题域现在有所减少。
解决后的部分。所以,你可以忽略它:-
此外,我不确定我拥有的 OSGi JSTL 包版本 - Bundle 75 是否与其他包 - javax.el 兼容, taglibs、servlets 等,或不。因为我使用的是 JSTL 1.2.1,但我无法获得 JSTL 1.2.1 的包。我得到的是我使用的包 (JSTL 1.2.0)。为什么这会困扰我是因为当我启动我的应用程序时会出现这些类型的消息:-
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Jan 22, 2013 7:14:05 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
如您所见,上面显示了两个不同的 URL:-
http://java.sun.com/jSTL/corehttp://java.sun.com/jsp/jSTL/core现在,AFAIK 这两个 URL 不属于相同的 JSTL 版本。
那么,这会引发一些问题吗?他们来的原因是什么?我刚刚使用了一个 JSTL bundle。
最佳答案
com.springsource.javax.servlet.jsp.jstl_1.2.0.v20110728
com.springsource.org.apache.taglibs.standard_1.1.2.v20110517
您正在将 JSTL 1.2.0 API+impl 与 JSTL 1.1.2 impl 混合。
这两个 impls 相互冲突,这解释了你所看到的所有问题。
摆脱 1.1.2 实现。
关于java - 无法加载或实例化 TagLibraryValidator 类 : org. apache.taglibs.standard.tlv.JSTLCoreTLV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14459873/
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
我真的很习惯使用Ruby编写以下代码:my_hash={}my_hash['test']=1Java中对应的数据结构是什么? 最佳答案 HashMapmap=newHashMap();map.put("test",1);我假设? 关于java-等价于Java中的RubyHash,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/22737685/
我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)
我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub