cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cindy Ballreich <ci...@ballreich.net>
Subject ClassCastException
Date Fri, 23 Feb 2001 21:46:44 GMT
Can you stand another FP related question from me?

As in my previous postings, I'm working with the form capabilities
demonstrated in the "Simple Form Handling" example. Currently, I'm trying
to update the value of an attribute and I'm getting a ClassCastException
when I try to do this. When I try to edit the CDATA value of a node I don't
have any problems at all. It's the attributes that are giving me problems.
(I'm using cocoon 1.8, jakarta 3.1.1, and apache 1.3.14 on an NT4.0 system.)

This is what I'm trying to edit...

<item name="foo" cat_num="1234">
   ...other elements...
</item>

Here is a typical bit of XML to do the editing...

<input name="name" size="30" label="Name">
  <fp:if-post>
    <fp:write to="external-item" select="@name">
      <request:get-parameter name="name"/>
    </fp:write>
  </fp:if-post>
  <fp:read select="@name" from="external-item"/>
</input>

And here is the error message...

java.lang.ClassCastException: org.apache.xerces.dom.DeferredAttrNSImpl
        at
org.apache.cocoon.processor.xsp.library.fp.fpResource.writeAsTextNode(fpReso
urce.java:271)
        at
org.apache.cocoon.processor.xsp.library.fp.fpLibrary.handleWrite(fpLibrary.j
ava:139)
        at
_C_._Program_Files._Apache_Group._jakarta_tomcat._webapps._cocoon._servlets.
_catalog._catalog_edit.populateDocument(_catalog_edit.java:223)
        at
org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
        at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:494)
        at org.apache.cocoon.Engine.handle(Engine.java:359)
        at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
        at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
        at java.lang.Thread.run(Unknown Source)


Any help would be appreciated.
Cindy

Mime
View raw message