I got ClassCastException when trying to upgrade from ColumnDecorator to DisplayTagColumnDecorator Interface. I made the proper changes in my Decorator implementations, but it just keeps throwing a ClassCastException.
Exception: [.DecoratorFactory] Unable to load fr.acoss.dcl.gui.displaytag.decorator.DateWrapper due to a java.lang.ClassCastException exception Cause: fr.acoss.dcl.gui.displaytag.decorator.DateWrapper
at org.displaytag.decorator.DecoratorFactory.loadColumnDecorator(DecoratorFactory.java:108)
at org.displaytag.tags.ColumnTag.addHeaderToTable(ColumnTag.java:621)
at org.displaytag.tags.ColumnTag.doEndTag(ColumnTag.java:547)
If I remove the decorator attribute in the displaytag, the array is well displayed
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I got ClassCastException when trying to upgrade from ColumnDecorator to DisplayTagColumnDecorator Interface. I made the proper changes in my Decorator implementations, but it just keeps throwing a ClassCastException.
Here is the code of my decorator :
import java.util.Date;
import javax.servlet.jsp.PageContext;
import org.apache.log4j.Logger;
import org.displaytag.decorator.DisplaytagColumnDecorator;
import org.displaytag.exception.DecoratorException;
import org.displaytag.properties.MediaTypeEnum;
import fr.acoss.tech.format.Utiles;
public class DateWrapper implements DisplaytagColumnDecorator {
}
Utiles.formatDateFrancais returns a String
Here is the tag statement in the JSP :
==================================
<display:table name="RECU_CB" pagesize="10" requestURI="/servlet/cotisant" class="main" id="bean_recu" sort="list">
<display:caption>MESSAGES REÇUS</display:caption>
<display:column class="center" property="date" title="Date" sortable="true" sortProperty="date" headerClass="sortable" decorator="fr.acoss.dcl.gui.displaytag.decorator.DateWrapper" />
<!-- ... -->
</display:table>
===============================================
Exception: [.DecoratorFactory] Unable to load fr.acoss.dcl.gui.displaytag.decorator.DateWrapper due to a java.lang.ClassCastException exception Cause: fr.acoss.dcl.gui.displaytag.decorator.DateWrapper
at org.displaytag.decorator.DecoratorFactory.loadColumnDecorator(DecoratorFactory.java:108)
at org.displaytag.tags.ColumnTag.addHeaderToTable(ColumnTag.java:621)
at org.displaytag.tags.ColumnTag.doEndTag(ColumnTag.java:547)
If I remove the decorator attribute in the displaytag, the array is well displayed
I am having the same issue.
I am trying to migrate from Display Tag v1.0 to v1.1.
Has this been resolved, Any solutions ?
Thanks
Yes, i placed the newest version of common.lang in the lib directory and it works fine.
Try it out.
Also, u need jsp 2.0 container and 1.2 tlds.
I suppose u must have changed these.
I had also changed up to struts 1.2.9 if ur using 1.1, i would suggest to try changing the struts version as well after trying the above mentioned.