Take the 2-minute tour ×

I have a java stored procedure that takes in a clob representing a chunk of javascript and mins it. The structure of the function calling the JSP is as follows:

function MIN_JS(pcl_js in clob) return clob as
  language java name 'JSMin.min(oracle.sql.CLOB) return oracle.sql.CLOB';

In the actual JSP, I have the following:

import oracle.sql.CLOB;

public class JSMin {
public static min(CLOB js) {

The problem I'm having is that whenever I pass a clob to JS_MIN, it is always interpreted as null inside the JSP. I've checked the clob before calling JS_MIN annd it definitely has contents. Any ideas as to what I'm missing? Any help is greatly appreciated.

share|improve this question
Presumably your JSMin class is a wrapper to Douglas Crockford's java implementation. It would be helpful if you posted sufficient details of your class for people to be able to re-create it. –  APC May 7 '10 at 13:47

1 Answer 1

As it turns out, one of the javascript chunks I was sending was in fact null. We have several packages that generate javascript for various controls and one is apparently still under development and wrapped in a way that it always returns null unless you are logged in as a particular user.

In my code, I loop across all the javascript packages, sending each to JS_MIN. Everything was working peachy until the package still in development came along and passed null. I added a simple check for null and everything works perfectly now.

So the short answer is: Doh!

share|improve this answer

Your Answer


