Mantis - Resin
Viewing Issue Advanced Details
1605 minor always 02-06-07 15:17 04-05-07 09:29
ferg  
ferg  
normal  
closed  
fixed  
none    
none 3.0.24  
0001605: xml version issues
(rep by

 
The following JSP test page
 
<%@ page language="java" contentType="text/plain; charset=UTF-8"
    pageEncoding="UTF-8"%>\
<%@page import="java.util.Properties"%>
<%@page import="java.io.ByteArrayOutputStream"%>
<%
      Properties p=new Properties();
      p.setProperty("x","y");
      ByteArrayOutputStream baos=new ByteArrayOutputStream();
 
      p.storeToXML(baos,"xxx","UTF-8");
     
      out.print(baos.toString("UTF-8"));
%>
 
works fine on resin-3.0.23 with java5 (jdk1.5.0_08), but with java6 (jdk1.6.0) the following exception is thrown
 
java.lang.UnsupportedOperationException
      at com.caucho.xml.QDocument.getXmlVersion(QDocument.java:848)
      at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.setDocumentInfo(DOM2TO.java:375)
      at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:127)
      at com.sun.org.apache.xalan.internal.xsltc.trax.DOM2TO.parse(DOM2TO.java:94)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:663)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:709)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
      at java.util.XMLUtils.emitDocument(XMLUtils.java:156)
      at java.util.XMLUtils.save(XMLUtils.java:136)
      at java.util.Properties.storeToXML(Properties.java:917)
      at _jsp._test9__jsp._jspService(test9.jsp:11)
      at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
      at com.caucho.jsp.Page.pageservice(Page.java:570)
      at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:179)
      at it.sodomaco.mab.HeaderFilter.doFilter(HeaderFilter.java:117)
      at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
      at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
      at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
      at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:420)
      at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
      at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:520)
      at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
      at java.lang.Thread.run(Thread.java:619)
 
 
 
 

There are no notes attached to this issue.