问题
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jr:table'. One of '{"http://jasperreports.sourceforge.net/jasperreports":component}' is expected.
Why it occurs?
回答1:
you provide almost no context for your question, so your chances of getting a helpful answer are slim.
however, that looks like the sort of exception you would get if you are parsing an xml document with a schema defined and the document does not match the schema.
UPDATE:
based on your comment below, i see the document does list a schema, so my original guess still stands. your xml document does not match the schema (e.g. there is a "table" element where the schema says there should be a "component" element).
来源:https://stackoverflow.com/questions/10043323/saxparseexception-when-trying-to-print-data-in-table