DO NOT REPLY [Bug 39607] New: - NullPointerException in RtfTableRow : tableBorderAttributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39607. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39607 Summary: NullPointerException in RtfTableRow : tableBorderAttributes Product: Fop Version: 0.92 Platform: PC OS/Version: Windows XP Status: NEW Severity: regression Priority: P2 Component: rtf AssignedTo: fop-dev@xmlgraphics.apache.org ReportedBy: [EMAIL PROTECTED] The changes in the class RtfTableRow between 0.91 and 0.92 now generate a NullPointerException, due to the variable tableBorderAttributes declared at line 189: RtfAttributes tableBorderAttributes = getTable().getBorderAttributes(); being null when the code: tableBorderAttributes.getValue() (line 209) is called. Example of java code which worked under 0.91 and doesn't work anymore: // Start of class import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfDocumentArea; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfParagraph; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfSection; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTable; import org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow; public class TestFop { public static void main(String[] args) { try { FileWriter writer = new FileWriter(new File(C:/test.doc)); RtfFile f = new RtfFile(writer); RtfDocumentArea doc = f.startDocumentArea(); RtfSection section = doc.newSection(); RtfParagraph paragraph = section.newParagraph(); paragraph.newText(Testing fop - rtf module - class RtfTableRow); paragraph.close(); RtfTable table = section.newTable(null); RtfTableRow row = table.newTableRow(); row.newTableCell(2000).newParagraph().newText(blah); row.newTableCell(5000).newParagraph().newText(doubleBlah); row.close(); table.close(); section.close(); doc.close(); f.flush(); } catch (IOException ioe) { ioe.printStackTrace(); } } } //End of class Stacktrace when the code is executed: Exception in thread main java.lang.NullPointerException at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow.writeRowAndCellsDefintions(RtfTableRow.java:209) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow.writeRtfContent(RtfTableRow.java:142) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:85) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:134) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:85) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:134) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:85) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:134) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:85) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer.writeRtfContent(RtfContainer.java:134) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement.writeRtf(RtfElement.java:85) at org.apache.fop.render.rtf.rtflib.rtfdoc.RtfFile.flush(RtfFile.java:218) at test.TestFop.main(TestFop.java:37) Simple way to fix this: add a test to check wether tableBorderAttributes is null. (I will join the modified RtfTableRow.java later) -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39607] - NullPointerException in RtfTableRow : tableBorderAttributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39607. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39607 --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 11:20 --- Created an attachment (id=18311) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=18311action=view) source of TestFop.java -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39607] - NullPointerException in RtfTableRow : tableBorderAttributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39607. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39607 --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 11:22 --- Created an attachment (id=18312) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=18312action=view) modified RtfTableRow.java I've added the following lines: 203,204,237 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39608] New: - NullPointerException when redering .fo file in TableLayoutManager.initialize
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39608. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39608 Summary: NullPointerException when redering .fo file in TableLayoutManager.initialize Product: Fop Version: 0.92 Platform: PC OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: pdf AssignedTo: fop-dev@xmlgraphics.apache.org ReportedBy: [EMAIL PROTECTED] Hi, When trying to render the attached file I get the following exception using fop.0.92beta. Thanks, Michael htmlbodyXSL-FO Processor Error(s) occured:brpre2006-maj-18 14:21:37 org.apache.fop.cli.Main startFOPBR ALLVARLIG: ExceptionBR java.lang.NullPointerExceptionBR #9;at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:167)BR #9;at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114)BR #9;at org.apache.fop.cli.Main.startFOP(Main.java:159)BR #9;at org.apache.fop.cli.Main.main(Main.java:190)BR - BR java.lang.NullPointerExceptionBR #9;at org.apache.fop.layoutmgr.table.TableLayoutManager.initialize (TableLayoutManager.java:108)BR #9;at org.apache.fop.layoutmgr.AbstractLayoutManager.getChildLM (AbstractLayoutManager.java:109)BR #9;at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements (BlockStackingLayoutManager.java:258)BR #9;at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements (BlockLayoutManager.java:105)BR #9;at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements (FlowLayoutManager.java:98)BR #9;at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthEleme nts(PageSequenceLayoutManager.java:234)BR #9;at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList (AbstractBreaker.java:502)BR #9;at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList (PageSequenceLayoutManager.java:226)BR #9;at org.apache.fop.layoutmgr.AbstractBreaker.doLayout (AbstractBreaker.java:252)BR #9;at org.apache.fop.layoutmgr.AbstractBreaker.doLayout (AbstractBreaker.java:220)BR #9;at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout (PageSequenceLayoutManager.java:152)BR #9;at org.apache.fop.area.AreaTreeHandler.endPageSequence (AreaTreeHandler.java:320)BR #9;at org.apache.fop.fo.pagination.PageSequence.endOfNode (PageSequence.java:147)BR #9;at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement (FOTreeBuilder.java:357)BR #9;at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:193)BR #9;at org.apache.xalan.transformer.TransformerIdentityImpl.endElement (TransformerIdentityImpl.java:1101)BR #9;at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) BR #9;at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)BR #9;at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher. dispatch(Unknown Source)BR #9;at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source)BR #9;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)BR #9;at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)BR #9;at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)BR #9;at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)BR #9;at org.apache.xalan.transformer.TransformerIdentityImpl.transform (TransformerIdentityImpl.java:484)BR #9;at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:164)BR #9;at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114)BR #9;at org.apache.fop.cli.Main.startFOP(Main.java:159)BR #9;at org.apache.fop.cli.Main.main(Main.java:190)BR -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39608] - NullPointerException when redering .fo file in TableLayoutManager.initialize
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39608. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39608 --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 12:25 --- Created an attachment (id=18313) -- (http://issues.apache.org/bugzilla/attachment.cgi?id=18313action=view) Letter rendered using fop0.92beta -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39608] - NullPointerException when redering .fo file in TableLayoutManager.initialize
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39608. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39608 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 13:08 --- The reason for the NullPointerException is your omitting the length unit. I went into the spec and it suggests that the unit is optional but I didn't find any hint what unit to use in case it's not specified. So the work-around for now is to specify 0pt instead of 0 for the border-spacing property. The NPE is certainly not nice so we need to do something. What happens is the the value 0 is internally represented by a NumberProperty which does not override Property's getLength() method which returns null. The interesting thing is that specifying padding=0 doesn't produce such an error, but then the values are represented as CondLengthProperty. Ideas, anyone? http://www.w3.org/TR/xsl11/#numbers -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39607] - [PATCH] NullPointerException in RtfTableRow : tableBorderAttributes
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39607. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39607 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Keywords||PatchAvailable Resolution||FIXED Summary|NullPointerException in |[PATCH] NullPointerException |RtfTableRow : |in RtfTableRow : |tableBorderAttributes |tableBorderAttributes --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 14:03 --- Applied. Thanks, especially for the sample code to reproduce the problem! http://svn.apache.org/viewvc?rev=407553view=rev Julien, please send proposed code changes as Subversion patches in the future. That makes it a lot easier for us. Thank you! See: http://xmlgraphics.apache.org/fop/dev/index.html#patches -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39553] - NullpointerException in RTFHandler
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39553. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39553 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 15:55 --- The NPE was ugly. I changed the whole thing so you at least get a file. Please note that the RTF output does not support an implicit column setup. Please explicitely define the table-column elements when you want to generate RTF output. http://svn.apache.org/viewvc?rev=407576view=rev -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39560] - Null Pointer Exception (when a table cloned due to a retrieve-marker operation)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39560. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39560 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEEDINFO|ASSIGNED Summary|Null Pointer Exception |Null Pointer Exception (when ||a table cloned due to a ||retrieve-marker operation) --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 16:25 --- Ok, it looks like it's really the column handling code in TableRow that's falling appart as soon as a table is cloned due to a retrieve-marker operation from a marker which contains a table. I don't see a solution, yet. I'll build a small test case we can put in the test suite. If anyone has ideas how to fix this -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.
DO NOT REPLY [Bug 39560] - Null Pointer Exception (when a table cloned due to a retrieve-marker operation)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=39560. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=39560 --- Additional Comments From [EMAIL PROTECTED] 2006-05-18 16:45 --- Test case added: http://svn.apache.org/viewvc?rev=407588view=rev Any table put in a marker fails when it's referenced through a retrieve-marker. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee.