Thursday, January 21, 2016

Unhelpful Error Message

Since we're already well into January, it's probably a bit late for well-wishes for the New Year. At least it's timing is consistent with my postings here. New Year's Resolution 1: Reduce Procrastination Time. New Year's Resolution 2: Don't Wait Until Almost February To Make New Year's Resolutions.

Anyway, on my dev note, I've been doing this a long time, and I've seen some very odd error messages pop up. Last week, I received the most unhelpful ColdFusion Error Message I think I've ever seen: "6". Yup, that was the entire error message.

I got it on a Query of Query that had a UNION in it. I know QoQ is very limited in what you can do, but a UNION should work. I could run each statement individually in the query, and I could run them both together as a UNION in SQL Developer, just not in my CFC. Syntactically, there was nothing wrong with my query. Regardless, I moved on.

Turns out, it was an error buried deep in the Java handler that apparently didn't have a good way to be returned, so the actual error that bubbled back up to ColdFusion was a java.lang.ArrayIndexOutOfBoundsException type with no Error Message passed through.

Still though, "6"???

2 comments:

  1. I know this post is a year old (almost to the day) but I just encountered the exact same issue. Only difference is that my error message is "5". Did you ever determine what the cause was? I have several other instances of QofQ's doing UNION's that are working fine. Does it have to do with the actual data that is being returned?

    ReplyDelete
  2. Carlos,

    First, I deeply apologize for taking half the year to respond to you. I get SO much traffic here, that I didn't see your comment waiting for moderation. Which leads me to point 2.

    Congrats on being the first comment here! :-)

    Other than finding out it was a deep Java error, I don't remember any other information about it. Check your query and make sure it's valid. If necessary, you might have to drop back into a stored procedure to get the data you need. QoQ is nice, usually, but it can be quirky at times.

    ReplyDelete