Eclipse: Can not find the tag library descriptor for "http://java.sun.com/jsf/core" using JBoss
Asked Answered
S

2

8

I know this question was asked a lot of times, since I searched for hours for a solution, but it was never answered (or at least not for my situation).

I am using Wildfly 8.0 (ex JBoss), so I understand that I do not need to add jstl jars nor JSF jars since the implementation is already shipped with JBoss.

Now even when telling eclipse to use the Wildfly runtime libraries, I get the above error. I checked and the jboss-jstl-api_1.2_spec-1.0.4.Final.jar is part of the library

How can I get through this? I tried putting downloading jstl jars (from https://jstl.java.net/) and putting them in the lib directory but it is not working.

Copying the jars into "lib" works perfectly when I use Tomcat which doesn't have its jstl implementation. But not with Wildfly (maybe because eclipse ignores the jars I put in the lib directory since Wildfly has its own jars? But then why do I get the error in the first place? I am confused).

Thanks to anyone who could help me with this.

Edit: I forgot to precise that even with these errors on all my JSPs, the project builds and works perfectly on the server. These errors are eclipse specific, it does not recognize the taglibs and displays annoying error messages at taglib declarations and warnings when using these (unknown to eclipse) tags. Plus, I can't use code completion.

Edit: I bypassed the problem, for the moment, by adding standalone myfaces and jstl libraries to the build path. I would like though that eclipse uses the jars available on server side. (For JPA for example I did not need to add the hibernate library to the build path, I simply told eclipse that the JPA implementation si available on server runtime and it worked fine with code completion and everything).

Scrimp answered 18/3, 2014 at 13:50 Comment(2)
In first place, that taglib URI is not from any JSTL taglib. It does not start with java.sun.com/jsp/jstl. Reading the introduction of stackoverflow.com/tags/jstl/info should clear out any confusion about what exactly JSTL isSculptor
Hi BalusC, I read the link of "../tags/jstl/info", I found the page:tomcat.apache.org/download-taglibs.cgi, actually, I reached the tomcat official page before I got here. so I try to download the jstl jar from the tomcat official page. There are 4 jars to be download. Should I download taglibs-standard-impl-1.2.5.jar?Nonresistance
S
9

Alright, to not have to add any additional libraries (that are not needed by the server) here's what I had to do in addition to adding the Wildfly runtime library to the project: Go to Project/Properties/Project Facets/Java Server Faces and chose Library Provided by Target Runtime in the library type (instead of a User Library).

Scrimp answered 22/4, 2014 at 10:32 Comment(1)
I've done it too, but still got the same error (I only one difference, I'm using JBoss 7.1).Agave
A
6

I'm truly disappointed JSF support in eclipse. I'm encountering such caveats all the time.

I'm using JBoss 7.1.1 and even adding JBoss as the Target Runtime of the project didn't help.
The only solution that worked for me, was to define new JSF library inside Eclipse: Window Preferences -> Java -> Build Path -> User Libraries -> click New (pointing to the jsf-impl.jar and jsf-api.jar). And then adding such library to the build path of the project.

It solved all annoying eclipse errors can not find tag library. So it is pretty similar to the @Riccatti first solution.

Btw: answer which I found on the eclipse forum says that this error is usually caused by not existing JSF tag libraries (that are present in jsf-impl.jar) on the classpath.

Agave answered 20/8, 2014 at 10:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.