[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4000:
---------------------------------------
This is currently expected behavior. You can either submit updates in smaller client batches or increase the allowable message sizes from the client on the server - the org.teiid.maxMessageSize system property: https://docs.jboss.org/author/display/teiid87final/System+Properties
This can also be changed to an enhancement request if you want the driver to handle larger batches more gracefully.
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
> {code}
> Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
> at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
> at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
> at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
> Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
> at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
> {code}
> private static final String INSERT_TEIID = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
> private static final String INSERT_ORACLE = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
> private static void writeData(List<List<Object>> records) throws SQLException {
> PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE)
>
> long start = System.currentTimeMillis();
> System.out.println("Building batch PreparedStatement");
> for(List<Object> o : records) {
> ps.setObject(1, o.get(0));
> ps.setObject(2, o.get(1));
> ps.setObject(3, o.get(2));
> ps.setObject(4, o.get(3));
> ps.setObject(5, o.get(4));
> ps.setObject(6, o.get(5));
> ps.setObject(7, o.get(6));
> ps.setObject(8, o.get(7));
> ps.setObject(9, o.get(8));
> ps.setObject(10, o.get(9));
> ps.setObject(11, o.get(10));
> ps.setObject(12, o.get(11));
> ps.setObject(13, o.get(12));
> ps.setObject(14, o.get(13));
> ps.setObject(15, o.get(14));
> ps.setObject(16, o.get(15));
> ps.setObject(17, o.get(16));
> ps.setString(18, o.get(17).toString().replace("]", ""));
> ps.addBatch();
> }
> System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
> start = System.currentTimeMillis();
> System.out.println("Executing batch");
> ps.executeBatch();
> System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
> ps.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-4000:
------------------------------
Description:
I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
{code}
Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
{code}
private static final String INSERT_TEIID = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
private static final String INSERT_ORACLE = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
private static void writeData(List<List<Object>> records) throws SQLException {
PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE)
long start = System.currentTimeMillis();
System.out.println("Building batch PreparedStatement");
for(List<Object> o : records) {
ps.setObject(1, o.get(0));
ps.setObject(2, o.get(1));
ps.setObject(3, o.get(2));
ps.setObject(4, o.get(3));
ps.setObject(5, o.get(4));
ps.setObject(6, o.get(5));
ps.setObject(7, o.get(6));
ps.setObject(8, o.get(7));
ps.setObject(9, o.get(8));
ps.setObject(10, o.get(9));
ps.setObject(11, o.get(10));
ps.setObject(12, o.get(11));
ps.setObject(13, o.get(12));
ps.setObject(14, o.get(13));
ps.setObject(15, o.get(14));
ps.setObject(16, o.get(15));
ps.setObject(17, o.get(16));
ps.setString(18, o.get(17).toString().replace("]", ""));
ps.addBatch();
}
System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
start = System.currentTimeMillis();
System.out.println("Executing batch");
ps.executeBatch();
System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
ps.close();
}
{code}
was:
I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
{code}
Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
{code}
private static void writeData(List<List<Object>> records) throws SQLException {
PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
long start = System.currentTimeMillis();
System.out.println("Building batch PreparedStatement");
for(List<Object> o : records) {
ps.setObject(1, o.get(0));
ps.setObject(2, o.get(1));
ps.setObject(3, o.get(2));
ps.setObject(4, o.get(3));
ps.setObject(5, o.get(4));
ps.setObject(6, o.get(5));
ps.setObject(7, o.get(6));
ps.setObject(8, o.get(7));
ps.setObject(9, o.get(8));
ps.setObject(10, o.get(9));
ps.setObject(11, o.get(10));
ps.setObject(12, o.get(11));
ps.setObject(13, o.get(12));
ps.setObject(14, o.get(13));
ps.setObject(15, o.get(14));
ps.setObject(16, o.get(15));
ps.setObject(17, o.get(16));
ps.setString(18, o.get(17).toString().replace("]", ""));
ps.addBatch();
}
System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
start = System.currentTimeMillis();
System.out.println("Executing batch");
ps.executeBatch();
System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
ps.close();
}
{code}
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
> {code}
> Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
> at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
> at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
> at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
> Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
> at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
> {code}
> private static final String INSERT_TEIID = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
> private static final String INSERT_ORACLE = "insert into ...<tableA> values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
> private static void writeData(List<List<Object>> records) throws SQLException {
> PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE)
>
> long start = System.currentTimeMillis();
> System.out.println("Building batch PreparedStatement");
> for(List<Object> o : records) {
> ps.setObject(1, o.get(0));
> ps.setObject(2, o.get(1));
> ps.setObject(3, o.get(2));
> ps.setObject(4, o.get(3));
> ps.setObject(5, o.get(4));
> ps.setObject(6, o.get(5));
> ps.setObject(7, o.get(6));
> ps.setObject(8, o.get(7));
> ps.setObject(9, o.get(8));
> ps.setObject(10, o.get(9));
> ps.setObject(11, o.get(10));
> ps.setObject(12, o.get(11));
> ps.setObject(13, o.get(12));
> ps.setObject(14, o.get(13));
> ps.setObject(15, o.get(14));
> ps.setObject(16, o.get(15));
> ps.setObject(17, o.get(16));
> ps.setString(18, o.get(17).toString().replace("]", ""));
> ps.addBatch();
> }
> System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
> start = System.currentTimeMillis();
> System.out.println("Executing batch");
> ps.executeBatch();
> System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
> ps.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-4000:
------------------------------
Description:
I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
{code}
Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
{code}
private static void writeData(List<List<Object>> records) throws SQLException {
PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
long start = System.currentTimeMillis();
System.out.println("Building batch PreparedStatement");
for(List<Object> o : records) {
ps.setObject(1, o.get(0));
ps.setObject(2, o.get(1));
ps.setObject(3, o.get(2));
ps.setObject(4, o.get(3));
ps.setObject(5, o.get(4));
ps.setObject(6, o.get(5));
ps.setObject(7, o.get(6));
ps.setObject(8, o.get(7));
ps.setObject(9, o.get(8));
ps.setObject(10, o.get(9));
ps.setObject(11, o.get(10));
ps.setObject(12, o.get(11));
ps.setObject(13, o.get(12));
ps.setObject(14, o.get(13));
ps.setObject(15, o.get(14));
ps.setObject(16, o.get(15));
ps.setObject(17, o.get(16));
ps.setString(18, o.get(17).toString().replace("]", ""));
ps.addBatch();
}
System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
start = System.currentTimeMillis();
System.out.println("Executing batch");
ps.executeBatch();
System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
ps.close();
}
{code}
was:
I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
{code}
Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
Here's the Java method that creates the batch.
{code}
private static void writeData(List<List<Object>> records) throws SQLException {
PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
long start = System.currentTimeMillis();
System.out.println("Building batch PreparedStatement");
for(List<Object> o : records) {
ps.setObject(1, o.get(0));
ps.setObject(2, o.get(1));
ps.setObject(3, o.get(2));
ps.setObject(4, o.get(3));
ps.setObject(5, o.get(4));
ps.setObject(6, o.get(5));
ps.setObject(7, o.get(6));
ps.setObject(8, o.get(7));
ps.setObject(9, o.get(8));
ps.setObject(10, o.get(9));
ps.setObject(11, o.get(10));
ps.setObject(12, o.get(11));
ps.setObject(13, o.get(12));
ps.setObject(14, o.get(13));
ps.setObject(15, o.get(14));
ps.setObject(16, o.get(15));
ps.setObject(17, o.get(16));
ps.setString(18, o.get(17).toString().replace("]", ""));
ps.addBatch();
}
System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
start = System.currentTimeMillis();
System.out.println("Executing batch");
ps.executeBatch();
System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
ps.close();
}
{code}
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
> {code}
> Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
> at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
> at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
> at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
> Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
> at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Here's the Java method that creates the batch. Please ignore the lack of Java best practices. This is just test harness code to reproduce the error.
> {code}
> private static void writeData(List<List<Object>> records) throws SQLException {
> PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
>
> long start = System.currentTimeMillis();
> System.out.println("Building batch PreparedStatement");
> for(List<Object> o : records) {
> ps.setObject(1, o.get(0));
> ps.setObject(2, o.get(1));
> ps.setObject(3, o.get(2));
> ps.setObject(4, o.get(3));
> ps.setObject(5, o.get(4));
> ps.setObject(6, o.get(5));
> ps.setObject(7, o.get(6));
> ps.setObject(8, o.get(7));
> ps.setObject(9, o.get(8));
> ps.setObject(10, o.get(9));
> ps.setObject(11, o.get(10));
> ps.setObject(12, o.get(11));
> ps.setObject(13, o.get(12));
> ps.setObject(14, o.get(13));
> ps.setObject(15, o.get(14));
> ps.setObject(16, o.get(15));
> ps.setObject(17, o.get(16));
> ps.setString(18, o.get(17).toString().replace("]", ""));
> ps.addBatch();
> }
> System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
> start = System.currentTimeMillis();
> System.out.println("Executing batch");
> ps.executeBatch();
> System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
> ps.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-4000:
------------------------------
Description:
I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
{code}
Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
{code}
Here's the Java method that creates the batch.
{code}
private static void writeData(List<List<Object>> records) throws SQLException {
PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
long start = System.currentTimeMillis();
System.out.println("Building batch PreparedStatement");
for(List<Object> o : records) {
ps.setObject(1, o.get(0));
ps.setObject(2, o.get(1));
ps.setObject(3, o.get(2));
ps.setObject(4, o.get(3));
ps.setObject(5, o.get(4));
ps.setObject(6, o.get(5));
ps.setObject(7, o.get(6));
ps.setObject(8, o.get(7));
ps.setObject(9, o.get(8));
ps.setObject(10, o.get(9));
ps.setObject(11, o.get(10));
ps.setObject(12, o.get(11));
ps.setObject(13, o.get(12));
ps.setObject(14, o.get(13));
ps.setObject(15, o.get(14));
ps.setObject(16, o.get(15));
ps.setObject(17, o.get(16));
ps.setString(18, o.get(17).toString().replace("]", ""));
ps.addBatch();
}
System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
start = System.currentTimeMillis();
System.out.println("Executing batch");
ps.executeBatch();
System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
ps.close();
}
{code}
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I'm running a JDBC batch insert statement with Teiid. Here's the error I'm getting when trying to insert 45000 records.
> {code}
> Exception in thread "main" org.teiid.jdbc.TeiidSQLException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:532)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:393)
> at org.teiid.jdbc.PreparedStatementImpl.executeBatch(PreparedStatementImpl.java:252)
> at com.imshealth.common.Tuning.JdbcDriver.writeData(JdbcDriver.java:166)
> at com.imshealth.common.Tuning.JdbcDriver.main(JdbcDriver.java:78)
> Caused by: org.jboss.netty.handler.codec.frame.TooLongFrameException: Adjusted frame length exceeds 2097152: 6242128 - discarded
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.fail(LengthFieldBasedFrameDecoder.java:417)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.failIfNecessary(LengthFieldBasedFrameDecoder.java:405)
> at org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder.decode(LengthFieldBasedFrameDecoder.java:320)
> at org.teiid.transport.ObjectDecoder.decode(ObjectDecoder.java:108)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
> at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
> at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
> at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
> at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:328)
> at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
> at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Here's the Java method that creates the batch.
> {code}
> private static void writeData(List<List<Object>> records) throws SQLException {
> PreparedStatement ps = connection.prepareStatement(USE_TEIID? INSERT_TEIID : INSERT_ORACLE);
>
> long start = System.currentTimeMillis();
> System.out.println("Building batch PreparedStatement");
> for(List<Object> o : records) {
> ps.setObject(1, o.get(0));
> ps.setObject(2, o.get(1));
> ps.setObject(3, o.get(2));
> ps.setObject(4, o.get(3));
> ps.setObject(5, o.get(4));
> ps.setObject(6, o.get(5));
> ps.setObject(7, o.get(6));
> ps.setObject(8, o.get(7));
> ps.setObject(9, o.get(8));
> ps.setObject(10, o.get(9));
> ps.setObject(11, o.get(10));
> ps.setObject(12, o.get(11));
> ps.setObject(13, o.get(12));
> ps.setObject(14, o.get(13));
> ps.setObject(15, o.get(14));
> ps.setObject(16, o.get(15));
> ps.setObject(17, o.get(16));
> ps.setString(18, o.get(17).toString().replace("]", ""));
> ps.addBatch();
> }
> System.out.println(String.format("Finished building batch PreparedStatement in %d milliseconds", System.currentTimeMillis() - start));
> start = System.currentTimeMillis();
> System.out.println("Executing batch");
> ps.executeBatch();
> System.out.println(String.format("Batch executed in %d milliseconds", System.currentTimeMillis() - start));
> ps.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-4000:
------------------------------
Environment:
Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
64-bit Windows 7 environment
was:
Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
64-bit Windows 7 environment
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 patched to 6.2.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
Steve Tran created TEIID-4000:
---------------------------------
Summary: TeiidSQLException: Adjusted frame length exceeds 2097152
Key: TEIID-4000
URL: https://issues.jboss.org/browse/TEIID-4000
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7.1.6_2
Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
64-bit Windows 7 environment
Reporter: Steve Tran
Assignee: Steven Hawkins
I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
-- Table A is Oracle
-- Table B is SQL Server
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
{code}
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
VALUES (
convert("NEW".SourceSystemID, short),
convert("NEW".RecordTypeID, short),
convert("NEW".BatchID, integer)
...
)
END
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-4000) TeiidSQLException: Adjusted frame length exceeds 2097152
by Steve Tran (JIRA)
[ https://issues.jboss.org/browse/TEIID-4000?page=com.atlassian.jira.plugin... ]
Steve Tran updated TEIID-4000:
------------------------------
Description: (was: I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
Facts:
-- I can insert a record if I only select one column from tableB.
-- If I select two or more columns, it throws the error every time.
-- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
-- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
-- Table A is Oracle
-- Table B is SQL Server
My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
{code}
FOR EACH ROW
BEGIN ATOMIC
INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
VALUES (
convert("NEW".SourceSystemID, short),
convert("NEW".RecordTypeID, short),
convert("NEW".BatchID, integer)
...
)
END
{code})
> TeiidSQLException: Adjusted frame length exceeds 2097152
> --------------------------------------------------------
>
> Key: TEIID-4000
> URL: https://issues.jboss.org/browse/TEIID-4000
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3993) Teiid: indexOutOfBoundsException on union + count distinct query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3993?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3993:
---------------------------------------
Can you get the plan debug log for this? You would use "set showplan debug" or trace logging.
> Teiid: indexOutOfBoundsException on union + count distinct query
> -----------------------------------------------------------------
>
> Key: TEIID-3993
> URL: https://issues.jboss.org/browse/TEIID-3993
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.3
> Environment: Teiid 8.12.3 + posgtesDB
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
>
> I ran into IndexOfBoundsException from teiid query optimizer when running the following query:
> select "SugarCRMDataSource_public_sales_location"."country" as "SugarCRMDataSource_public_sales_location_country",
> "FoodmartDataSource_public_store"."store_country" as "FoodmartDataSource_public_store_store_country",
> '1|1' as "JS_Discriminator_COL",
> count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
> from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
> inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
> inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
> group by "SugarCRMDataSource_public_sales_location"."country", "FoodmartDataSource_public_store"."store_country"
> UNION ALL
> select "SugarCRMDataSource_public_sales_location"."country" as "SugarCRMDataSource_public_sales_location_country",
> NULL as "FoodmartDataSource_public_store_store_country",
> '1|0' as "JS_Discriminator_COL",
> count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
> from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
> inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
> inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
> group by "SugarCRMDataSource_public_sales_location"."country"
> UNION ALL
> select NULL as "SugarCRMDataSource_public_sales_location_country",
> "FoodmartDataSource_public_store"."store_country" as "FoodmartDataSource_public_store_store_country",
> '0|1' as "JS_Discriminator_COL",
> count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
> from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
> inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
> inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
> group by "FoodmartDataSource_public_store"."store_country"
> UNION ALL
> select NULL as "SugarCRMDataSource_public_sales_location_country",
> NULL as "FoodmartDataSource_public_store_store_country",
> '0|0' as "JS_Discriminator_COL",
> count(DISTINCT "SugarCRMDataSource_public_sales_fact"."amount") as "CountDistinct_SugarCRMDataSource_public_sales_fact_amount"
> from "SugarCRMDataSource_public"."sales_fact" "SugarCRMDataSource_public_sales_fact"
> inner join "SugarCRMDataSource_public"."sales_location" "SugarCRMDataSource_public_sales_location" on ("SugarCRMDataSource_public_sales_fact"."sales_location_id" = "SugarCRMDataSource_public_sales_location"."id")
> inner join "FoodmartDataSource_public"."store" "FoodmartDataSource_public_store" on ("SugarCRMDataSource_public_sales_location"."state" = "FoodmartDataSource_public_store"."store_state")
> order by "SugarCRMDataSource_public_sales_location_country", "FoodmartDataSource_public_store_store_country"
> limit 1000
> And here is the exception:
> Caused by: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
> at java.util.ArrayList.rangeCheck(ArrayList.java:635)
> at java.util.ArrayList.get(ArrayList.java:411)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setColStatEstimates(NewCalculateCostUtil.java:411)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setCardinalityEstimate(NewCalculateCostUtil.java:313)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.estimateSetOpCost(NewCalculateCostUtil.java:252)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeNodeCost(NewCalculateCostUtil.java:204)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:136)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:133)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:133)
> at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForTree(NewCalculateCostUtil.java:122)
> at org.teiid.query.optimizer.relational.rules.RuleCalculateCost.execute(RuleCalculateCost.java:50)
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:807)
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:223)
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:435)
> at org.teiid.dqp.internal.process.PreparedStatementRequest.generatePlan(PreparedStatementRequest.java:119)
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:463)
> at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:294)
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:640)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)
> ... 22 more
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3994) AliasSymbol wrapping AliasSymbol error
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3994?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3994:
---------------------------------------
What does the view definition look like exactly, and what are the definitions of all the columns/types for tableA, tableB, and the view?
> AliasSymbol wrapping AliasSymbol error
> --------------------------------------
>
> Key: TEIID-3994
> URL: https://issues.jboss.org/browse/TEIID-3994
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Environment: Red Hat JBoss Data Virtualization 6.2 on EAP6.4.0 patched to version 6.4.3,
> JBoss Developer Studio 8.1.0GA with Teiid Designer plugin 9.0.3.Final.v20150810-1438-B1157
> 64-bit Windows 7 environment
> Reporter: Steve Tran
> Assignee: Steven Hawkins
>
> I've defined a view and overrode the default triggers for Select, Insert, Update, and Delete. I overrode the triggers because the select is returning "hardcoded" values for a few fields (calling them virtual columns). The Update and Insert triggers will ignore these hardcoded values just in case the caller tries to update a virtual column.
> I'm trying to run a insert into <tableA> select * from <tableB> query. When I run this, I get an error org.teiid.jdbc.TeiidSQLException: Cannot create AliasSymbol wrapping AliasSymbol.
> Facts:
> -- I can insert a record if I only select one column from tableB.
> -- If I select two or more columns, it throws the error every time.
> -- If I remove the overridden triggers, the insert into <tableA> select * from <tableB> works fine.
> -- I can insert one or more columns into <tableA> when *not* using a insert into <tableA> select * from <tableB> query
> -- Table A is Oracle
> -- Table B is SQL Server
> My hunch is the generated query (hibernate, or whatever SQL generator) is choking with the overridden trigger. Perhaps this use-case slipped through testing, or even more probable, I made a mistake in the trigger creation.
> Here's a snip of the insert trigger, with a lot of fields removed for simplicity.
> {code}
> FOR EACH ROW
> BEGIN ATOMIC
> INSERT INTO <schema>.<tableA> (SourceSystemID, RecordTypeID, BatchID ...)
> VALUES (
> convert("NEW".SourceSystemID, short),
> convert("NEW".RecordTypeID, short),
> convert("NEW".BatchID, integer)
> ...
> )
> END
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (TEIID-3989) PartialResultsWarning not being returned
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3989?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3989.
-----------------------------------
Fix Version/s: 9.0
8.12.5
8.13.2
Resolution: Done
The fix adds handling into the ExceptionHolder so that SourceWarnings can be reconstructed. A patched server and client are required for this to work properly otherwise the previous behavior of just the TeiidSQLWarning will be seen.
> PartialResultsWarning not being returned
> ----------------------------------------
>
> Key: TEIID-3989
> URL: https://issues.jboss.org/browse/TEIID-3989
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 8.11.3, 9.0
> Reporter: Tom Arnold
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.2
>
> Attachments: TeiidTest.zip, TeiidTest2.zip, Test-vdb.xml, translator-test.zip
>
>
> I'm trying to follow the example [here|https://docs.jboss.org/author/display/TEIID/Partial+Results+Mode] to return source failure information to my app. Partial results mode does work, but I'm getting {{TeiidSQLWarning}} instead of the expected {{PartialResultsWarning}}.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months