[ https://issues.apache.org/jira/browse/ODFTOOLKIT-414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123293#comment-15123293 ]
Svante Schubert commented on ODFTOOLKIT-414: -------------------------------------------- Honestly, I do not see the solution at the first glance. Do you have a working patch as suggestion? The attribute style:style is allowed in the element <style:column-sep> as you can read in the specification: http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-style_column-sep > ClassCast: OdfStyle cannot be OdfAttribute on some <style:column-sep> (maybe > new openoffice?) > --------------------------------------------------------------------------------------------- > > Key: ODFTOOLKIT-414 > URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-414 > Project: ODF Toolkit > Issue Type: Bug > Components: odfdom > Affects Versions: 0.6.2-incubating > Environment: any > Reporter: Sanny Sanoff > Labels: easyfix > > this part in content.xml causes the classcast: > <style:column-sep style:width="0.002cm" > style:color="#000000" style:height="100%" style:style="solid"/> > this does not: > <style:column-sep style:width="0.002cm" > style:color="#000000" style:height="100%"/> > Here is the source code (OdfXMLFactory.java): > OdfAttribute attr = null; > // lookup registered attribute class for qname > Class attributeClass = getOdfAttributeClass(name); > // if a class was registered create an instance of that class > if (attributeClass != null) { > // line 256: > attr = (OdfAttribute) getNodeFromClass(dom, > attributeClass); > ^^^^^^^^^^^^^^^^^^^ > Here's the full stack trace: > java.lang.ClassCastException: > org.odftoolkit.odfdom.incubator.doc.style.OdfStyle cannot be cast to > org.odftoolkit.odfdom.pkg.OdfAttribute > at > org.odftoolkit.odfdom.pkg.OdfXMLFactory.newOdfAttribute(OdfXMLFactory.java:256) > at > org.odftoolkit.odfdom.pkg.OdfFileDom.createAttributeNS(OdfFileDom.java:332) > at > org.odftoolkit.odfdom.pkg.OdfFileDom.createAttributeNS(OdfFileDom.java:322) > at > org.odftoolkit.odfdom.pkg.OdfFileSaxHandler.startElement(OdfFileSaxHandler.java:104) > at > org.odftoolkit.odfdom.pkg.rdfa.MultiContentHandler.startElement(MultiContentHandler.java:83) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) -- This message was sent by Atlassian JIRA (v6.3.4#6332)