[jira] [Created] (AMQ-5318) JDBC store; commit called on connection that uses autocommit during deleteAllMessages .

2014-08-09 Thread Pat Fox (JIRA)
Pat Fox created AMQ-5318:


 Summary: JDBC store; commit called on connection that uses 
autocommit during deleteAllMessages .
 Key: AMQ-5318
 URL: https://issues.apache.org/jira/browse/AMQ-5318
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.10.0
Reporter: Pat Fox
Priority: Minor


The oracle v12 driver throws the following exception if commit() is called on a 
connection that has auto-commit enabled(see [1]) . This seems to be a change in 
behaviour since v11.  

{code}

caused by: java.sql.SQLException: Could not commit with auto-commit set on
at 
oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at 
oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at 
org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
at 
org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
at 
org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211)
at 
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDropTables(DefaultJDBCAdapter.java:148)
at 
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.deleteAllMessages(JDBCPersistenceAdapter.java:534)
... 40 more

{code}


In the org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() 
it explicitly calls connection.commit() without checking if auto-commit is 
enabled.  In other places auto-commit does seem to be checked before commit is 
called  - org.apache.activemq.store.jdbc.TransactionContext#commit().

The v12 driver does allow  autocommit-SpecCompliance to be turned off by 
setting system property oracle.jdbc.autoCommitSpecCompliant=false. But it 
does seem like 
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() is not 
strictly adhering to the spec. 

I think it would be better to do a check if auto-commit is on before calling 
connection.commit(). 


I will attach a github pull request with test and potential fix - for someone 
to review.




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[GitHub] activemq pull request: AMQ-5318: JDBC store; commit called on conn...

2014-08-09 Thread pgfox
GitHub user pgfox opened a pull request:

https://github.com/apache/activemq/pull/43

AMQ-5318: JDBC store; commit called on connection that uses autocommit 
during deleteAllMessages

issue reported at AMQ-5318


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pgfox/activemq jdbcAutoCommitCheck

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #43


commit 5a52536e409eae5dfae69ddb03e2dfa31112f90c
Author: pgf pat.g@gmail.com
Date:   2014-08-09T14:27:40Z

added a check for autocommit before calling commit when dropping and 
creating tables + test case.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (AMQ-5318) JDBC store; commit called on connection that uses autocommit during deleteAllMessages .

2014-08-09 Thread Pat Fox (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091812#comment-14091812
 ] 

Pat Fox commented on AMQ-5318:
--

github pull request. https://github.com/apache/activemq/pull/43


 JDBC store; commit called on connection that uses autocommit during 
 deleteAllMessages .
 -

 Key: AMQ-5318
 URL: https://issues.apache.org/jira/browse/AMQ-5318
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.10.0
Reporter: Pat Fox
Priority: Minor

 The oracle v12 driver throws the following exception if commit() is called on 
 a connection that has auto-commit enabled(see [1]) . This seems to be a 
 change in behaviour since v11.  
 {code}
 caused by: java.sql.SQLException: Could not commit with auto-commit set on
   at 
 oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
   at 
 oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
   at 
 org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at 
 org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at 
 org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211)
   at 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDropTables(DefaultJDBCAdapter.java:148)
   at 
 org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.deleteAllMessages(JDBCPersistenceAdapter.java:534)
   ... 40 more
 {code}
 In the 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() it 
 explicitly calls connection.commit() without checking if auto-commit is 
 enabled.  In other places auto-commit does seem to be checked before commit 
 is called  - org.apache.activemq.store.jdbc.TransactionContext#commit().
 The v12 driver does allow  autocommit-SpecCompliance to be turned off by 
 setting system property oracle.jdbc.autoCommitSpecCompliant=false. But it 
 does seem like 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() is 
 not strictly adhering to the spec. 
 I think it would be better to do a check if auto-commit is on before calling 
 connection.commit(). 
 I will attach a github pull request with test and potential fix - for someone 
 to review.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (AMQ-5318) JDBC store; commit called on connection that uses autocommit during deleteAllMessages .

2014-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-5318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14091811#comment-14091811
 ] 

ASF GitHub Bot commented on AMQ-5318:
-

GitHub user pgfox opened a pull request:

https://github.com/apache/activemq/pull/43

AMQ-5318: JDBC store; commit called on connection that uses autocommit 
during deleteAllMessages

issue reported at AMQ-5318


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/pgfox/activemq jdbcAutoCommitCheck

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/activemq/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #43


commit 5a52536e409eae5dfae69ddb03e2dfa31112f90c
Author: pgf pat.g@gmail.com
Date:   2014-08-09T14:27:40Z

