You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lukasz Kucharski <lk...@gmail.com> on 2005/12/13 23:23:05 UTC

Tacos tree and java.Lang.ArrayStoreException help needed

Hi

My environment is Tomcat 5.5 + Jre 1.5 + T4 beta12 + tacos library alpa 6.

I'm in the middle of migration process from T3 to T4 and this is the
problem I can't solve on my own.

I use tacos tree to display category tree. I implement
ITreeContentProvider etc. When I display tree structure with only root
in it (trees of height 1) everything seems fine but when I try to
display trees higher than that i get exception that comes from tacos
library:

java.lang.ArrayStoreException  		 		 		  		 	  		

 			Stack Trace: 	 			 				
java.lang.System.arraycopy(Native Method) 					
java.util.ArrayList.toArray(Unknown Source) 					
net.sf.tacos.ajax.components.AjaxDirectLink.getLink(AjaxDirectLink.java:67) 				
org.apache.tapestry.link.DefaultLinkRenderer.constructURL(DefaultLinkRenderer.java:112)
org.apache.tapestry.link.DefaultLinkRenderer.renderLink(DefaultLinkRenderer.java:62)
org.apache.tapestry.link.AbstractLinkComponent.renderComponent(AbstractLinkComponent.java:95)	org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434) 		
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:86) 		
$IfBean_8.renderComponent($IfBean_8.java)--

I identified code in Tacos source code which causes exception to be
thrown but can not say why:

 public ILink getLink(IRequestCycle cycle) {
        //Normal DirectLink listener parameters
        Object[] params = constructServiceParameters(getParameters());

        //Component id's to update
        String[] updateComponents = new String[0];
        if (getUpdateComponents() != null)
// here is the line that couses the exception to be thrown later
            ->(AjaxDirectLink line:67)
            updateComponents = (String[])getUpdateComponents()
            .toArray(new String[getUpdateComponents().size()]);
(...)
}


Please help me out guys

Thanks
Ɓukasz