我正在尝试在Mule 3.5 CE版本中配置Oracle数据库端点。这是我的配置。
<db:oracle-config name="Oracle_Configuration" useXaTransactions="true" doc:name="Oracle Configuration" dataSource-ref="dataSource">
<db:pooling-profile maxPoolSize="10" minPoolSize="5" acquireIncrement="2"/>
</db:oracle-config>
<spring:beans>
<spring:bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="shutdown" name="Bean">
<spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
<spring:property name="url" value="${oracle.jdbc.url}"/>
<spring:property name="user" value="${oracle.jdbc.user}"/>
<spring:property name="password" value="${oracle.jdbc.password}"/>
</spring:bean>
</spring:beans>
当我尝试在Anypoint Studio中运行它时,会出现以下错误:
org.mule.module.launcher.DeploymentInitException: SAXParseException: cvc-complex-type.4: Attribute 'user' must appear on element 'db:oracle-config'
正确的配置是什么?
答案 0 :(得分:0)
这是一个已知问题,升级到3.6应该可以解决问题。 mule-jira-7708
或者,您可以尝试以下解决方法:
<db:oracle-config name="Oracle_Configuration" useXaTransactions="true" dataSource-ref="dataSource" user="${oracle.jdbc.user}" password="${oracle.jdbc.password}" doc:name="Oracle Configuration">
<db:pooling-profile maxPoolSize="10" minPoolSize="5" acquireIncrement="2"/>
</db:oracle-config>
<spring:beans>
<spring:bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource" destroy-method="shutdown" name="Bean">
<spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
<spring:property name="url" value="${oracle.jdbc.url}"/>
</spring:bean>
</spring:beans>
&#13;