|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
NoClassDefFoundError:OracleDriver error from JavaComputeNode |
« View previous topic :: View next topic » |
Author |
Message
|
Vakku |
Posted: Mon Jul 17, 2017 4:51 pm Post subject: NoClassDefFoundError:OracleDriver error from JavaComputeNode |
|
|
Novice
Joined: 13 Oct 2008 Posts: 20 Location: California
|
Hello,
I'm getting error "java.lang.NoClassDefFoundError: oracle.jdbc.OracleDriver" in JCN, when initializing the JDBC Driver.
I'm using JCN instead of regular compute node because, the StoredProcedure is having Table type objects as output/input parameters.
Have a messageflow calling the Java project referred in JCN; java is used to make connections to DB, execute a Stored procedure.
As set-up, downloaded the latest ojdbc6.jar and added as external jar reference to the java project.
It is compiling and getting deployed to brokers; but giving error at runtime at the statement "DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());".
Database is Oracle 11G and I'm using the IIB 10. Is there anything which I'm missing here? I feel many would have get into this error, but my search in mqseries doesn't return anything specific for jdbc Driver error.
Code snippet is
Code: |
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class RIS_DC_RECEIPTS_CallStoredProcedure extends MbJavaComputeNode {
public void evaluate(MbMessageAssembly contact admin) throws MbException {
MbOutputTerminal out = getOutputTerminal("out");
MbOutputTerminal alt = getOutputTerminal("alternate");
MbMessage inMessage = contact admin.getMessage();
MbMessageAssembly outAssembly = null;
Connection connection = null;
CallableStatement callableStatement = null;
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
connection = DriverManager.getConnection(url,userID,pwd); |
|
|
Back to top |
|
 |
Vakku |
Posted: Wed Jul 19, 2017 8:14 am Post subject: NoClassDefFoundError:OracleDriver error from JavaComputeNode |
|
|
Novice
Joined: 13 Oct 2008 Posts: 20 Location: California
|
Could anyone please provide me some pointers on this issue? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 19, 2017 8:28 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
classDefNotFound almost always means "the jar file is not found by the classloader". _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|