SOLUTION: JSP with Taglibs & JBoss: Fixing NoSuchMethodError on TagAttributeInfo

D

Dale

I recently downloaded & installed JBoss 3.2.5, but when I deployed a
jsp with tags in it, I ran into a problem. In the page I had just
normal stuff like <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %> and
<c:forEach... But when the page ran, I got the message:

14:58:35,463 ERROR [Engine] ApplicationDispatcher[/myapp]
Servlet.service()
for servlet jsp threw exception
java.lang.NoSuchMethodError:
javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Lj
ava/lang/String;ZLjava/lang/String;ZZ)V

Actually, I had one machine where it worked perfectly and a second
machine where it failed as above. I was able to find that the
TagAttributeInfo class resides in jsp-api.jar (that comes with the
JBoss install) as well as j2ee.jar, that comes with Sun's j2ee. I
think what was happening was on one machine, it was finding the one
from Sun first, and on the failing machine, it was finding the one
from JBoss first.

I'm not sure how you are "supposed" to correct this problem, but
here's how I did it.

I went to the "good" machine that had a new copy of java on it, and
found
j2ee.jar that's dated September of 2004 (You might need to go to the
the
java site on sun.com and download the whole j2ee server to get that
file).
Anyway, I took that file, renamed it to j2ee.zip and unzipped it to a
scratch directory. I then proceeded to delete everything except the
contents of the javax/servlet path. Earlier, I had found that using
the
entire j2ee.jar file caused JBoss to fail. Finally, I navigated to the
scratch
directory and re-jared just what I needed (ran the command "jar -cvf0
newJsp.jar javax"). Finally I added an environment variable
"jboss_classpath" to my system and set it's value to
"c:\myClasspath\newJsp.jar".

Now JBoss starts without error, and the page runs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top