Android Question jRDC Error and file


Well-Known Member
Licensed User
Longtime User

I am getting random errors from jRDC. It is directly related with the file and the format character "\" used to split the sql command lines ie to make the sql commands more readable. If I bring the sql commands to one single line then it is working as expected. Please note that, I already have many sql commands in the same file that are formatted using the "\" character and all those are working fine. Only the recently/last added commands are behaving erratically and throwing random errors OR the giving output.

I am getting the following error. From the error, I understand that it is something related to the parameter. But actually nothing wrong with the parameter.

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /rdc. Reason:
<pre>    java.sql.SQLException: Parameter index out of range (1 &gt; number of parameters, which is 0).</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
Reached JobDone
Error: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).

Whenever I add new sql commands at the bottom in the file , I am getting these kinds of errors. That's what I understand.

Screen Snapshot of the file that throws error. (Highlighted in Yellow Color).

When I modified the same sql command line, removing the line split ie "\" it started working.

But I am using similar character ie "\" to split the lines and to make the sql commands in the file readable. All those are working fine in the same file.

What could be wrong ?. Is it because the length (no of lines) of the increased beyond a point ?. The total no of lines reached a count of 197 as of now.

Prior to the error, my SQL query result set was not sorted even though I had given the ORDER BY clause in it.
SELECT Full_Name, User_ID FROM cmn_users WHERE User_Types_ID = 7 AND App_Type_Mobile = 1 AND ACTIVE = 1 AND Comp_ID = ? ORDER BY Full_Name

After I removed the "\" character and removed all the ENTER KEY characters and brought everything to one single line, then it started working as expected.

Any idea what could be wrong ?

I use notepad to modify the file.

Thanks & Regards



Well-Known Member
Licensed User
Longtime User
Don't use notepad. Use a decent text editor such as Notepad++ that allows you to see the end of line characters.
I used NotePad++ to inspect whether any illegal characters are present in this file. Unfortunately, I could not find anything wrong.

On Notepad++, I switched on the following options on the Menu
View -> Show Symbol -> and I checked
"Show All Characters"
"Show Indent Guide"
"Show Wrap Symbol"

Here is the screen snapshot of file opened in Notepad++


Please note that, line 202 is the last line of the file.

As I posted in the beginning of this post, the error that I get is
Error: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is0).

If I try to make it a single line sql.command then everything works fine.

Please note that this was working fine till the entries in the file was less than 190 or so. Its only after that it started giving problems. The sql. commands given on line number 192 also had this problem, so I made it to a single line. The same issue occured with the sql. command given on line number 194 too.

For test purpose, (on an effort to reduce the number of lines in the file), I removed some 5 to 10 lines from the file.
Tried moving this particular sq. command to the top of the file too. Unfortunately, the same result. Now really wondering what is wrong :mad:

I feel that definitely this has to do something with the character "\" and the order of ? in the sql. command in the file


Last edited:
Upvote 0


Well-Known Member
Licensed User
Longtime User
I know it sounds stupid, but did you try to remove the space between the "\" and the CrLf in the pink sample ?
You saved my day.

Yes, the space after the "\" character was the problem.

Lesson learned : There should be NO SPACE character after the \ character in the file. The \ character should be immediately followed by a CRLF (Linefeed). It is very difficult to notice whether there is space character after the \ with a normal text editor like Notepad.exe. I was using notepad.exe to edit file. Started using Notepad++ :)

Last edited:
Upvote 0