2 Replies Latest reply on Feb 5, 2007 10:40 AM by Levent Aksu

    ClassCastException org.jboss.seam.ui.HtmlLink

    Levent Aksu Newbie

      Hi,
      I am new to seam. I am even new to ejb3, jsf and facelets but i wish to use them in my next project. I thought seam may be solving a number of things before i even run into them so I could jump over some learning curve, however it turns out unlikely.
      Here, I try to develop a sample application of my own and it is even simpler than hotel booking example. No database yet. In the booking example the hotels are listed and upon clicking the link it starts a new conversation while opening the hotel in another page. Here I display a number of "organizations" in a table and upon clicking the organization's name I expect it to start the conversation likewise. Though everything is pretty much similar I run into the following exception. It breaks while trying to render the page.

      My page includes the s:link like that:

      <h:column>
       <f:facet name="header"><h:outputText value="Ad"/></f:facet>
       <s:link value="#{item.name}" action="#{organizationList.selectOrganization(item)}" />
      </h:column>
      


      If I omit the action property the page renders ok but of course it does not do what I wanted to do.
      I must be missing something probably obvious and perhaps it is something to do with JSF or Facelets and not Seam but I don't know which direction to go.
      Best regards,
      Levent

      Error Rendering View[/organizationsList.xhtml]
      java.lang.ClassCastException: org.jboss.seam.ui.HtmlLink
       at com.sun.facelets.tag.jsf.ActionSourceRule$ActionMapper2.applyMetadata(ActionSourceRule.java:65)
       at com.sun.facelets.tag.MetadataImpl.applyMetadata(MetadataImpl.java:36)
       at com.sun.facelets.tag.MetaTagHandler.setAttributes(MetaTagHandler.java:62)
       at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:140)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:164)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:164)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
       at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
       at com.sun.facelets.impl.DefaultFaceletContext$1.apply(DefaultFaceletContext.java:253)
       at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:263)
       at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:63)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
       at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
       at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
       at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
       at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
       at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:136)
       at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
       at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
       at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
       at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:408)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:442)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
       at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
       at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
       at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
       at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
       at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
       at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
       at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
       at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
       at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
       at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
       at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
       at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)