[JBoss JIRA] Moved: (TEIID-521) Prepared statement methods addBatch() and clearBatch() can cause NullPointerException
by Steven Hawkins (JIRA)
[ https://jira.jboss.org/jira/browse/TEIID-521?page=com.atlassian.jira.plug... ]
Steven Hawkins moved JBEDSP-1017 to TEIID-521:
----------------------------------------------
Project: Teiid (was: JBoss Enterprise Data Services Platform)
Key: TEIID-521 (was: JBEDSP-1017)
Component/s: JDBC Connector
(was: JDBC)
Affects Version/s: 6.0.0
(was: 5.5.3)
(was: 5.5.2)
> Prepared statement methods addBatch() and clearBatch() can cause NullPointerException
> -------------------------------------------------------------------------------------
>
> Key: TEIID-521
> URL: https://jira.jboss.org/jira/browse/TEIID-521
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 6.0.0
> Reporter: Larry O'Leary
> Fix For: 6.1.0
>
>
> When attempting to debug an unrelated issue I discovered that the batch processing methods on a prepared statement can result in a NullPointerException depending on when the methods are called.
> For example:
> java.lang.NullPointerException
> at com.metamatrix.jdbc.MMStatement.clearBatch(MMStatement.java:274)
> at com.metamatrix.jdbc.TestPreparedStatementBatchedUpdate.testInserts(TestPreparedStatementBatchedUpdate.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Is a result of calling clearBatch() on a statement after it was done executing a batched update. It appears this is simply a need of NOT calling clearBatch() at the wrong time but I feel that we should gracefully handle this situation as a clearBatch() call may appear in a try/catch/finally block.
> The same goes for addBatch() if no parameters have been set. Not sure if we should actually throw an exception in such a case or not as it makes no sense to call addBatch() with no parameters defined but it would also make sense that we would not throw a nasty NPE in such a case.
> I have only seen this on R050502 and R050503 and have not looked at R050504c or Teiid.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months
[JBoss JIRA] Updated: (TEIID-521) Prepared statement methods addBatch() and clearBatch() can cause NullPointerException
by Steven Hawkins (JIRA)
[ https://jira.jboss.org/jira/browse/TEIID-521?page=com.atlassian.jira.plug... ]
Steven Hawkins updated TEIID-521:
---------------------------------
Fix Version/s: 6.1.0
Complexity: Low
> Prepared statement methods addBatch() and clearBatch() can cause NullPointerException
> -------------------------------------------------------------------------------------
>
> Key: TEIID-521
> URL: https://jira.jboss.org/jira/browse/TEIID-521
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 6.0.0
> Reporter: Larry O'Leary
> Fix For: 6.1.0
>
>
> When attempting to debug an unrelated issue I discovered that the batch processing methods on a prepared statement can result in a NullPointerException depending on when the methods are called.
> For example:
> java.lang.NullPointerException
> at com.metamatrix.jdbc.MMStatement.clearBatch(MMStatement.java:274)
> at com.metamatrix.jdbc.TestPreparedStatementBatchedUpdate.testInserts(TestPreparedStatementBatchedUpdate.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Is a result of calling clearBatch() on a statement after it was done executing a batched update. It appears this is simply a need of NOT calling clearBatch() at the wrong time but I feel that we should gracefully handle this situation as a clearBatch() call may appear in a try/catch/finally block.
> The same goes for addBatch() if no parameters have been set. Not sure if we should actually throw an exception in such a case or not as it makes no sense to call addBatch() with no parameters defined but it would also make sense that we would not throw a nasty NPE in such a case.
> I have only seen this on R050502 and R050503 and have not looked at R050504c or Teiid.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months
[JBoss JIRA] Updated: (TEIID-520) removing the Resource Connection Pool administration option in the console for Westport.
by Steven Hawkins (JIRA)
[ https://jira.jboss.org/jira/browse/TEIID-520?page=com.atlassian.jira.plug... ]
Steven Hawkins updated TEIID-520:
---------------------------------
Fix Version/s: 6.1.0
> removing the Resource Connection Pool administration option in the console for Westport.
> ----------------------------------------------------------------------------------------
>
> Key: TEIID-520
> URL: https://jira.jboss.org/jira/browse/TEIID-520
> Project: Teiid
> Issue Type: Feature Request
> Components: Console, Documentation
> Affects Versions: Westport
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Minor
> Fix For: Westport
>
>
> removing the Resource Connection Pool administration option in the console for Westport.
> Why?
> 1. Because we developed 2 connection pooling frameworks in our product, and we don't need them both
> 2. The Resource Connection Pool never became a feature of any value to the product, just overhead in the maintenance department
> 3. Removing it from exposure will enable the server to eliminate multiple locations of connection properties (1. config.xml and 2. metamatrix.properties). The config.xml will no longer contain the ConnectionPool section.
> 4. Remove any confusion in the console as to administrating the connection pool.
> However, the monitoring of the Resource Connection Pool will still be seen in the console, so that monitoring of the connections can still be done (unless there's a decision to remove it also).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 8 months