jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r746666 - /jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Date Sun, 22 Feb 2009 13:01:19 GMT
Author: jukka
Date: Sun Feb 22 13:01:18 2009
New Revision: 746666

URL: http://svn.apache.org/viewvc?rev=746666&view=rev
Log:
JCR-1952: DOMException: NAMESPACE_ERR thrown when exporting document view

Workaround to the XmlReader failure in the TCK. It seems like the TCK can only load an XmlReader
if a TransformerFactory has been loaded before. Accessing the SerializingContentHandler class
is one way to force this, as the static initializer of that class uses a TransformerFactory.

TODO: Should fix the TCK...

Modified:
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java?rev=746666&r1=746665&r2=746666&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractSession.java
Sun Feb 22 13:01:18 2009
@@ -38,6 +38,7 @@
 import org.apache.jackrabbit.commons.xml.DocumentViewExporter;
 import org.apache.jackrabbit.commons.xml.Exporter;
 import org.apache.jackrabbit.commons.xml.ParsingContentHandler;
+import org.apache.jackrabbit.commons.xml.SerializingContentHandler;
 import org.apache.jackrabbit.commons.xml.SystemViewExporter;
 import org.apache.jackrabbit.commons.xml.ToXmlContentHandler;
 import org.apache.jackrabbit.util.XMLChar;
@@ -272,6 +273,9 @@
             String absPath, OutputStream out,
             boolean skipBinary, boolean noRecurse)
             throws IOException, RepositoryException {
+        // JCR-1952: The XmlReader in the TCK fails if a TransformerFactory
+        // has not been loaded (don't ask me!). This forces the loading:
+        Class c = SerializingContentHandler.class;
         try {
             ContentHandler handler = new ToXmlContentHandler(out);
             exportDocumentView(absPath, handler, skipBinary, noRecurse);
@@ -304,6 +308,9 @@
             String absPath, OutputStream out,
             boolean skipBinary, boolean noRecurse)
             throws IOException, RepositoryException {
+        // JCR-1952: The XmlReader in the TCK fails if a TransformerFactory
+        // has not been loaded (don't ask me!). This forces the loading:
+        Class c = SerializingContentHandler.class;
         try {
             ContentHandler handler = new ToXmlContentHandler(out);
             exportSystemView(absPath, handler, skipBinary, noRecurse);



Mime
View raw message