For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 8 replies, 2 voices, and was last updated 20 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
fermataintlMemberIn a web project that I have, there is an error indicated in one of the JSP files, which shows up as:
cannot access fi.els.tags.SpacerTag: bad class file : C:\Documents and Settings\Dean\My Documents\EclipseWorkspace\workspace\banfordsports\WebRoot\WEB-INF\classes\fi\els\tags\SpacerTag.classThe tag class has compiled without errors. It is located in the path shown in the jsp error. I deployed to tomcat 5 and
it works.I am using Eclipse SDK 3.1.0, MyEclipse 4.0.3GA Build 20051025, Java JDK 1.5.0_05 on windows XP.
Here’s my tld file (els.tld):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> <taglib> <tlibversion>1.0</tlibversion> <jspversion>1.1</jspversion> <shortname>els</shortname> <tag> <name>spacer</name> <tagclass>fi.els.tags.SpacerTag</tagclass> <attribute> <name>width</name> </attribute> <attribute> <name>height</name> </attribute> </tag> </taglib>the jsp file looks like this (abbreviated):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <%@ page isELIgnored="false" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <%@ taglib uri="/WEB-INF/els.tld" prefix="els" %> ... <td><els:spacer width="220"/></td> ...If the resolution to this problem has been discussed elsewhere, I apologize, I did not find it. Thanks for any help you can provide.
Dean
November 30, 2005 at 9:05 am #242321
Riyad KallaMemberDean,
First try cleaning/rebuilding your project. If that doesn’t work, try restarting MyEclipse and cleaning it. Sometimes the TLD cache will become stale and not update correctly so it’s possible to get erroneous TLD errors while developing a taglib.November 30, 2005 at 9:35 am #242330
fermataintlMemberI did the clean/rebuild, did not work. Restarted and its still there.
Dean
November 30, 2005 at 9:38 am #242332
Riyad KallaMemberIs this project somethign you can share so I can take a look at it and see what might be happening? If so, please export it to a ZIP and email it to support@genuitec.com ATTN Riyad with a link to this forum so I know why I’m getting the file.
November 30, 2005 at 11:28 am #242345
Riyad KallaMemberI got your file, imported it into MyEclipse and noticed a broken dependency on the Common Java project. I removed that, then commented out all references to Text in the Tooltip tag class, after that the project was fine, no errors. I opened the Home.jsp file and got autocomplete with the <els> tag just fine, the file also validates without any problems.
Try creating a new web project, and copying all your resources from your banfordsports project into it into the appropriate locations, does everything work? Validation error go away?
Also try restarting Eclipse using the -clean command line argument.
NOTE: When I Mentioned cleaning your project, you need to make sure that Window > Prefs > General > Workspace > Build automatically is turned on for it to rebuild.
November 30, 2005 at 2:51 pm #242358
fermataintlMemberIf I understand your directions, I did all that and it is still broken. I totally removed the original project. I created a new MyEclipse web project. I went to the folder that I had exported to send to you and dropped in resources (including the dot files). Back to square one.
Dean
November 30, 2005 at 7:04 pm #242370
Riyad KallaMemberI know this is going to turn out to be something silly, I can already tell.
Tell me everything you have in your Java Build Path on your Libraries Tab please.
December 1, 2005 at 9:12 am #242386
fermataintlMemberThis is really strange. I turned off JSP validation at the menu level. The red X went away. Then I turned it back on and it did not come back. How is validation kicked off?
Dean
December 1, 2005 at 9:20 am #242388
Riyad KallaMemberDean,
The clean cycle i had you run through should have removed any stale markers, I guess it didn’t. But doing what you did likely removed the stale marker which was harmless, all should be right with the world again.VAlidation is part of the build cycle.
-
AuthorPosts
