无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV [英] Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV

查看:1317
本文介绍了无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在Gemini运行时的OSGi中使用JSTL。当我尝试访问我的 servlet 的URL时,我得到以下异常: -

So I was working with JSTL in OSGi, under Gemini runtime. And I'm getting following exception, when I try to access the url to my servlet: -

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

但是,我已经检查过,我已经在运行时拥有了所有必需的包。我拥有的相关捆绑包是: -

However, I have checked, that I already have all the necessary bundles in my runtime. The relevant bundle that I have is: -

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

还有更多的捆绑包,但那些是那些相关的。所以,我无法理解出了什么问题。

There are more bundles, but those are the ones that are relevant. So, I can't understand what went wrong.

来自春天源代码库,从我下载软件包的地方,很明显, org.apache.taglibs.standard bundle - Bundle 121 ,包含 JstlCoreTLV类
所以,不确定,这里发生了什么。

From the Spring Source Repository, from where I downloaded the bundle, it's clear that, org.apache.taglibs.standard bundle - Bundle 121, contains that JstlCoreTLV class. So, not sure, what's going on here.

这是我的 JSP 标题我正在使用(以防万一,相关): -

Here's my JSP header I'm using (Just in case, it is relevant): -

<%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>

我正在使用: -


  • Servlet 3.0

  • JSP 2.2

  • Gemini Runtime 2.1

  • JSTL 1.2.0

  • Servlet 3.0
  • JSP 2.2
  • Gemini Runtime 2.1
  • JSTL 1.2.0

更新: -

下面描述的问题似乎已经解决了,现在我没有得到任何警告,如下所示。那是因为我有 taglibs.standard_1.1.2 - ( Bundle 121 ),这与其他人不兼容。所以,我删除了它,警告消失了。

The problem described below seems to be solved, and now I'm not getting any warning as shown below. That was because, I was having the taglibs.standard_1.1.2 - (Bundle 121), which was incompatible to others. So, I removed it, and the warnings went away.

所以,你可以忽略这里的任何内容。但是,上面的问题仍然存在。我仍然得到 JasperException 。可能这将有助于进一步,因为@BalusC的宝贵意见,问题域现在减少了一点。

So, you can ignore whatever is there from here on. But, The problem above is still there. I'm still getting that JasperException. May be this will help further, as the problem domain is reduced now a little bit thanks to the valuable input from @BalusC.

此后的部分解决了。所以,你可以忽略它: -

另外,我不确定我拥有的OSGi JSTL包的版本 - 捆绑75 ,与其他捆绑包兼容 - javax.el taglibs servlets 等等。因为我使用 JSTL 1.2.1 ,但我无法获得 JSTL 1.2.1 的包。我得到的是我使用的包( JSTL 1.2.0 )。为什么这困扰我是因为当我启动我的申请时会出现这些类型的消息: -

Also, I'm not sure that the version of the OSGi JSTL bundle that I have - Bundle 75, is compatible with the other bundles - javax.el, taglibs, servlets, etc, or not. Because I was using JSTL 1.2.1, but I couldn't get the bundle for JSTL 1.2.1. What I got was the bundle I used (JSTL 1.2.0). Why this is bothering me is because of these kinds of messages coming up, when I start my application: -

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

As你可以看到上面显示了两个不同的URL: -

As you can see that there two different URLs shown above: -


  • URI: http://java.sun。 com / jstl / core

  • URI: http://java.sun.com/jsp/jstl/core

  • URI: http://java.sun.com/jstl/core
  • URI: http://java.sun.com/jsp/jstl/core

现在,AFAIK这两个网址都不属于同一个 JSTL 版本。
那么,这会引发一些问题吗?他们来的原因是什么?我刚刚使用了一个 JSTL包

Now, AFAIK both those URLs, do not belong to same JSTL versions. So, could that raise some problems? And what can be the reason for them to come? I have just used one 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混合。

You're mixing JSTL 1.2.0 API+impl with JSTL 1.1.2 impl.

两个冲动相互冲突,解释了你所看到的所有麻烦。

The both impls are conflicting with each other which explains all the trouble you're seeing.

摆脱1.1.2 impl。

Get rid of the 1.1.2 impl.

  • Our JSTL wiki page

这篇关于无法加载或实例化TagLibraryValidator类:org.apache.taglibs.standard.tlv.JstlCoreTLV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