-
Bug
-
Resolution: Fixed
-
High
-
5.15.0.1, 5.15.2, 5.15.3, 5.15.4, 6.1.1
-
Severity 2 - Major
-
6
-
Summary
The Oracle JDBC driver bundled with Bamboo 5.15.x, ojdbc7-12.1.0.1.jar, is subject to some known bugs that may prevent Bamboo from starting on certain databases.
Steps to Reproduce
- Start Bamboo 5.15.x on a database with large values in CLOB (Character Large Object) data type fields
Expected Results
Bamboo should start normally
Actual Results
Bamboo fails to start with errors similar to the ones described in java.sql.SQLException: Protocol violation caught while accessing a page and Oracle DB is used, where an exception such as the following occurs:
2017-03-25 08:22:01,484 ERROR [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [TransactionTemplate] Application exception overridden by rollback exception org.springframework.orm.hibernate4.HibernateSystemException: IOException occurred reading text; nested exception is org.hibernate.HibernateException: IOException occurred reading text at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:218) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:344) at org.springframework.orm.hibernate4.HibernateTemplate.execute(HibernateTemplate.java:296) at com.atlassian.bamboo.repository.RepositoryDefinitionHibernateDao.findAll(RepositoryDefinitionHibernateDao.java:79) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51402ReseedServerKeyAndOids.lambda$recalculateRepositoryOids$0(UpgradeTask51402ReseedServerKeyAndOids.java:79) at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2076) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2073) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:313) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2095) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2080) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$2.doInHibernate(BambooTransactionHibernateTemplate.java:66) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341) at org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$1.doInTransaction(BambooTransactionHibernateTemplate.java:52) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:41) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:47) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.doWork(BambooTransactionHibernateTemplate.java:60) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51402ReseedServerKeyAndOids.recalculateRepositoryOids(UpgradeTask51402ReseedServerKeyAndOids.java:77) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51402ReseedServerKeyAndOids.doUpgrade(UpgradeTask51402ReseedServerKeyAndOids.java:62) at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:210) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:114) at com.atlassian.bamboo.upgrade.UpgradeLauncher.lambda$upgradeAndStartBamboo$0(UpgradeLauncher.java:111) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: org.hibernate.HibernateException: IOException occurred reading text at org.hibernate.type.descriptor.java.DataHelper.extractString(DataHelper.java:96) at org.hibernate.type.descriptor.java.DataHelper.extractString(DataHelper.java:282) at org.hibernate.type.descriptor.java.StringTypeDescriptor.wrap(StringTypeDescriptor.java:89) at org.hibernate.type.descriptor.java.StringTypeDescriptor.wrap(StringTypeDescriptor.java:39) at org.hibernate.type.descriptor.sql.ClobTypeDescriptor$1.doExtract(ClobTypeDescriptor.java:61) at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263) at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253) at com.atlassian.hibernate.BucketClobStringType.nullSafeGet(BucketClobStringType.java:90) at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:127) at org.hibernate.type.AbstractType.hydrate(AbstractType.java:106) at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2969) at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1696) at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1628) at org.hibernate.loader.Loader.getRow(Loader.java:1515) at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:726) at org.hibernate.loader.Loader.processResultSet(Loader.java:953) at org.hibernate.loader.Loader.doQuery(Loader.java:921) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355) at org.hibernate.loader.Loader.doList(Loader.java:2554) at org.hibernate.loader.Loader.doList(Loader.java:2540) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370) at org.hibernate.loader.Loader.list(Loader.java:2365) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:126) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1718) at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380) at com.atlassian.bamboo.repository.RepositoryDefinitionHibernateDao.lambda$findAll$0(RepositoryDefinitionHibernateDao.java:85) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341) ... 32 more Caused by: java.io.IOException: Protocol violation: [ 14, 121, ] at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:264) at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:195) at org.hibernate.type.descriptor.java.DataHelper.extractString(DataHelper.java:88) ... 60 more Caused by: java.sql.SQLException: Protocol violation: [ 14, 121, ] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:669) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249) at oracle.jdbc.driver.T4C8TTIClob.read(T4C8TTIClob.java:245) at oracle.jdbc.driver.T4CConnection.getChars(T4CConnection.java:3901) at oracle.sql.CLOB.getChars(CLOB.java:517) at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:245) ... 62 more
This bug in the Oracle driver caused similar issues with JIRA: JRA-60604 - Oracle Driver 12.1.0.1 throws error Protocol violation
Workaround
- Stop Bamboo
- Remove ojdbc7-12.1.0.1.jar from $BAMBOO_INSTALL/lib
- Download ojdbc8.jar version 12.2.0.1 and copy it to $BAMBOO_INSTALL/lib
- Restart Bamboo