Referring to my earlier post entitled "SQL error, moving from JVM 1.3.1 to 1.4.1"
By reverting this change:
- String query = sb.toString().trim();
+ String query = StringUtils.deleteWhitespace(sb.toString());
My SQL Queries work again.
I think StringUtils.deleteWhitespace is deleting ALL whitespace, thereby rendering the queries invalid.
Was there a special reason you did this? Is there another workaround, or should I revert this patch to CVS?
thanks
The triple namespace issue is not resolved, I guess this comes from elsewhere.
regards Jeremy
On Monday, March 10, 2003, at 11:45 AM, [EMAIL PROTECTED] wrote:
Index: SQLTransformer.java
===================================================================
RCS file: /home/cvs/cocoon-2.0/src/java/org/apache/cocoon/transformation/ SQLTransformer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SQLTransformer.java 9 Mar 2003 00:03:22 -0000 1.1
+++ SQLTransformer.java 10 Mar 2003 11:45:16 -0000 1.2
@@ -63,6 +63,7 @@
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.util.Tokenizer;
import org.apache.cocoon.xml.IncludeXMLConsumer;
+import org.apache.commons.lang.StringUtils;
import org.apache.excalibur.xml.sax.SAXParser;
import org.apache.log.Logger;
import org.xml.sax.Attributes;
@@ -1045,7 +1046,7 @@
sb.append( query.getColumnValue( av.name ) );
}
}
- String query = sb.toString().trim();
+ String query = StringUtils.deleteWhitespace(sb.toString());
// Test, if this is an update (by comparing with select)
if ( !isstoredprocedure && !isupdate) {
if (query.length() > 6 && !query.substring(0,6).equalsIgnoreCase("SELECT")) {