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

oracle连接正常,同步时提示不支持的字符集 #205

Open
RonCantWriteCode opened this issue May 25, 2022 · 4 comments
Open

oracle连接正常,同步时提示不支持的字符集 #205

RonCantWriteCode opened this issue May 25, 2022 · 4 comments

Comments

@RonCantWriteCode
Copy link

Exception in thread "projectSyncTaskThreadPoolTaskExecutor-9" java.lang.IllegalStateException: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
at com.databasir.core.meta.repository.impl.jdbc.JdbcDatabaseMetaRepository.select(JdbcDatabaseMetaRepository.java:60)
at com.databasir.core.Databasir.get(Databasir.java:30)
at com.databasir.core.domain.document.service.DocumentService.retrieveDatabaseMeta(DocumentService.java:144)
at com.databasir.core.domain.document.service.DocumentService.syncByProjectId(DocumentService.java:94)
at com.databasir.core.domain.document.service.DocumentService$$FastClassBySpringCGLIB$$122722d1.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at com.databasir.core.domain.document.service.DocumentService$$EnhancerBySpringCGLIB$$183cc58f.syncByProjectId()
at com.databasir.job.ProjectSyncTaskScheduler.sync(ProjectSyncTaskScheduler.java:53)
at com.databasir.job.ProjectSyncTaskScheduler.lambda$startSyncTask$0(ProjectSyncTaskScheduler.java:45)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:240)
at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:201)
at oracle.jdbc.driver.PhysicalConnection.throughDbCharset(PhysicalConnection.java:11312)
at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:11392)
at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:7230)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4649)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:363)
at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:662)
at com.databasir.core.meta.repository.impl.jdbc.JdbcDatabaseMetaRepository.select(JdbcDatabaseMetaRepository.java:45)
... 20 more
Exception in thread "projectSyncTaskThreadPoolTaskExecutor-11" java.lang.IllegalStateException: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
at com.databasir.core.meta.repository.impl.jdbc.JdbcDatabaseMetaRepository.select(JdbcDatabaseMetaRepository.java:60)
at com.databasir.core.Databasir.get(Databasir.java:30)
at com.databasir.core.domain.document.service.DocumentService.retrieveDatabaseMeta(DocumentService.java:144)
at com.databasir.core.domain.document.service.DocumentService.syncByProjectId(DocumentService.java:94)
at com.databasir.core.domain.document.service.DocumentService$$FastClassBySpringCGLIB$$122722d1.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at com.databasir.core.domain.document.service.DocumentService$$EnhancerBySpringCGLIB$$183cc58f.syncByProjectId()
at com.databasir.job.ProjectSyncTaskScheduler.sync(ProjectSyncTaskScheduler.java:53)
at com.databasir.job.ProjectSyncTaskScheduler.lambda$startSyncTask$0(ProjectSyncTaskScheduler.java:45)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK
at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:240)
at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:201)
at oracle.jdbc.driver.PhysicalConnection.throughDbCharset(PhysicalConnection.java:11312)
at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:11392)
at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:7230)
at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4649)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:363)
at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:662)
at com.databasir.core.meta.repository.impl.jdbc.JdbcDatabaseMetaRepository.select(JdbcDatabaseMetaRepository.java:45)
... 20 more

@vran-dev
Copy link
Owner

这看着似乎是编码的问题?

@RonCantWriteCode
Copy link
Author

是编码问题,普通项目直接加orai18n的pom依赖即可。目前的数据库配置貌似只支持驱动的配置,没有办法加上一些配套的包依赖。

com.oracle
orai18n
11.2.0.3

@vran-dev
Copy link
Owner

临时的解决方案就是尝试将其打包为一个 fat jar。

接下来的版本我会提供上传多个 jar 的能力

@RonCantWriteCode
Copy link
Author

感谢解答,期待大佬的新功能

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

2 participants