Hello,
the following patch is a solution for the second NullPointerException (but
I am not sure if it is the best/right solution):
diff -u cocoon-2.0.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java_orig
cocoon-2.0.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java
--- cocoon-2.0.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java_orig Thu Mar 7
18:18:04 2002
+++ cocoon-2.0.1/src/java/org/apache/cocoon/xml/dom/DOMBuilder.java Thu Mar 7
+18:26:47 2002
@@ -35,6 +35,9 @@
/** The result */
protected DOMResult result;
+ /** The TransformerHandler */
+ protected TransformerHandler handler;
+
/**
* Construct a new instance of this TreeGenerator.
*/
@@ -81,7 +84,7 @@
System.err.println("DOMBuilder( Listener listener, Node parentNode )");
this.listener = listener;
try {
- TransformerHandler handler = factory.newTransformerHandler();
+ handler = factory.newTransformerHandler();
this.setContentHandler(handler);
this.setLexicalHandler(handler);
if (parentNode != null) {
@@ -113,7 +116,15 @@
*/
public void recycle() {
super.recycle();
- this.result = null;
+ try {
+ this.handler = factory.newTransformerHandler();
+ this.setContentHandler(handler);
+ this.setLexicalHandler(handler);
+ this.result = new DOMResult();
+ handler.setResult(this.result);
+ } catch (javax.xml.transform.TransformerException local) {
+ throw new RuntimeException("Fatal-Error: Unable to get transformer
+handler");
+ }
}
/**
--
------------------------------------------------------------------------
Peter Seiderer E-Mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]