Oracle Data source configuration in MULE(AnyPoint Studio)

I use this config for oracle database in Mule:

    <spring:beans>               
    <spring:bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="shutdown" name="Bean">
        <spring:property name="driverName" value="oracle.jdbc.driver.OracleDriver"/>
        <spring:property name="url" value="jdbc:oracle:thin:@192.168.28.129:1521:orcl"/>
        <spring:property name="user" value="username" />
        <spring:property name="password" value="123456" />
    </spring:bean>
</spring:beans>


<db:oracle-config name="Oracle_Configuration" useXaTransactions="true" dataSource-ref="dataSource"   doc:name="Oracle Configuration">

    <db:pooling-profile maxPoolSize="10" minPoolSize="5" acquireIncrement="2"/>
</db:oracle-config>

*I added ojdbc14.jar as a external jar file into my project
but when I test connection in Global Elements in Anypoint Studio I see this error:

enter image description here

enter image description here

enter image description here

how can I solve this issue?

Also I have to say that in a main method I checked the connection and it was ok, this is Main method structure:

    import java.sql.*;

public class Main {

    public static void main(String[] args) throws Exception {

           try {
                 Class.forName ("oracle.jdbc.driver.OracleDriver");
           } catch (ClassNotFoundException e) {
                 e.printStackTrace();
           }

            Connection conn = DriverManager.getConnection
                ("jdbc:oracle:thin:@192.168.28.129:1521:orcl", "eslami", "123456");
                                // @machineName:port:SID,   userid,  password

            Statement stmt = conn.createStatement();
            ResultSet rset = stmt.executeQuery("select * from person");
            while (rset.next())
                System.out.println (rset.getString(1) +  "  " + rset.getString(2) + "  " +  
                                    rset.getString(3) +  "  " + rset.getString(4) + "  " + 
                                    rset.getString(5));   // Print row 1
            stmt.close();
      }

}


Source: oracle

Leave a Reply