Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.sql.SQLException: Bigger type length than Maximum

38 views
Skip to first unread message

rce...@my-dejanews.com

unread,
May 27, 1998, 3:00:00 AM5/27/98
to

hi,

sorry for reposting that subject, but my problem is slithly different and
can't be solved by the given answers.

i am fetching a query into a result-set and writing the result record by
record into a file. there comes a record where this error-message
":java.sql.SQLException: Bigger type length than Maximum" appears. when i
change the query, so that only the problematic record alone is fetched, the
error-message doesnt appear and the record is written into the file.

anyone got any learnings to share?

TIA,
robert.

following: code-extract and error-message

1. java-code
while(next)
{
System.out.println(count);
for (i=1;i<=columns;i++)
{
Object o = null;
System.out.println(i);
o = resultSet.getObject(i);
if (o != null)
{

System.out.println(resultSet.getObject(i).toString().substring(0,10));

dataStream.writeBytes(resultSet.getObject(i).toString());
dataStream.flush();
}
}
count++;
System.out.println(resultSet.getWarnings());
try {
next = resultSet.next();
} catch (SQLException se) {
System.out.println("1:"+se);
next=resultSet.next();
}

}

2. error-message
java.sql.SQLException: Bigger type length than Maximum
java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:378)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:637)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1206)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:709)
at oracle.jdbc.driver.OracleResultSet.next(OracleResultSet.java:95)
at JDBCAdapter.dumpQueryToFile(JDBCAdapter.java:362)
at JDBCAdapter.dumpVectors(JDBCAdapter.java:406)
at JCDClientExport$1.actionPerformed(JCDClientExport.java:184)
at
com.sun.java.swing.AbstractButton.fireActionPerformed(AbstractButton.java:860)
at
com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstract
Button.java:895)
at
com.sun.java.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.j
ava:338)
at
com.sun.java.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:230)
at
com.sun.java.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonLis
tener.java:156)
at
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:235)
at java.awt.Component.processMouseEvent(Component.java:2284)
at java.awt.Component.processEvent(Component.java:2129)
at java.awt.Container.processEvent(Container.java:894)
at java.awt.Component.dispatchEventImpl(Component.java:1764)
at java.awt.Container.dispatchEventImpl(Container.java:939)
at java.awt.Component.dispatchEvent(Component.java:1704)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1548)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:1457)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1392)
at java.awt.Container.dispatchEventImpl(Container.java:926)
at java.awt.Window.dispatchEventImpl(Window.java:443)
at java.awt.Component.dispatchEvent(Component.java:1704)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:63)

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

John R. Howey

unread,
May 27, 1998, 3:00:00 AM5/27/98
to rce...@my-dejanews.com

As I've said in previous posts (which may have expired), this is a bug in the
Oracle thin driver. It has been reported to Oracle. I got around this problem
by retrieving the data (VARCHAR2(2000), LONGs in my case) in < 500 byte
chunks and then appending them on the client...
I also seem to remember reading something about a trailing single quote (') in the

data causing this.
Oracle has fixed this in their upcoming release...

0 new messages