Error: Cannot provide default input source | Serialize content as XML

Issue

When you serialize your pages as XML using XMLUtil class from Day API like Document document = XMLUtil.createXMLDocument(ticket, handle), you receive the following error:

19 Feb 2008 14:42:42,608 DEBUG com.apps.cq.servlets.XmlWriterServlet:71 -requested page cannot provide a default input source:

Solution

See the class com.day.cq.transform.PageToXML. For example:

File xmlFile = new File("/tmp/page.xml"); PageToXML p2xml = new PageToXML(); p2xml.setBinaryAsLink(true); p2xml.apply(cqReq.getTicket().getPage("/content/designground/en/company"), xmlFile);

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online