Mule 3.5社区抛出找不到合适的驱动程序 [英] Mule 3.5 Community throwing No Suitable Driver found

查看:293
本文介绍了Mule 3.5社区抛出找不到合适的驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Mule 3.5 Community Runtime在AnyPoint Studio上工作,而尝试连接到我的oracle数据库时,它在运行时引发了以下错误

I was working on the AnyPoint Studio with Mule 3.5 Community Runtime, while trying to connec to my oracle db it is throwing the following error at runtime

INFO 2014-05-30 12:16:32,875 [[externaladdresssearch] .connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager:初始化:'connector.VM.mule.default.调度员.1832211181".对象是:VMMessageDispatcher INFO 2014-05-30 12:16:32,875 [[externaladdresssearch] .connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager:开头:'connector.VM.mule.default.dispatcher.1832211181 '.对象是:VMMessageDispatcher 错误2014-05-30 12:16:32,882 [[externaladdresssearch] .connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy:

INFO 2014-05-30 12:16:32,875 [[externaladdresssearch].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'connector.VM.mule.default.dispatcher.1832211181'. Object is: VMMessageDispatcher INFO 2014-05-30 12:16:32,875 [[externaladdresssearch].connector.http.mule.default.receiver.02] org.mule.lifecycle.AbstractLifecycleManager: Starting: 'connector.VM.mule.default.dispatcher.1832211181'. Object is: VMMessageDispatcher ERROR 2014-05-30 12:16:32,882 [[externaladdresssearch].connector.http.mule.default.receiver.02] org.mule.exception.DefaultMessagingExceptionStrategy:

消息:java.sql.SQLException:未找到适用于jdbc:oracle:thin:@ 10.211.55.8:1521:mosaic的驱动程序(org.mule.module.db.internal.domain.connection.ConnectionCreationException).消息有效负载的类型为:InterfacesRequestDto 类型:org.mule.api.MessagingException 编码:MULE_ERROR--2 有效负载:uk.co.corelogic.mosaic.interfaces.common.dto.InterfacesRequestDto@6ac1abcf JavaDoc: http://www.mulesoft.org /docs/site/current3/apidocs/org/mule/api/MessagingException.html

Message : java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@10.211.55.8:1521:mosaic (org.mule.module.db.internal.domain.connection.ConnectionCreationException). Message payload is of type: InterfacesRequestDto Type : org.mule.api.MessagingException Code : MULE_ERROR--2 Payload : uk.co.corelogic.mosaic.interfaces.common.dto.InterfacesRequestDto@6ac1abcf JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html

我已经使用了通用数据库连接,以下是数据库配置

I have used Generic DB connection The following is the DB config

<spring:beans>
    <spring:bean id="jdbcDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" name="jdbcDataSource">
        <spring:property name="url" value="jdbc:oracle:thin:@10.211.55.8:1521:mosaic"/>
        <spring:property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
        <spring:property name="username" value="fw"/>
        <spring:property name="password" value="fw"/>
    </spring:bean>
</spring:beans>
<db:generic-config name="Mosaic_Database_Configuration" dataSource-ref="jdbcDataSource" doc:name="Generic Database Configuration"/>

推荐答案

您需要在类路径中包含ojdbc.jar.在此处详细介绍了如何执行此操作.

You need to have the ojdbc.jar included in your Classpath. There is a good tutorial provided here that details how to do this.

或者,如果您的类路径中已经有jar,我建议尝试使用其他的spring bean.我以前曾使用以下内容连接到Oracle数据库:

Alternatively, if you already have the jar in your classpath, I'd suggest trying a different spring bean. I've used the following to connect to an Oracle database previously:

<spring:bean id="dataSource" class="org.enhydra.jdbc.standard.StandardDataSource" destroy-method="shutdown">
    <spring:property name="driverName" value="${Driver}"/>
    <spring:property name="url" value="${URL}"/>
    <spring:property name="user" value="${User}"/>
    <spring:property name="password" value="${Password}"/>
</spring:bean>

这篇关于Mule 3.5社区抛出找不到合适的驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