java.sql.SQLException: Protocol violation caught while accessing a page and Oracle DB is used
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Users are not able to access particular pages in Bamboo and the following appears in the atlassian-bamboo.log
org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is
org.hibernate.TransactionException: JDBC rollback failed
at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:684)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:849)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:826)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
Caused by: org.hibernate.TransactionException: JDBC rollback failed
at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:200)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:681)
... 255 more
Caused by: java.sql.SQLException: Protocol violation: [ 0, ]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:669)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
at oracle.jdbc.driver.T4C7Ocommoncall.doOROLLBACK(T4C7Ocommoncall.java:66)
at oracle.jdbc.driver.T4CConnection.doRollback(T4CConnection.java:906)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:4539)
at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
... 256 more
Diagnosis
Environment
The
SQLException: Protocol violation
is usually caused by the JDBC driver. Please ensure that you're using the correct Database JDBC Driver in your Bamboo instance, considering your Bamboo version and Oracle version.
Cause
If you're using Oracle's ojdbc7.jar (version 12.1.0.1) to connect to your Oracle database, you're hitting a known bug with the driver itself as discussed in this StackOverflow post.
BAM-18276 - Getting issue details... STATUS
Resolution
- Stop Bamboo.
- Download ojdbc8.jar version 12.2.0.1.
- Update your JDBC driver by replacing the existing JAR file inside the
$BAMBOO_INSTALL
folder with the new one./lib
- Start Bamboo.