Hi,
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=9.0.2.0.0 -Dpackaging=jar -Dfile=/path/to/jar/ojdbc14-9.0.2.0.0.jar -DgeneratePom=true
and then in my POM file, I have added dependency:
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc14</artifactId> <version>9.0.2.0.0</version> </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:@//10.1.111.201:1521/BSCSPRE";; 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.