added a check for autocommit before calling commit when dropping and 
creating tables + test case.




 JDBC store; commit called on connection that uses autocommit during 
 deleteAllMessages .
 -

 Key: AMQ-5318
 URL: https://issues.apache.org/jira/browse/AMQ-5318
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.10.0
Reporter: Pat Fox
Priority: Minor

 The oracle v12 driver throws the following exception if commit() is called on 
 a connection that has auto-commit enabled(see [1]) . This seems to be a 
 change in behaviour since v11.  
 {code}
 caused by: java.sql.SQLException: Could not commit with auto-commit set on
   at 
 oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
   at 
 oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
   at 
 org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at 
 org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at 
 org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211)
   at 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDropTables(DefaultJDBCAdapter.java:148)
   at 
 org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.deleteAllMessages(JDBCPersistenceAdapter.java:534)
   ... 40 more
 {code}
 In the 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() it 
 explicitly calls connection.commit() without checking if auto-commit is 
 enabled.  In other places auto-commit does seem to be checked before commit 
 is called  - org.apache.activemq.store.jdbc.TransactionContext#commit().
 The v12 driver does allow  autocommit-SpecCompliance to be turned off by 
 setting system property oracle.jdbc.autoCommitSpecCompliant=false. But it 
 does seem like 
 org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter#doDropTables() is 
 not strictly adhering to the spec. 
 I think it would be better to do a check if auto-commit is on before calling 
 connection.commit(). 
 I will attach a github pull request with test and potential fix - for someone 
 to review.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


Build failed in Jenkins: ActiveMQ-Trunk-Deploy ยป ActiveMQ :: Performance Test Plugin #1024

2014-08-09 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/1024/

