Question

I had to overwrite a tag from a custom Tag library due to a bug inside. I copy-pasted the complete code of the class (cannot subclass, bug located in private method) in my own custom class, I created my own .tld file with a new shortname property and added the reference in my web.xml file. Then I updated my jsp-pages using the new prefix.

Now I get the following error:

Error failed to locate setter method for attribute class in tag class my.package.MyTableTag

The field it is complaining about is explicitly defined in my custom class, so I don't understand why I get this error.

Any help would be greatly appreciated, if more information is required ask away!

Edit

I examined somewhat further and I think it should have something to do with the tei-class which is defined for the original tag (and my custom copy). But inside this class I cannot find anything that directly references a wrong class or something similar.
The application is deployed on a WAS 6.1 server and the error stacktrace starts with:

at com.ibm.ws.jsp.taglib.TagClassInfo.getParameterClassName(TagClassInfo.java:167)
at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:367)
at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.generateSetters(BaseTagGenerator.java:256)
at com.ibm.ws.jsp.translator.visitor.generator.CustomTagGenerator.startGeneration(CustomTagGenerator.java:359)
at com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.startGeneration(GenerateVisitor.java:699)
at com.ibm.ws.jsp.translator.visitor.generator.GenerateVisitor.visitCustomTagStart(GenerateVisitor.java:399)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:267)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:268)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.processChildren(JspVisitor.java:309)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.processJspElement(JspVisitor.java:139)
at com.ibm.ws.jsp.translator.visitor.JspVisitor.visit(JspVisitor.java:121)
at com.ibm.ws.jsp.translator.visitor.generator.GenerateJspVisitor.visit(GenerateJspVisitor.java:137)
...
Was it helpful?

Solution

Found another workaround using a subclass instead of the copy-paste class!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top