2 Replies Latest reply: Mar 15, 2012 3:33 PM by Steven Hawkins RSS

Error:  data length too big: 87244459 (max: 33554432)

Mark Addleman Expert

We're generating some massive SQL statements and recently ran into the following exception:

Caused by:

org.teiid.jdbc.TeiidSQLException: data length too big: 87244459 (max: 33554432)

    at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:113)

    at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:70)

    at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:556)

    at org.teiid.jdbc.PreparedStatementImpl.executeQuery(PreparedStatementImpl.java:230)

    at com.ca.chorus.db.LeakDetectingPreparedStatement.executeQuery(LeakDetectingPreparedStatement.java:52)

    at com.ca.chorus.db.DbExecutor.withResultSet(DbExecutor.java:327)

    ... 56 more

Caused by:

[SingleInstanceCommunicationException]data length too big: 87244459 (max: 33554432)

1 [StreamCorruptedException]data length too big: 87244459 (max: 33554432)

    at org.teiid.net.socket.SocketServerInstanceImpl.exceptionOccurred(SocketServerInstanceImpl.java:201)

    at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:259)

    at sun.reflect.GeneratedMethodAccessor346.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)

    at java.lang.reflect.Method.invoke(Method.java:613)

    at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:101)

    at $Proxy509.read(Unknown Source)

    at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:349)

    at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:548)

    ... 59 more

Caused by:

java.io.StreamCorruptedException: data length too big: 87244459 (max: 33554432)

    at org.teiid.netty.handler.codec.serialization.ObjectDecoderInputStream.readObjectOverride(ObjectDecoderInputStream.java:86)

    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:377)

    at org.teiid.net.socket.OioOjbectChannelFactory$OioObjectChannel.read(OioOjbectChannelFactory.java:114)

    at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:255)

    ... 66 more

 

I suspect the problem the large SQL statement (approx 100k in length) and not in the result set (which is many rows of normal size).  I just want to confirm...

 

Also, it appears that the maximum length is 1 << 25 as set by org.teiid.net.socket.OioOjbectChannelFactory.MAX_OBJECT_SIZE.  Is this some hard limit?  Could it be increased (say, to 1 << 28) without causing a problem?  If so, I'll submit a jira ticket to make it settable through a system property