bladex3.1.1 连接达梦8数据库报错

Blade 未结 3 1012
kolehank
kolehank 2023-10-08 15:40

一、该问题的重现步骤是什么?

1. 官方提供的sql导入数据后配置完成达梦数据库

2. 启动项目

3.报错


二、你期待的结果是什么?实际看到的又是什么?

正常运行

运行报错

三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。

2023-10-08 15:36:38.243 ERROR 9851 --- [   async-task-9] o.s.c.b.c.BladeExecutorConfiguration     : Unexpected exception occurred invoking async method: public void org.springblade.common.event.ErrorLogListener.saveErrorLog(org.springblade.core.log.event.ErrorLogEvent)

org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: dm.jdbc.driver.DMException: 第1 行附近出现错误:
无效的表或视图名[BLADE_LOG_ERROR]
### The error may exist in org/springblade/modules/system/mapper/LogErrorMapper.java (best guess)
### The error may involve org.springblade.modules.system.mapper.LogErrorMapper.insert
### The error occurred while executing an update
### SQL: INSERT INTO blade_log_error (id, stack_trace, exception_name, message, file_name, line_number, service_id, server_ip, server_host, env, method_class, method_name, params, create_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
### Cause: dm.jdbc.driver.DMException: 第1 行附近出现错误:
无效的表或视图名[BLADE_LOG_ERROR]
; 第1 行附近出现错误:
无效的表或视图名[BLADE_LOG_ERROR]; nested exception is dm.jdbc.driver.DMException: 第1 行附近出现错误:
无效的表或视图名[BLADE_LOG_ERROR]
	at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
	at com.sun.proxy.$Proxy131.insert(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
	at com.sun.proxy.$Proxy193.insert(Unknown Source)
	at com.baomidou.mybatisplus.extension.service.IService.save(IService.java:63)
	at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke()
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
	at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
	at org.springblade.modules.system.service.impl.LogErrorServiceImpl$$EnhancerBySpringCGLIB$$271f9a08.save()
	at org.springblade.modules.system.service.impl.LogServiceImpl.saveErrorLog(LogServiceImpl.java:38)
	at org.springblade.common.event.ErrorLogListener.saveErrorLog(ErrorLogListener.java:55)
	at org.springblade.common.event.ErrorLogListener$$FastClassBySpringCGLIB$$d15d923a.invoke()
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)
	at org.springblade.core.log.aspect.LogTraceAspect.around(LogTraceAspect.java:41)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:634)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:624)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:72)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.springblade.core.context.BladeRunnableWrapper.run(BladeRunnableWrapper.java:54)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: dm.jdbc.driver.DMException: 第1 行附近出现错误:
无效的表或视图名[BLADE_LOG_ERROR]
	at dm.jdbc.driver.DBError.throwException(DBError.java:696)
	at dm.jdbc.b.b.o.E(MSG.java:560)
	at dm.jdbc.b.b.o.B(MSG.java:520)
	at dm.jdbc.b.b.o.A(MSG.java:501)
	at dm.jdbc.b.a.a(DBAccess.java:230)
	at dm.jdbc.b.a.a(DBAccess.java:690)
	at dm.jdbc.driver.DmdbPreparedStatement.prepareSql(DmdbPreparedStatement.java:267)
	at dm.jdbc.driver.DmdbPreparedStatement.allocateHandle(DmdbPreparedStatement.java:224)
	at dm.jdbc.driver.DmdbPreparedStatement.(DmdbPreparedStatement.java:126)
	at dm.jdbc.driver.DmdbPreparedStatement.(DmdbPreparedStatement.java:176)
	at dm.jdbc.driver.DmdbConnection.do_prepareStatement(DmdbConnection.java:712)
	at dm.jdbc.driver.DmdbConnection.do_prepareStatement(DmdbConnection.java:698)
	at dm.jdbc.driver.DmdbConnection.prepareStatement(DmdbConnection.java:1317)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:535)
	at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:908)
	at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:116)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:531)
	at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:326)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:369)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86)
	at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59)
	at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
	at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
	at com.sun.proxy.$Proxy266.prepare(Unknown Source)
	at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:87)
	at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
	at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
	at com.sun.proxy.$Proxy265.update(Unknown Source)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
	at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
	... 39 common frames omitted

五、若有更多详细信息,请在下面提供。

3条回答
  •  admin
    admin (楼主)
    2023-10-08 15:42

     1. 引入达梦的驱动包

     2. 修改yml配置,指定达梦驱动类

     3. 使用达梦的数据源配置

    作者追问:2023-10-08 15:42

    配置没问题 改了依赖驱动和数据库三个地方 跑起来没问题 但是一打开登录页就开始疯狂报错

    和这个问题一样https://sns.bladex.cn/q-10542.html

提交回复