eova oracle 导入元数据报错
lulu 发布于52月前 10答/1912阅

我的原始需求是:
使用的是Eova1.6 Oralce兼容版,由于码云上的附近无法下载,所以是在Oracle官网上找的ojdbc14.jar,是直接导入到项目中去的。在导入元数据时报错如下:

Sql: select * from eova_object where code = ?

07-30 16:54:18[ERROR]/meta/doImports

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

at com.jfinal.aop.Invocation.invoke(Invocation.java:87)

at com.jfinal.plugin.activerecord.tx.Tx.intercept(Tx.java:77)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.eova.interceptor.AuthInterceptor.intercept(AuthInterceptor.java:49)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.eova.interceptor.LoginInterceptor.intercept(LoginInterceptor.java:69)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:78)

at com.eova.handler.UrlBanHandler.handle(UrlBanHandler.java:38)

at com.jfinal.plugin.druid.DruidStatViewHandler.handle(DruidStatViewHandler.java:81)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

... 29 more

Caused by: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.setClientInfo(Ljava/util/Properties;)V

at com.alibaba.druid.filter.FilterChainImpl.connection_setClientInfo(FilterChainImpl.java:574)

at com.alibaba.druid.filter.FilterAdapter.connection_setClientInfo(FilterAdapter.java:996)

at com.alibaba.druid.filter.FilterChainImpl.connection_setClientInfo(FilterChainImpl.java:570)

at com.alibaba.druid.filter.FilterAdapter.connection_setClientInfo(FilterAdapter.java:996)

at com.alibaba.druid.filter.FilterChainImpl.connection_setClientInfo(FilterChainImpl.java:570)

at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.setClientInfo(ConnectionProxyImpl.java:444)

at com.alibaba.druid.pool.DruidPooledConnection.setClientInfo(DruidPooledConnection.java:1029)

at com.eova.common.utils.db.DsUtil.getDatabaseMetaData(DsUtil.java:48)

at com.eova.common.utils.db.DsUtil.getColumnInfoByConfigName(DsUtil.java:173)

at com.eova.core.meta.MetaController.importMetaField(MetaController.java:393)

at com.eova.core.meta.MetaController.importMeta(MetaController.java:374)

at com.eova.core.meta.MetaController.doImports(MetaController.java:226)

... 34 more

折腾了好久了,都没解决,请各位大神帮忙分析一下,谢谢!



[沙发] Jieven
@lulu 混合数据源是不支持的
最佳
[地板] lulu
补充一下,数据源是这样配置的:

#Eova数据源
eova.url = jdbc:mysql://xxx.xxx.xxx.xxx:3306/eovav6?characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
eova.user = xxxx
eova.pwd = pwd


#main数据源
main.url = jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:ORCL
main.user = xxxx
main.pwd = pwd
[地毯] Jieven
@lulu Caused by: java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.setClientInfo(Ljava/util/Properties;)V
应该还是 驱动包不对的问题,还是从码云下载 附件吧
[4楼] Jieven
@lulu 或者群里@我 我单独发你也行
[5楼] lulu
群主,我用了你给我的包,也还是报一样的错,而且我看了jar包里的对应类,好像确实没这个方法
[6楼] Jieven
@lulu 只要是出现方法找不到,类找不到,这种问题都是因为部署不当导致的.
[7楼] lulu
好的,我打算换个环境部署一下。
[8楼] lulu
我的环境是 jdk1.7+tomcat7.0+oracle10g(10.0.2.0),用的是Eova1.6 Oralce兼容版
问题还是没解决。。。
[9楼] lulu
数据源 eova数据源用的是mysql,main数据源用的是Oracle10g
[10楼] lulu
今天又再试了一下,果真是混合数据源导致的问题,现在eova和main都用Oracle就可以导入了
提交评论
嘿,我来帮你!