--
[INFO] 
[INFO] 
[INFO] Building ActiveMQ :: Performance Test Plugin 5.11-SNAPSHOT
[INFO] 
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ 
activemq-perf-maven-plugin ---
[INFO] Deleting 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/target
[INFO] 
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (default) @ 
activemq-perf-maven-plugin ---
[INFO] 
[INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (cleanVersions) @ 
activemq-perf-maven-plugin ---
[INFO] 
[INFO] --- maven-plugin-plugin:3.1:descriptor (default-descriptor) @ 
activemq-perf-maven-plugin ---
[INFO] Using 'UTF-8' encoding to read mojo metadata.
[INFO] Applying mojo extractor for language: java-annotations
[INFO] Mojo extractor for language: java-annotations found 0 mojo descriptors.
[INFO] Applying mojo extractor for language: java
[INFO] Mojo extractor for language: java found 3 mojo descriptors.
[INFO] Applying mojo extractor for language: bsh
[INFO] Mojo extractor for language: bsh found 0 mojo descriptors.
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ 
activemq-perf-maven-plugin ---
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ 
activemq-perf-maven-plugin ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ 
activemq-perf-maven-plugin ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 43 source files to 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/target/classes
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java:[60,35]
 toURL() in java.io.File has been deprecated
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java:[67,54]
 toURL() in java.io.File has been deprecated
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java:[74,48]
 non-varargs call of varargs method with inexact argument type for last 
parameter;
  cast to java.lang.Object for a varargs call
  cast to java.lang.Object[] for a non-varargs call and to suppress this warning
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java:[205,77]
 non-varargs call of varargs method with inexact argument type for last 
parameter;
  cast to java.lang.Object for a varargs call
  cast to java.lang.Object[] for a non-varargs call and to suppress this warning
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java:[215,80]
 non-varargs call of varargs method with inexact argument type for last 
parameter;
  cast to java.lang.Object for a varargs call
  cast to java.lang.Object[] for a non-varargs call and to suppress this warning
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/maven/ProducerMojo.java:
 Some input files use unchecked or unsafe operations.
[WARNING] 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/main/java/org/apache/activemq/maven/ProducerMojo.java:
 Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
activemq-perf-maven-plugin ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/org.apache.activemq.tooling$activemq-perf-maven-plugin/ws/src/test/resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 
activemq-perf-maven-plugin ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to 

Build failed in Jenkins: ActiveMQ-Trunk-Deploy #1024

2014-08-09 Thread Apache Jenkins Server
See https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/1024/

--
[...truncated 14706 lines...]
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-runtime-config/target/activemq-runtime-config-5.11-SNAPSHOT-sources.jar
 to 
org.apache.activemq/activemq-runtime-config/5.11-20140809.224138-60/activemq-runtime-config-5.11-20140809.224138-60-sources.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-runtime-config/target/activemq-runtime-config-5.11-SNAPSHOT-javadoc.jar
 to 
org.apache.activemq/activemq-runtime-config/5.11-20140809.224138-60/activemq-runtime-config-5.11-20140809.224138-60-javadoc.jar
Sending artifact delta relative to ActiveMQ-Trunk-Deploy ? ActiveMQ :: Runtime 
Configuration #1023
Archived 4 artifacts
Archive block size is 32768
Received 0 blocks and 24281432 bytes
Compression is 0.0%
Took 17 sec
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-pool/pom.xml 
to 
org.apache.activemq/activemq-pool/5.11-SNAPSHOT/activemq-pool-5.11-SNAPSHOT.pom
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-pool/target/activemq-pool-5.11-SNAPSHOT.jar
 to 
org.apache.activemq/activemq-pool/5.11-20140809.223614-60/activemq-pool-5.11-20140809.223614-60.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-pool/target/activemq-pool-5.11-SNAPSHOT-sources.jar
 to 
org.apache.activemq/activemq-pool/5.11-20140809.223614-60/activemq-pool-5.11-20140809.223614-60-sources.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-pool/target/activemq-pool-5.11-SNAPSHOT-javadoc.jar
 to 
org.apache.activemq/activemq-pool/5.11-20140809.223614-60/activemq-pool-5.11-20140809.223614-60-javadoc.jar
Sending artifact delta relative to ActiveMQ-Trunk-Deploy ? ActiveMQ :: Pool 
#1023
Archived 4 artifacts
Archive block size is 32768
Received 0 blocks and 114682 bytes
Compression is 0.0%
Took 95 ms
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-stomp/pom.xml 
to 
org.apache.activemq/activemq-stomp/5.11-SNAPSHOT/activemq-stomp-5.11-SNAPSHOT.pom
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-stomp/target/activemq-stomp-5.11-SNAPSHOT.jar
 to 
org.apache.activemq/activemq-stomp/5.11-20140809.223405-60/activemq-stomp-5.11-20140809.223405-60.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-stomp/target/activemq-stomp-5.11-SNAPSHOT-sources.jar
 to 
org.apache.activemq/activemq-stomp/5.11-20140809.223405-60/activemq-stomp-5.11-20140809.223405-60-sources.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-stomp/target/activemq-stomp-5.11-SNAPSHOT-javadoc.jar
 to 
org.apache.activemq/activemq-stomp/5.11-20140809.223405-60/activemq-stomp-5.11-20140809.223405-60-javadoc.jar
Sending artifact delta relative to ActiveMQ-Trunk-Deploy ? ActiveMQ :: STOMP 
Protocol #1023
Archived 4 artifacts
Archive block size is 32768
Received 0 blocks and 549771 bytes
Compression is 0.0%
Took 0.25 sec
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-run/dependency-reduced-pom.xml
 to 
org.apache.activemq/activemq-run/5.11-SNAPSHOT/activemq-run-5.11-SNAPSHOT.pom
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-run/target/activemq-run-5.11-SNAPSHOT.jar
 to 
org.apache.activemq/activemq-run/5.11-20140809.224008-60/activemq-run-5.11-20140809.224008-60.jar
Sending artifact delta relative to ActiveMQ-Trunk-Deploy ? ActiveMQ :: Run Jar 
#1023
Archived 2 artifacts
Archive block size is 32768
Received 0 blocks and 19043 bytes
Compression is 0.0%
Took 15 ms
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-mqtt/pom.xml 
to 
org.apache.activemq/activemq-mqtt/5.11-SNAPSHOT/activemq-mqtt-5.11-SNAPSHOT.pom
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-mqtt/target/activemq-mqtt-5.11-SNAPSHOT.jar
 to 
org.apache.activemq/activemq-mqtt/5.11-20140809.223417-60/activemq-mqtt-5.11-20140809.223417-60.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-mqtt/target/activemq-mqtt-5.11-SNAPSHOT-sources.jar
 to 
org.apache.activemq/activemq-mqtt/5.11-20140809.223417-60/activemq-mqtt-5.11-20140809.223417-60-sources.jar
[JENKINS] Archiving 
https://builds.apache.org/job/ActiveMQ-Trunk-Deploy/ws/activemq-mqtt/target/activemq-mqtt-5.11-SNAPSHOT-javadoc.jar
 to 
org.apache.activemq/activemq-mqtt/5.11-20140809.223417-60/activemq-mqtt-5.11-20140809.223417-60-javadoc.jar
Sending artifact delta relative to ActiveMQ-Trunk-Deploy ? ActiveMQ :: MQTT 
Protocol #1023
Archived 4 artifacts
Archive block size is 32768
Received 0 blocks and 420408 bytes
Compression is 0.0%
Took 0.17 sec
[JENKINS] Archiving