ORA-01882:Groovy找不到时区区域

时间:2016-05-11 16:29:55

标签: oracle hibernate groovy bamboo

我们已将我们的构建从Jenkins迁移到Bamboo。我的构建正在做一个干净的测试应用程序。

单元测试完成后,我的集成测试将连接到Oracle数据库。

当Oracle \ Hibernate连接连接时,我收到以下错误。如何在连接Oracle之前设置此错误。我看到示例或者在获取连接以设置时区之前,但我没有看到在连线之前设置此示例的示例。

我也看到我可以在参数中设置它,如下面的

JAVA_OPTS="-Duser.timezone=UTC -Xmx4096m -XX:MaxPermSize=2048m"

但似乎Build不尊重该变量

> build 11-May-2016 11:09:10    Configuring Spring Security Core ...
>     build 11-May-2016 11:09:10    ... finished configuring Spring Security Core
>     build 11-May-2016 11:09:10    [company-jms] - Wiring up JMS beans...
>     build 11-May-2016 11:09:10    Configuring Spring Security CAS ...
>     build 11-May-2016 11:09:10    ... finished configuring Spring Security CAS
>     build 11-May-2016 11:09:13    | Error Fatal error running tests: Error creating bean with name 'transactionManagerPostProcessor':
> Initialization of bean failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'transactionManager': Cannot resolve reference
> to bean '$primaryTransactionManager' while setting constructor
> argument with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name '$primaryTransactionManager': Cannot resolve
> reference to bean 'sessionFactory' while setting bean property
> 'sessionFactory'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'sessionFactory': Cannot resolve reference to
> bean 'lobHandlerDetector' while setting bean property 'lobHandler';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'lobHandlerDetector': Invocation of init
> method failed; nested exception is
> org.springframework.jdbc.support.MetaDataAccessException: Error while
> extracting DatabaseMetaData; nested exception is
> java.sql.SQLException: ORA-00604: error occurred at recursive SQL
> level 1
>     build 11-May-2016 11:09:13    ORA-01882: timezone region not found
>     build 11-May-2016 11:09:13    org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name 'transactionManagerPostProcessor':
> Initialization of bean failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'transactionManager': Cannot resolve reference
> to bean '$primaryTransactionManager' while setting constructor
> argument with key [0]; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name '$primaryTransactionManager': Cannot resolve
> reference to bean 'sessionFactory' while setting bean property
> 'sessionFactory'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'sessionFactory': Cannot resolve reference to
> bean 'lobHandlerDetector' while setting bean property 'lobHandler';
> nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'lobHandlerDetector': Invocation of init
> method failed; nested exception is
> org.springframework.jdbc.support.MetaDataAccessException: Error while
> extracting DatabaseMetaData; nested exception is
> java.sql.SQLException: ORA-00604: error occurred at recursive SQL
> level 1
>     build 11-May-2016 11:09:13    ORA-01882: timezone region not found
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
>     build 11-May-2016 11:09:13        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)
>     build 11-May-2016 11:09:13        at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:199)
>     build 11-May-2016 11:09:13        at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:620)
>     build 11-May-2016 11:09:13        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:467)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:156)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.initializeContext(GrailsRuntimeConfigurator.java:188)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:168)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.project.loader.GrailsProjectLoader$_configureApplication_closure3.doCall(GrailsProjectLoader.groovy:134)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.project.loader.GrailsProjectLoader$_configureApplication_closure3.call(GrailsProjectLoader.groovy)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.cli.api.BaseSettingsApi.profile(BaseSettingsApi.java:342)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.project.loader.GrailsProjectLoader.configureApplication(GrailsProjectLoader.groovy:131)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.phase.IntegrationTestPhaseConfigurer.prepare(IntegrationTestPhaseConfigurer.groovy:60)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.phase.TestPhaseConfigurer$prepare.call(Unknown
> Source)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.phase.TestPhaseConfigurer$prepare.call(Unknown
> Source)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe(AbstractCallSite.java:89)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner$_runAllTests_closure7.doCall(GrailsProjectTestRunner.groovy:309)
>     build 11-May-2016 11:09:13        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     build 11-May-2016 11:09:13        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>     build 11-May-2016 11:09:13        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     build 11-May-2016 11:09:13        at java.lang.reflect.Method.invoke(Method.java:606)
>     build 11-May-2016 11:09:13        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1276)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>     build 11-May-2016 11:09:13        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>     build 11-May-2016 11:09:13        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1206)
>     build 11-May-2016 11:09:13        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1120)
>     build 11-May-2016 11:09:13        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1015)
>     build 11-May-2016 11:09:13        at groovy.lang.Closure.call(Closure.java:423)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:4271)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1408)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.dgm$151.invoke(Unknown Source)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy:299)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy:214)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner$runAllTests$0.call(Unknown
> Source)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.cli.fork.testing.ForkedGrailsTestRunner.runInstance(ForkedGrailsTestRunner.groovy:128)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.cli.fork.ForkedGrailsProjectClassExecutor.run(ForkedGrailsProjectClassExecutor.groovy:74)
>     build 11-May-2016 11:09:13        at org.codehaus.groovy.grails.cli.fork.testing.ForkedGrailsTestRunner.main(ForkedGrailsTestRunner.groovy:75)

1 个答案:

答案 0 :(得分:0)

我发现的是我的版本com.oracle:ojdbc6:11.2.0.1.0必须改回com.oracle:ojdbc6:11.1.0.7.0

然后发布清理