ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » NoClassDefFoundError:OracleDriver error from JavaComputeNode

Post new topic  Reply to topic
 NoClassDefFoundError:OracleDriver error from JavaComputeNode « View previous topic :: View next topic » 
Author Message
Vakku
PostPosted: Mon Jul 17, 2017 4:51 pm    Post subject: NoClassDefFoundError:OracleDriver error from JavaComputeNode Reply with quote

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
View user's profile Send private message
Vakku
PostPosted: Wed Jul 19, 2017 8:14 am    Post subject: NoClassDefFoundError:OracleDriver error from JavaComputeNode Reply with quote

Novice

Joined: 13 Oct 2008
Posts: 20
Location: California

Could anyone please provide me some pointers on this issue?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Jul 19, 2017 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » NoClassDefFoundError:OracleDriver error from JavaComputeNode
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.