Skip to main content

I don't know if anyone has come across this before but, when using JDBC, if I specify setMaxRows on the PreparedStatement, no rows are returned. As soon as I remove this statement, I get all the results.

This only seems to occur on tables which contain a column of type LONGVARCHAR and only when the LONGVARCHAR column is returned in the ResultSet. On tables without LONGVARCHAR columns I can use setMaxSize without any issues.

Another problem that I am encountering with the same tables is that, if I remove the setMaxRows statement and begin processing the ResultSet, when I get to the LONGVARCHAR column, I am unable to read the value. Instead, I get the following error:

Exception in thread "main" java.sql.SQLException: [Relativity JDBC Driver][SimbaLNA][Liant][Relativity RM Server]Invalid column number.
 at relativity.jdbc.PackBuffer.getSQLException(Unknown Source)
 at relativity.jdbc.RPCInterface.handleError(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetMoreLongDataSP(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetLongDataSP(Unknown Source)
 at relativity.jdbc.DataSet.getLongData(Unknown Source)
 at relativity.jdbc.DataSet.getValue(Unknown Source)
 at relativity.jdbc.RelativityResultSet.getString(Unknown Source)
 at pjbs.Test.main(Test.java:33)

It gives the same error whether I read it as a string or use getAsciiStream or getBinaryStream. If I try to use a getUnicodeStream it tells me that Unicode is not supported and if I use getCharacterStream it tells me that the method is not supported. I can't see any other methods in the ResultSet documentation that would give me this column value.

I can view the column metadata without any problems. I just can't read the value.

Any ideas how I can get the contents of the column? And how I can limit the number of rows returned?

I don't know if anyone has come across this before but, when using JDBC, if I specify setMaxRows on the PreparedStatement, no rows are returned. As soon as I remove this statement, I get all the results.

This only seems to occur on tables which contain a column of type LONGVARCHAR and only when the LONGVARCHAR column is returned in the ResultSet. On tables without LONGVARCHAR columns I can use setMaxSize without any issues.

Another problem that I am encountering with the same tables is that, if I remove the setMaxRows statement and begin processing the ResultSet, when I get to the LONGVARCHAR column, I am unable to read the value. Instead, I get the following error:

Exception in thread "main" java.sql.SQLException: [Relativity JDBC Driver][SimbaLNA][Liant][Relativity RM Server]Invalid column number.
 at relativity.jdbc.PackBuffer.getSQLException(Unknown Source)
 at relativity.jdbc.RPCInterface.handleError(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetMoreLongDataSP(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetLongDataSP(Unknown Source)
 at relativity.jdbc.DataSet.getLongData(Unknown Source)
 at relativity.jdbc.DataSet.getValue(Unknown Source)
 at relativity.jdbc.RelativityResultSet.getString(Unknown Source)
 at pjbs.Test.main(Test.java:33)

It gives the same error whether I read it as a string or use getAsciiStream or getBinaryStream. If I try to use a getUnicodeStream it tells me that Unicode is not supported and if I use getCharacterStream it tells me that the method is not supported. I can't see any other methods in the ResultSet documentation that would give me this column value.

I can view the column metadata without any problems. I just can't read the value.

Any ideas how I can get the contents of the column? And how I can limit the number of rows returned?

What is the COBOL data item that you are mapping to LONGVARCHAR?


I don't know if anyone has come across this before but, when using JDBC, if I specify setMaxRows on the PreparedStatement, no rows are returned. As soon as I remove this statement, I get all the results.

This only seems to occur on tables which contain a column of type LONGVARCHAR and only when the LONGVARCHAR column is returned in the ResultSet. On tables without LONGVARCHAR columns I can use setMaxSize without any issues.

Another problem that I am encountering with the same tables is that, if I remove the setMaxRows statement and begin processing the ResultSet, when I get to the LONGVARCHAR column, I am unable to read the value. Instead, I get the following error:

Exception in thread "main" java.sql.SQLException: [Relativity JDBC Driver][SimbaLNA][Liant][Relativity RM Server]Invalid column number.
 at relativity.jdbc.PackBuffer.getSQLException(Unknown Source)
 at relativity.jdbc.RPCInterface.handleError(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetMoreLongDataSP(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetLongDataSP(Unknown Source)
 at relativity.jdbc.DataSet.getLongData(Unknown Source)
 at relativity.jdbc.DataSet.getValue(Unknown Source)
 at relativity.jdbc.RelativityResultSet.getString(Unknown Source)
 at pjbs.Test.main(Test.java:33)

It gives the same error whether I read it as a string or use getAsciiStream or getBinaryStream. If I try to use a getUnicodeStream it tells me that Unicode is not supported and if I use getCharacterStream it tells me that the method is not supported. I can't see any other methods in the ResultSet documentation that would give me this column value.

I can view the column metadata without any problems. I just can't read the value.

Any ideas how I can get the contents of the column? And how I can limit the number of rows returned?

Hmmm.  Looking at the code, it appears that the Data Server has reported an error, probably the "Invalid Column".  Unfortunately we'll need a test case to get to the bottom of this.  Which the version of the product are you using?


I don't know if anyone has come across this before but, when using JDBC, if I specify setMaxRows on the PreparedStatement, no rows are returned. As soon as I remove this statement, I get all the results.

This only seems to occur on tables which contain a column of type LONGVARCHAR and only when the LONGVARCHAR column is returned in the ResultSet. On tables without LONGVARCHAR columns I can use setMaxSize without any issues.

Another problem that I am encountering with the same tables is that, if I remove the setMaxRows statement and begin processing the ResultSet, when I get to the LONGVARCHAR column, I am unable to read the value. Instead, I get the following error:

Exception in thread "main" java.sql.SQLException: [Relativity JDBC Driver][SimbaLNA][Liant][Relativity RM Server]Invalid column number.
 at relativity.jdbc.PackBuffer.getSQLException(Unknown Source)
 at relativity.jdbc.RPCInterface.handleError(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetMoreLongDataSP(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetLongDataSP(Unknown Source)
 at relativity.jdbc.DataSet.getLongData(Unknown Source)
 at relativity.jdbc.DataSet.getValue(Unknown Source)
 at relativity.jdbc.RelativityResultSet.getString(Unknown Source)
 at pjbs.Test.main(Test.java:33)

It gives the same error whether I read it as a string or use getAsciiStream or getBinaryStream. If I try to use a getUnicodeStream it tells me that Unicode is not supported and if I use getCharacterStream it tells me that the method is not supported. I can't see any other methods in the ResultSet documentation that would give me this column value.

I can view the column metadata without any problems. I just can't read the value.

Any ideas how I can get the contents of the column? And how I can limit the number of rows returned?

I would recommend contacting Micro Focus Customer Care (supportline.microfocus.com) for assistance with this issue.  

From the description that you have provided, this seems like it could be a product issue, and thus, would need to be addressed by Micro Focus Development.

If you can provide a test case that demonstrates the described behavior, then, a Customer Care representative can submit the problem report to Development for further investigation.


I don't know if anyone has come across this before but, when using JDBC, if I specify setMaxRows on the PreparedStatement, no rows are returned. As soon as I remove this statement, I get all the results.

This only seems to occur on tables which contain a column of type LONGVARCHAR and only when the LONGVARCHAR column is returned in the ResultSet. On tables without LONGVARCHAR columns I can use setMaxSize without any issues.

Another problem that I am encountering with the same tables is that, if I remove the setMaxRows statement and begin processing the ResultSet, when I get to the LONGVARCHAR column, I am unable to read the value. Instead, I get the following error:

Exception in thread "main" java.sql.SQLException: [Relativity JDBC Driver][SimbaLNA][Liant][Relativity RM Server]Invalid column number.
 at relativity.jdbc.PackBuffer.getSQLException(Unknown Source)
 at relativity.jdbc.RPCInterface.handleError(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetMoreLongDataSP(Unknown Source)
 at relativity.jdbc.RPCInterface.SQLGetLongDataSP(Unknown Source)
 at relativity.jdbc.DataSet.getLongData(Unknown Source)
 at relativity.jdbc.DataSet.getValue(Unknown Source)
 at relativity.jdbc.RelativityResultSet.getString(Unknown Source)
 at pjbs.Test.main(Test.java:33)

It gives the same error whether I read it as a string or use getAsciiStream or getBinaryStream. If I try to use a getUnicodeStream it tells me that Unicode is not supported and if I use getCharacterStream it tells me that the method is not supported. I can't see any other methods in the ResultSet documentation that would give me this column value.

I can view the column metadata without any problems. I just can't read the value.

Any ideas how I can get the contents of the column? And how I can limit the number of rows returned?

Sorry for the delay in replying. I only work on Mondays and Tuesdays.

I am getting the information requested re the Data Server version and which COBOL data item is being mapped to the affected field.

How would I go about constructing a test case? What does it need to have/do?