0 Replies Latest reply on Feb 17, 2017 2:34 AM by pro_newbi

    Jboss Fuse karaf - unable to add ojdbc dependency




      I am using jboss-fuse-karaf-6.3.0.redhat-187, and trying to add Oracle ojdbc jar in my project


      I have added the ojdbc jar in my local .m2 repositary using following:


      mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion= -Dpackaging=jar -Dfile=/path/to/jar/ojdbc14- -DgeneratePom=true

      and then in my POM file, I have added dependency:





      every thing works fine, but when I deploy my project in jboss fuse and run it,

      it gives an error that:


      11:29:35,366 | INFO  | qtp1730278923-77 | DBFactory  | 295 - CamelServiceRoute - 1.0.0.SNAPSHOT | java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@//IP:Port/AAAAA


      even I have placed ojdbc14.jar in Jboss-home/deploy folder. but still getting the same error.



      Java Code:

        // imports
        import org.apache.log4j.Logger;
        import java.sql.*; 
        import oracle.jdbc.*;
        import java.sql.DriverManager;
        import java.sql.Connection;
        import java.sql.SQLException;
        import java.util.Date;
        // code
        Class.forName ("oracle.jdbc.OracleDriver");
        String dbURL = "jdbc:oracle:thin:@//";;
        String strUserID = "Selfcare";
        String strPassword = "self_care#2017";
        Connection dbConnection=DriverManager.getConnection(dbURL,strUserID,strPassword);
        System.out.println(new Date() +": Coonected.");
        CallableStatement callableStatement = null;



      Any help, what am I missing here.