bloritsch 01/03/13 10:12:19
Modified: src/org/apache/cocoon/acting Tag: xml-cocoon2
OraAddAction.java
Log:
Almost fixed. I have an inexplicable NullPointerException with the blob
Query.
Revision Changes Path
No revision
No revision
1.1.2.9 +9 -7
xml-cocoon/src/org/apache/cocoon/acting/Attic/OraAddAction.java
Index: OraAddAction.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/OraAddAction.java,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- OraAddAction.java 2001/03/13 17:01:34 1.1.2.8
+++ OraAddAction.java 2001/03/13 18:12:17 1.1.2.9
@@ -41,7 +41,7 @@
* only one table at a time to update.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1.2.8 $ $Date: 2001/03/13 17:01:34 $
+ * @version CVS $Revision: 1.1.2.9 $ $Date: 2001/03/13 18:12:17 $
*/
public class OraAddAction extends DatabaseAddAction {
private static final Map selectLOBStatements = new HashMap();
@@ -131,7 +131,6 @@
statement.close();
query = this.getSelectLOBQuery(conf);
- getLogger().info(query);
// Process the large objects if they exist
if (query != null) {
@@ -142,7 +141,7 @@
currentIndex = 1;
for (int i = 0; i < keys.length; i++) {
- this.setColumn(statement, currentIndex, request,
keys[i]);
+ this.setColumn(LOBstatement, currentIndex, request,
keys[i]);
currentIndex++;
}
}
@@ -310,6 +309,8 @@
}
}
+ if ("".equals(query)) return null;
+
return query;
}
@@ -346,11 +347,12 @@
}
}
- if (numLobs == 0) {
+ if (numLobs < 1) {
+ // if query is set to "", then the Action won't
+ // try to process it again.
query = "";
- // if query is set to "", then it won't try to process
it again.
OraAddAction.selectLOBStatements.put(conf, query);
- return query;
+ return null;
}
queryBuffer.append(" FROM
").append(table.getAttribute("name"));
@@ -370,7 +372,7 @@
}
}
- query = queryBuffer.toString();
+ query = queryBuffer.toString().trim();
OraAddAction.selectLOBStatements.put(conf, query);
}
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]