-
Bug
-
Resolution: Fixed
-
Low
-
None
-
7.6.9, 7.13.2
-
7.06
-
29
-
Severity 1 - Critical
-
58
-
Summary
Starting JIRA 7.6.6, JIRA is shipped with Oracle JDBC driver 12.2.0.1.0 (ojdbc8-atlassian-hosted-12.2.0.1.jar) due to a known bug in JRASERVER-60604. However, this newly shipped driver has a bug that Oracle already identified and it is patched with (Oracle patch # 26051289).
Environment
- Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options - JIRA 7.6.9
Steps to Reproduce
- Setup JIRA and connect it to DB.
- Restore the XML backup for an upgrade or migration.
Expected Results
Expecting the restoration to proceed without issues.
Actual Results
The below exception is thrown in the atlassian-jira.log file:
2018-11-13 09:48:40,359 JIRA-Bootstrap ERROR [c.a.s.core.upgrade.PluginUpgrader] Upgrade failed: There was a SQL exception thrown by the Active Objects library: Database: - name:Oracle - version:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options - minor version:1 - major version:12 Driver: - name:Oracle JDBC driver - version:12.2.0.1.0 java.sql.SQLException: Invalid argument(s) in call com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library: Database: - name:Oracle - version:Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options - minor version:1 - major version:12 Driver: - name:Oracle JDBC driver - version:12.2.0.1.0 java.sql.SQLException: Invalid argument(s) in call at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:94) at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:266) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy2223.create(Unknown Source) at com.atlassian.plugins.whitelist.core.ao.AoWhitelistRuleDao.add(AoWhitelistRuleDao.java:38) at com.atlassian.plugins.whitelist.core.WhitelistManagerImpl$1$1.apply(WhitelistManagerImpl.java:66) at com.atlassian.plugins.whitelist.core.WhitelistManagerImpl$1$1.apply(WhitelistManagerImpl.java:60) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:271) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:226) at com.atlassian.plugins.whitelist.core.WhitelistManagerImpl$1.doInTransaction(WhitelistManagerImpl.java:59) at com.atlassian.plugins.whitelist.core.WhitelistManagerImpl$1.doInTransaction(WhitelistManagerImpl.java:55) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy2252.execute(Unknown Source) at com.atlassian.plugins.whitelist.core.WhitelistManagerImpl.addAll(WhitelistManagerImpl.java:54) at com.atlassian.plugins.whitelist.core.migration.ApplicationLinksMigration$1.doInTransaction(ApplicationLinksMigration.java:54) at com.atlassian.plugins.whitelist.core.migration.ApplicationLinksMigration$1.doInTransaction(ApplicationLinksMigration.java:49) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy2252.execute(Unknown Source) at com.atlassian.plugins.whitelist.core.migration.ApplicationLinksMigration.doUpgrade(ApplicationLinksMigration.java:48) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) at com.sun.proxy.$Proxy839.doUpgrade(Unknown Source) at com.atlassian.sal.core.upgrade.PluginUpgrader.doUpgrade(PluginUpgrader.java:72) at com.atlassian.sal.core.upgrade.PluginUpgrader.upgrade(PluginUpgrader.java:57) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager$1.doInTransaction(DefaultPluginUpgradeManager.java:198) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager$1.doInTransaction(DefaultPluginUpgradeManager.java:173) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:34) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy405.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgradePlugin(DefaultPluginUpgradeManager.java:173) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgradeInternal(DefaultPluginUpgradeManager.java:152) at com.atlassian.sal.jira.upgrade.JiraPluginUpgradeManager.upgradeInternal(JiraPluginUpgradeManager.java:49) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.upgrade(DefaultPluginUpgradeManager.java:136) at com.atlassian.sal.core.upgrade.DefaultPluginUpgradeManager.onStart(DefaultPluginUpgradeManager.java:80) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:277) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$4.consume(DefaultLifecycleManager.java:274) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecyleAware(DefaultLifecycleManager.java:303) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyOnStartIfStartedAndEnabled(DefaultLifecycleManager.java:273) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.access$300(DefaultLifecycleManager.java:49) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:235) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager$3.evaluate(DefaultLifecycleManager.java:232) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyLifecycleAwares(DefaultLifecycleManager.java:258) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.notifyStartableLifecycleAwares(DefaultLifecycleManager.java:231) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.startIfApplicationSetup(DefaultLifecycleManager.java:219) at com.atlassian.sal.core.lifecycle.DefaultLifecycleManager.start(DefaultLifecycleManager.java:210) at com.atlassian.sal.jira.lifecycle.JiraLifecycleManager.onJiraStart(JiraLifecycleManager.java:64) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38) at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:88) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:204) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:115) at com.atlassian.plugin.event.impl.DefaultPluginEventManager.broadcast(DefaultPluginEventManager.java:83) at com.atlassian.jira.upgrade.PluginUpgradeLauncher.start(PluginUpgradeLauncher.java:29) at com.atlassian.jira.startup.ActiveServicesLauncher.start(ActiveServicesLauncher.java:52) at com.atlassian.jira.startup.DefaultJiraLauncher.postDBActivated(DefaultJiraLauncher.java:181) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$postDbLaunch$2(DefaultJiraLauncher.java:155) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:304) at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:199) at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:146) at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$0(DefaultJiraLauncher.java:105) at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31) at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:103) at com.atlassian.jira.startup.LauncherContextListener.initSlowStuff(LauncherContextListener.java:157) at java.lang.Thread.run(Thread.java:748) Caused by: java.sql.SQLException: Invalid argument(s) in call at oracle.jdbc.driver.AutoKeyInfo.getNewSql(AutoKeyInfo.java:187) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:4342) at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:802) at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:802) at org.ofbiz.core.entity.jdbc.interceptors.connection.DelegatingConnection.prepareStatement(DelegatingConnection.java:177) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at net.java.ao.DelegateConnectionHandler.delegate(DelegateConnectionHandler.java:118) at net.java.ao.DelegateConnectionHandler.invoke(DelegateConnectionHandler.java:85) at com.sun.proxy.$Proxy3542.prepareStatement(Unknown Source) at net.java.ao.db.OracleDatabaseProvider.executeInsertReturningKey(OracleDatabaseProvider.java:302) at net.java.ao.DatabaseProvider.insertReturningKey(DatabaseProvider.java:1869) at net.java.ao.EntityManager.create(EntityManager.java:366) at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:92) ... 179 more
Notes
Snippet from stack-trace above:
Caused by: java.sql.SQLException: Invalid argument(s) in call at oracle.jdbc.driver.AutoKeyInfo.getNewSql(AutoKeyInfo.java:187) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:4342) at org.apache.commons.dbcp2.DelegatingConnection.prepareStatement(DelegatingConnection.java:802) ...
- The issue is caused by a bug in Oracle documented here: https://support.oracle.com/knowledge/Middleware/2278611_1.html
PrepareStatement(string, String[]) Failing Due To Upgrade From Ojdbc7 To Ojdbc8 With "java.sql.SQLException: Invalid argument(s) in call" Error
- This bug and the previous bug (JRASERVER-60604) has formed a dead loop if the customer were to be affected by both of the issues which make this is a pretty critical bug.
Workaround
Downgrade Oracle driver from version 12.2.0.1.0 to 12.1.0.2.0.
- Stop your JIRA.
- Download the ojdbc7.jar driver from here: https://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html.
- Place the newly downloaded driver into this $JIRA_INSTALL/lib directory.
- Remove the existing driver with the version 12.2.0.1.0.
- Restart your JIRA and check if the issue persists.
- is caused by
-
JRASERVER-60604 Jira throws protocol violation error when reindexing due to outdated Oracle driver
- Closed
- is related to
-
JRASERVER-61007 AO sequences are missing in XML backups created using the Oracle JDBC driver 12.1.0.2
- Closed
- relates to
-
BAM-19682 Oracle Security Patched DB Driver Not Working
- Closed
- mentioned in
-
Page Loading...