Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDTrace 加载oracle 失败导致应用启动失败 #87

Open
lrwh opened this issue Jun 21, 2024 · 4 comments
Open

DDTrace 加载oracle 失败导致应用启动失败 #87

lrwh opened this issue Jun 21, 2024 · 4 comments

Comments

@lrwh
Copy link
Collaborator

lrwh commented Jun 21, 2024

DDTrace: 1.30.1-guance
JDK : openjdk9

启动异常信息如下:

[dd.trace 2024-06-20 15:37:54:430 +0800] [dd-task-scheduler] DEBUG datadog.telemetry.dependency.DependencyResolverQueue - dependency detected [Dependency{name='org.glassfish:jakarta.el', version='3.0.3', source='jakarta.el-3.0.3.jar', hash='null'}] for jar:file:/tarzan-method.jar!/BOOT-INF/lib/jakarta.el-3.0.3.jar!/
[dd.trace 2024-06-20 15:37:54:430 +0800] [dd-task-scheduler] DEBUG datadog.telemetry.dependency.DependencyService - Resolved dependency org.glassfish:jakarta.el
2024-06-20 15:37:54.662|THREAD-1-main|ERROR|tarzan-method|traceId:|TENANT-|USER-|API-|com.zaxxer.hikari.pool.HikariPool       : HikariPool-1 - Exception during pool initialization.
java.sql.SQLException: Locale not recognized
	at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1059)
	at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:261)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:565)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
	at io.choerodon.mybatis.MybatisMapperAutoConfiguration.dialect(MybatisMapperAutoConfiguration.java:224)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$347.0000000081448490.getObject(Unknown Source)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318)
	at org.tarzan.method.TarzanMethodApplication.main(TarzanMethodApplication.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
2024-06-20 15:37:54.664|THREAD-1-main|ERROR|tarzan-method|traceId:|TENANT-|USER-|API-|i.c.m.MybatisMapperAutoConfiguration    : [sql exception]
java.sql.SQLException: Locale not recognized
	at oracle.jdbc.driver.T4CTTIoauthenticate.setSessionFields(T4CTTIoauthenticate.java:1059)
	at oracle.jdbc.driver.T4CTTIoauthenticate.<init>(T4CTTIoauthenticate.java:261)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:565)
	at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)
	at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:358)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:477)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:560)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
	at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
	at io.choerodon.mybatis.MybatisMapperAutoConfiguration.dialect(MybatisMapperAutoConfiguration.java:224)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$347.0000000081448490.getObject(Unknown Source)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:771)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:763)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:438)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:339)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1329)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1318)
	at org.tarzan.method.TarzanMethodApplication.main(TarzanMethodApplication.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
2024-06-20 15:37:54.669|THREAD-1-main|WARN |tarzan-method|traceId:|TENANT-|USER-|API-|ConfigServletWebServerApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect' defined in class path resource [io/choerodon/mybatis/MybatisMapperAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.choerodon.mybatis.pagehelper.Dialect]: Factory method 'dialect' threw exception; nested exception is java.sql.SQLException: Locale not recognized
@lrwh
Copy link
Collaborator Author

lrwh commented Jun 21, 2024

去掉 ddtrace ,应用正常,日志如下:

2024-06-20 09:43:29.961|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|c.u.j.r.DefaultLazyPropertyResolver     : Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-06-20 09:43:29.961|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|c.u.j.d.DefaultLazyPropertyDetector     : Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-06-20 09:43:32.263|THREAD-1-main|WARN |tarzan-method|traceId:|TENANT-|USER-|API-|io.undertow.websockets.jsr              : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2024-06-20 09:43:32.312|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|io.undertow.servlet                     : Initializing Spring embedded WebApplicationContext
2024-06-20 09:43:32.312|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|w.s.c.ServletWebServerApplicationContext: Root WebApplicationContext: initialization completed in 11056 ms
2024-06-20 09:43:33.361|THREAD-1-main|WARN |tarzan-method|traceId:|TENANT-|USER-|API-|o.s.s.o.p.t.s.JwtAccessTokenConverter   : Unable to create an RSA verifier from verifierKey (ignoreable if using MAC)
2024-06-20 09:43:34.936|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|com.zaxxer.hikari.HikariDataSource      : HikariPool-1 - Starting...
2024-06-20 09:43:36.633|THREAD-1-main|INFO |tarzan-method|traceId:|TENANT-|USER-|API-|com.zaxxer.hikari.HikariDataSource      : HikariPool-1 - Start completed.

@lrwh
Copy link
Collaborator Author

lrwh commented Jun 21, 2024

可以先用参数 -Ddd.instrumentation.jdbc.enabled=false 或者环境变量的方式DD_INSTRUMENTATION_JDBC_ENABLED=false关闭jdbc,保证业务先行。

@lrwh lrwh pinned this issue Jun 28, 2024
@lrwh lrwh unpinned this issue Jun 28, 2024
@lrwh
Copy link
Collaborator Author

lrwh commented Jul 4, 2024

补充: com/zaxxer/HikariCP/3.4.5/HikariCP-3.4.5.jar

@lrwh
Copy link
Collaborator Author

lrwh commented Jul 4, 2024

本机测试,无异常
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant