DB2 jdbc code

Hi
i am writing code to get data from DB2 database using jdbc.
do i need to include ; at the end to pass it to the database?
String query =
                    " DELETE FROM "
                         + BMSDatabaseInfo.SCHEMA
                         + "."
                         + CrossHoldingMovementTable.TABLE02_NAME
                         + " WHERE "
                         + MovementTable.SEQ_NO
                         + " IN (SELECT "
                         + MovementTable.SEQ_NO
                         + " FROM "
                         + BMSDatabaseInfo.SCHEMA
                         + "."
                         + CrossHoldingMovementTable.TABLE01_NAME
                         + " WHERE "
                         + MovementTable.BUSINESS_CLSS
                         + " = ? AND "
                         + MovementTable.EFFECTIVE_DATE
                         + " >= ? AND "
                         + MovementTable.TYPE
                         + " = '"
                         + BCM_MOVEMENT_TYPE
                         + "');";
OR
String query =
                    " DELETE FROM "
                         + BMSDatabaseInfo.SCHEMA
                         + "."
                         + CrossHoldingMovementTable.TABLE02_NAME
                         + " WHERE "
                         + MovementTable.SEQ_NO
                         + " IN (SELECT "
                         + MovementTable.SEQ_NO
                         + " FROM "
                         + BMSDatabaseInfo.SCHEMA
                         + "."
                         + CrossHoldingMovementTable.TABLE01_NAME
                         + " WHERE "
                         + MovementTable.BUSINESS_CLSS
                         + " = ? AND "
                         + MovementTable.EFFECTIVE_DATE
                         + " >= ? AND "
                         + MovementTable.TYPE
                         + " = '"
                         + BCM_MOVEMENT_TYPE
                         + "')";
which one is correct?
thanks in advance

try both and see.
my guess is that the semi-colon at the end is not needed. you only use that in the query browser.
that's the way it is with oracle's sql*plus: you put in an eol character that jdbc does not need.
%

Similar Messages

  • Class not found error for COM.ibm.db2.jdbc.app.DB2Driver

    i have written this code:
    import java.io.*;
    import java.sql.*;
    public class tryjdbc
    {  public static void main (String args[])
    {  try
    {  Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");  }
    catch (java.lang.ClassNotFoundException e)
    {  System.out.print(e.getMessage());  }
    and once i try to run it, it gives out a class not found exception error.
    I haven't changed anything with the classpath since I don't think the problem is with the classpath. I have read in the IBM Developer Kit for Java documentaton that the AS/400 Developer Kit for Java automatically adds the db2_class.jar file to the classpath. So why do I get a class not found exception error?

    I was using Web Spehere 4.0.3 and trying to connect to a database on DB2 7.2. I was just following a tutorial and trying to get a handle on Web Sphere. I am running all of these on a Windows 2000 Operating System. Here are some of my observations :
    a. db2java.zip packaged under %DB2ROOT%\SQLLIB\JAVA, does not work.
    b. CLASSPATH needs to be set to %DB2ROOT%\sqllib\java12\db2java.zip
    c. Include this as one of the packages in the package defined in
    WebSphere, using the Java Perspective.
    d. Ensure that case sensitivity is respected. All though the package
    shows up as COM.ibm.db2.jdbc.app.DB2Driver, for some reason, it
    will only accept com.ibm.db2.jdbc.app.DB2Driver.
    With these settings, I was able to connect to a db2 database.
    I am a little puzzled on the following. I did not include java.io package, but still it could print the messages. Did anybody have a similar experience
    Thanks for this posting.

  • No Suitable Driver Exception and COM.ibm.db2.jdbc.app.DB2Driver

    Greetings,
    I am attempting to connect to a DB2 UDB (6.1) on an AIX (4.x) box from a win95 box and have cobbled some code together to do this. Despite loading and verifying that the driver loads, I get nothing but the SQLException: "No Suitable Driver". My Java code follows for comment. Thanks in advance...
    import java.lang.reflect.*;
    import java.sql.*;
    import java.io.*;
    class db2JDBCtest
    static Driver driver = null;
    static final String url = "jdbc:db2//1xx.x.x4x.xx/";
    public static void main(String args[]) {
    Connection con = null;
    // GET CONNECTION
    try
    driver = (Driver)Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
    System.out.println(driver);
    if (args.length == 3) {
    con = DriverManager.getConnection(url + args[0], args[1], args[2]);
    else{
    System.out.println("\nUsage: java db2JDBCtest [databasealias username password]\n");
    System.exit( - 1 );}
    // GET CONNECTION WARNINGS
    SQLWarning warning = null; {   
    warning = con.getWarnings();
    if (warning == null){
    System.out.println("No Warnings");
    return; }
    while (warning != null) {
    System.out.println("Warning: "+warning);
    warning = warning.getNextWarning();
    // CREATE PREPARED STATEMENT
    PreparedStatement prepstmt;
    prepstmt = con.prepareStatement("select * from MDM.DEALER where 1=0");
    // GET RESULTS !
    ResultSet resultset = prepstmt.executeQuery();
    System.out.println(resultset);
    prepstmt.close();
    catch
    (Exception e){
    System.out.println(e);
    }

    1)IBM document says that you use COM.ibm.jdbc.net.DB2Driver when you use Applets
    2)For applications use COM.ibm.jdbc.app.DB2Driver
    3)Both these files are in db2java.zip file
    4)db2java.zip is the DB2 driver just like classes111.zip is the driver for Oracle
    6)You need to put db2java.zip in your classpath.
    5)If you are using COM.ibm.jdbc.net.DB2Driver and you are getting "COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket
    . SQLSTATE=08S01 "
    you need to run "db2jstrt" on the target host(machine running DB2) with the specified port as the parameter
    6)If you are using COM.ibm.jdbc.app.DB2Driver and getting " java.sql.SQLException: No suitable driver ", most probably db2java.zip is not in classpath.
    7)Note : you need to install DB2 client software on the application machine, just putting the zip file does not work.
    8)There is a Java file at IBM that walks you thru the connection.
    ftp://ftp.software.ibm.com/software/websphere/info/tools/jdbctest
    Just download in into the client machine, compile and run it.

  • Applet using COM.ibm.db2.jdbc.app.DB2Driver

    Hi,
    I have an applet that is downloaded from a webserver which then needs to access the local db2java.zip file. It was my understanding if you use the COM.ibm.db2.jdbc.app.DB2Driver it would allow you to access the local copy of that file in your classpath. I also understand that if you use COM.ibm.db2.jdbc.net.DB2Driver you can access the db2java.zip on the server. I unfortunately need to access the local db2java.zip file. I am upgrading from Java 1.2.2 to Java 1.3.1 and it is not allowing this connection. I also changed my java.policy file and have created my own certificate as well, I understand all that.
    Here is the section of my code that fails...
    java.sql.Driver d = (java.sql.Driver) Class.forName(getDriver()).newInstance();
    WHSConnection.con = DriverManager.getConnection(getURL(), getUser(), getPassword());
    WHSConnection.con.setAutoCommit(true);
    System.out.println("Database Connection Successful");
    } catch (java.lang.Throwable except) {
    except.printStackTrace();
    System.out.println("Database Connection Failed");
    Any suggestions would be appreciated. Thanks ~A

    Yes, I forgot to mention that I stopped all DB2 Services and ran the file "runjdbc2.bat"... When I run Java 1.2.2 everything works great. When I run 1.3.1 it attempts to locate the db2java.zip classes on the server and not locally... Here is the error message I receive...
    java.lang.ClassNotFoundException: java.io.FileNotFoundException: http://www.example.com/Java131/COM/ibm/db2/jdbc/app/DB2Driver.class
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
         at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
         at java.net.HttpURLConnection.getResponseCode(Unknown Source)
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at Serverlet.WHSConnection.getConnection(WHSConnection.java:159)
         at Serverlet.MainApplet.onOk(MainApplet.java:522)
         at Serverlet.MainApplet.connEtoM1(MainApplet.java:60)
         at Serverlet.MainApplet.actionPerformed(MainApplet.java:29)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Database Connection Failed

  • DB2 Connection Problem - Can't find - COM.ibm.db2.jdbc.app.DB2Driver

    Hi All,
    when executing an application and attempting to connect to DB2 I get;
    error java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
    I've added the 'db2java.zip' library to the java.conf file (and the native db2 libs) and can make db2 connections using the database connect via the IDE. But not when executing my application - what am I missing.
    TIA
    Bill

    Hi Deepak,
    I added the db2java.zip to the
    project properties/libraries/classpath
    and it works fine. (well my code fails - but that's another problem <g>.)
    Thanks for all your help.
    Bill

  • ISeries DB2 JDBC Adapter failure

    I have a scenario where XI needs to send data to AS-400 (iSeries) DB2. To do that we installed the DB2 JDBC driver for AS-400 (jt400.jar).
    However, we are getting the following error:
    Receiver Adapter v2808 for Party '', Service 'Phase2Test_BusService':
    Configured at 2007-07-24 16:45:37 EDT
    History:
    - 2007-07-24 16:45:37 EDT: Error: Accessing database connection 'jdbc:as400://10.63.248.37:8471/p2iftest' failed: DriverManagerException: Cannot establish connection to URL 'jdbc:as400://10.63.248.37:8471/p2iftest': SAPClassNotFoundException: com.ibm.as400.access.AS400JDBCDriver
    We run a custom Java program to test the driver. It's working with the that. However, the same driver is failing for XI.
    Please help.

    Chandra,
    Even in my current implementation i'm using AS400 & integrating the same with XI.
    Please check whether u gave the same comm.channel properties.
    JDBC Driver :com.ibm.as400.access.AS400JDBCDriver
    connection :jdbc:as400://server/;errors=full
    Best regards,
    raj.

  • IBM DB2 JDBC Universal Driver

    Hello,
    On page 36 of the DF XI3.0 Installation Guide, there is a link for the IBM DB2 JDBC Universal Driver. When I click on this link I get the following error:
    Downloads Message
    2005-01-13 12:10:16.882164R download was not found in the database
    Thanks for the help!
    Jason

    Hello
    Thanks Scott for your reply. We have resolved this issue in house as follows:
    - our Systems Support team installed the DB2 Connect client software on the DF server
    - copied the jar file to the leselect/drivers directory
    Also, because we are using the z series we needed an additional driver db2jcc_license_cisuz.jar which was copied into the same drivers dir.
    Thanks!
    Jason

  • What's wrong with COM.ibm.db2.jdbc.app.DB2Driver?

    Hello everybody,
    first of all I posted this on
    http://www-105.ibm.com/developerworks/java_df.nsf/AllViewTemplate?OpenForm&RestrictToCategory=33
    so you can check the IBM forum as well, may be some IBM gurus can comment this...
    I'm using the COM.ibm.db2.jdbc.app.Driver shipped with DB2Connect v6.1, v7.1 (tested both on NT and SunOS 5.6, 5.8), the database is DB2 v6, v7 running on an OS390. I am pretty confused:DatabaseMetaData.getProcedureColumns(catalog, schemaPattern, namePattern)cannot handle the namePattern parameter correct. It works only with "", null and "%". Passing any other value results in :COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0206N  "PROCEDURE " ist in dem verwendeten Kontext ung�ltig.  SQLSTATE=42703
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:241)
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:186)
         at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:419)
         at COM.ibm.db2.jdbc.app.DB2DatabaseMetaData.getProcedures(DB2DatabaseMetaData.java:1446)I think that even if the pattern doesn't match any procedure the function should return an empty ResultSet. The only "solution" is to scroll all the procedures in the ResultSet until you find the passing ones. Does IBM think this is serious?
    I have dug a bit and found another incompatibitly with the JDBC specification: the names of the result set columns returned by DatabaseMetaData.getProcedureColumns() as returned by the DB2Driver:
    PROCEDURE_CAT
    PROCEDURE_SCHEM
    PROCEDURE_NAME
    COLUMN_NAME
    COLUMN_TYPE
    DATA_TYPE
    TYPE_NAME
    COLUMN_SIZE
    BUFFER_LENGTH
    DECIMAL_DIGITS
    NUM_PREC_RADIX
    NULLABLE
    REMARKS
    Here comes the JDBC specification:
    <quote>
    Each procedure description has the the following columns:
    PROCEDURE_CAT String => procedure catalog (may be null)
    PROCEDURE_SCHEM String => procedure schema (may be null)
    PROCEDURE_NAME String => procedure name
    COLUMN_NAME String => column/parameter name
    COLUMN_TYPE Short => kind of column/parameter:
    procedureColumnUnknown - nobody knows
    procedureColumnIn - IN parameter
    procedureColumnInOut - INOUT parameter
    procedureColumnOut - OUT parameter
    procedureColumnReturn - procedure return value
    procedureColumnResult - result column in ResultSet
    DATA_TYPE short => SQL type from java.sql.Types
    TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
    PRECISION int => precision
    LENGTH int => length in bytes of data
    SCALE short => scale
    RADIX short => radix
    NULLABLE short => can it contain NULL.
    procedureNoNulls - does not allow NULL values
    procedureNullable - allows NULL values
    procedureNullableUnknown - nullability unknown
    REMARKS String => comment describing parameter/column </quote>
    I would appreciate your comments.
    Regards,
    Anton Maleev
    IT Consultant, Software Engineer
    Frankfurt, Germany
    mailto: [email protected]

    Futhermore, when you call DatabaseMetaData.getProcedures(catalog, schemaPattern, "%") when you specified schemaPattern it returns all the procedures no mather if the schema matches the pattern...

  • Can someone checkout this JDBC code for me?

    I'd be very grateful if an expert out there would check out my code for me, which I am about to use a great deal.
    I've written this to save me some duplicated code, but since I haven't seen this approach much in my travels, I'm wondering if it has any particular flaws.
    A separate DbAccess class is instantiated for any database access work, and once instantiated, getConnection is called and once finished closeConnection must be called.
    You can get a ResultSet instance with just a little code and it's up to the calling programme to close it again.
    The only things left open are the Statements, but they will get garbage collected or at any rate will be closed with the connection (whichever is sooner).
    Is there anything wrong with this code?
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    public class DbAccess{
         * The chosen datasource for this instance of the class
        private String dataSource;
         * The connection held in this instance (created by calling getConnection())
        private Connection con;
         * Instantiates a DbAccess instance, setting the datasource
        public DbAccess(String datasource){
         this.dataSource = dataSource;
         * Gets a connection to the database chosen in constructor parameter:
         * NB The calling programme MUST call closeConnection() after it's finished with it!
        public void getConnection()
         throws NamingException,
                SQLException{
         Context ctx = new InitialContext();
         DataSource ds = (DataSource)ctx.lookup(dataSource);
         con = ds.getConnection();
        }//end getConnection()
         * Closes the connection previously obtained with getConnection(), this MUST be called when the calling
         * programme has finished using the database.
        public void closeConnection()
         throws SQLException{
         con.close();
        }//end closeConnection()
         * Returns a ResultSet for a simple query, using a plain Statement
         * @param query - the complete database query
         * @return ResultSet for the query in the parameter
         * N.B. The calling programme MUST close the ResultSet after it's finished with it!
        public ResultSet getResultSet(String query)
         throws SQLException{
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         return rs;
        }//end getResultSet()
         * Returns a ResultSet for a simple query, using a PreparedStatement, and accepting
         * a String parameter that can contain a String for a single setString().
         * @param query - the complete database query
         * @param stringToSet - the String for the preparedStatement's setString() method
         * @return ResultSet for the query in the parameter
         * N.B. The calling programme MUST close the ResultSet after it's finished with it!
        public ResultSet getResultSet(String query, String stringToSet)
         throws SQLException{
         PreparedStatement ps = con.prepareStatement(query);
         ps.setString(1,stringToSet);
         ResultSet rs = ps.executeQuery();
         return rs;
        }//end getResultSet()
    }//end class

    Ok, guys you've thoroughly trashed my code, fine, and
    I half expected it because there's nothing like this
    code about the placeYou're suffering from delusions of grandeur. There are plenty of approaches to that particular itch. The closest to what you're trying to achieve would probably be Spring's JDBCTemplate:
    http://www.springframework.org/docs/api/org/springframework/jdbc/core/JdbcTemplate.html
    Hibernate, iBatis, EJB3, and myriad others tackle the issue in other ways.
    , but are we therefore concluding
    that reducing the jdbc code is virtually impossibile
    - and there's an awful lot of it every time you want
    to do a query?My major objection to your approach is that you introduce a variety of bugs without significantly reducing the amount of JDBC code required. Most of what you're after in your class can be achieved by a convenience method to acquire the Connection object.
    1) If (ok maybe it's a big if) - if I always close
    the connection, the statements aren't being leaked
    right?Not necessarily. To the best of my recollection the spec doesn't mandate this. And even if it does I've certainly encountered drivers that don't clean up statement resources that aren't explicitly released. So there's a theoretical and practical aspect to this.
    2) I'm using Tomcat datasources, for getting the
    connection, and I thought that you just had to call
    con.close() for it to return to the pool. Am I wrong
    on this?No, you're right - but nothing in your class prevents the user from calling getConnection twice and leaking a connection - the least you could do in the circumstances is prevent that by throwing an exception if they try.

  • "Getting exception when trying to run a JDBC code"

    Hi,
    I am getting this exception when I try to run the Jdbc code. Can some one sort out what is the problem.
    Exception in thread "main" java.lang.UnsupportedClassVersionError: TestJdbcGrip
    (Unsupported major.minor version 49.0)Regards

    The JDBC jarfile you have is either too new, or too old (less liekely) for you current Java version. Download a newer Java version and try that. If it doesn't work, then download the newer version of the JDBC driver and try it with both of the Java versions (both because if it works with both, then you can continue using whichever one you like).

  • SQLJ/JDBC code compiles but doesn't run

    I keep getting a fatal error in the JAVA.EXE module when I try to run an code with SQLJ/JDBC. I've got my class and classpath set up like a oracle support tech told me to do but the code still bombs.
    I noticed java.exe bombs at the same address no matter what SQLJ/JDBC code I compile.
    Could it be conflicting with something on
    a NT 4.0 box.
    Anyone with ideas please respond.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MSCHWERY ():
    I keep getting a fatal error in the JAVA.EXE module when I try to run an code with SQLJ/JDBC. I've got my class and classpath set up like a oracle support tech told me to do but the code still bombs.
    I noticed java.exe bombs at the same address no matter what SQLJ/JDBC code I compile.
    Could it be conflicting with something on
    a NT 4.0 box.
    Anyone with ideas please respond.<HR></BLOCKQUOTE>
    Can you run a non Oracle Java application. Which version of JDK are you using.. do you have multiple versions of JDK .. if so make sure there is no conflict.. You may try re-installing the JDK if your non Oracle Java application also errors out..

  • Can anybody give me the jdbc code for postgres database.

    Hello all,
    I tried to search for sample jdbc code for postgres. But I couldn't find working sample. Can anybody please post the sample jdbc code for connecting to postgres database.
    I have already added the jar file, "postgresql-8.0-312.jdbc3.jar" to the build path.
    Thanks.
    Srinivas

    Hi,
    Thanks for your reply!
    I wrote the following code, but the insert doesn't add a row.
    try {
              Class.forName("org.postgresql.Driver");
              //Preparing Conenction String     
              Connection con = DriverManager.getConnection("jdbc:postgresql://<name>:5432/sales_office_test", "sales_office_data","sales_office_data");
              PreparedStatement prepSt =  con.prepareStatement(
                                  "INSERT INTO office_personnel (office_id, salutation, firstname, lastname, email_address,"
                                  + " cellphone, phonenumber, extension, password, username) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
                             prepSt.setString(1, newOfficeIds);
                             prepSt.setString(2, whopperUserSalutation);
                             //Close statement
                             prepSt.close();
         } catch (ClassNotFoundException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
         } catch (SQLException e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
         }If I print the connection object I get
    Sql connection value: org.postgresql.jdbc3.Jdbc3Connection@10965c3 I double checked the same query by directly executing it on the web interface to the postgres, works fine there and creates the row...
    What could be wrong.
    Thanks
    Srinivas

  • Getting class (COM.ibm.db2.jdbc.app.DB2Connection)

    We are migrating from Websphere 3.5 to 4.0 and I am setting up my WSAD 4.0 on my local system. DB2 7.2 is the database for the application.
    When i configure the Data Source, all works fine, but when I run the application, i get the following error.
    The class (COM.ibm.db2.jdbc.app.DB2Connection) does not implement javax.sql.ConnectionPoolDataSource or javax.sql.XADataSource
    My JDBC driver is in the file db2java.zip. Can anyone tell me what is the way to remove this error and If i need to download some new drivers, where can i get them from?

    sorry to say this but we also fed up with all those things and using db2 is 1 of the worst thing in the world if u get enough help from anywhere.. plz inform me also...

  • Cannot load driver COM.ibm.db2.jdbc.app.DB2Driver

    Hi ,
    I need help on this matter and will really appreciate.
    I have installed Jdeveloper 11g and Weblogic 11gR1 on windows. I am trying to configure my weblogic server for JDBC-Datasourse to connect to DB2 and get this error.
    cannot load driver COM.ibm.db2.jdbc.app.DB2Driver
    This is how my classpath and path looks
    classpath :.;C:\Program Files\JDEdwards\BPMBroker\JRE\1.3\lib\ext\QTJava.zip;C:\Program Files\Java\jdk1.6.0_20\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_20\lib\dt.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Sun\db2java.zip;C:\Sun\COM\ibm\db2\jdbc\app\DB2Driver.class;C:\Program Files\IBM\WebSphere\AppServer\derby\lib\deprecated\db2jcc.jar;C:\Program Files\IBM\WebSphere\AppServer\derby\lib\deprecated\db2jcc_license_cu.jar;
    path : C:\Program Files\Java\jdk1.6.0_20\bin;C:\Sun\db2java.zip;
    I don't know what to do and everytime i try to test my connection i get this error .
    Please help.
    Thank you

    I added Driver Classname =com.ibm.db2.jcc.DB2Driver
    and now it no longer gives me cannot load driver COM.ibm.db2.jdbc.app.DB2Driver.
    But now i am getting
    Execution failed due to a distribution protocol error that caused deallocation of the conversation. A DRDA Data Stream Syntax Error was detected. Reason: 0x1 DB2ConnectionCorrelator: null
    com.ibm.db2.jcc.b.cb.l(cb.java:1207)
    com.ibm.db2.jcc.b.cb.c(cb.java:357)
    com.ibm.db2.jcc.b.cb.v(cb.java:1440)
    com.ibm.db2.jcc.b.db.a(db.java:42)
    com.ibm.db2.jcc.b.b.e(b.java:1165)
    com.ibm.db2.jcc.b.b.b(b.java:1090)
    com.ibm.db2.jcc.b.b.q(b.java:925)
    com.ibm.db2.jcc.b.b.a(b.java:665)
    com.ibm.db2.jcc.b.b.a(b.java:654)
    com.ibm.db2.jcc.b.b.<init>(b.java:293)
    com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:165)
    com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:505)
    com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:450)
    sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
    org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    Please help.
    Thanks

  • Legacy db2 jdbc 2.0 connectivity

    i wish to use jdbc 2.0 batch capabilities with my COM.ibm.db2.jdbc.net.DB2Driver implementations that currently runs natively on an AIX 5.3 machine. My DB2 is 7.1 on a windows machine outside the firewall so i don't want to consider moving the implementation from the AIX box.
    The 7.1 package seems to come with some jni dll interface to allow for jdbc 2.0. Since i want to keep the routine on the AIX box does anyone have any suggestions on what to do?
    My searches only brought up a db2 8.0 type 4 driver that didn't work.
    thanks in advance for the help,
    graeme.

    well i'm hoping someone can help me find a good driver. that is why i mentioned the only one i could find. i never find traversing ibms sites for support downloads an easy task and was hoping someone who focusses on db2/nt would be able to provide assistance.
    i've been very lucky on this site before, there are a lot of smart blokes around.

Maybe you are looking for

  • My laptop turns off when i remove the power cord

    I have a Pavilion dv7-6c27cl running windows 7 (64 bit). Everytime I remove my laptop from the power cord, it shuts down immdiently. The battery says that it is at 77% and charging. I don't know what wrong at all. The light on the side is orange. Ide

  • My Xperia Mini Pro Touchscreen error after install Custom Rom , and now Bricked / Bootloop

    Hi There. . I've some problem here. . My Xperia Mini Pro SK17i Touchscreen error after install Custom Rom , and now Bricked / Bootloop I've tryin' to use Flashtool and flash Stock Firmware, but it still bricked. . Any body may have a sollution for me

  • Can SAP BC do that?

    Hi All, there is a requirement in our project to create a client side SAP proxy, so that all BAPI RFC requests would first go through this proxy and get logged. The end goal is for the proxy is to generate replies when the target SAP server is unavai

  • Infuriating IMAP problem in Mail - Help!

    I have just starting hooking up Mail with our company's IMAP server. I need to do this since I use a desktop and a laptop, both of which need to have exactly the same e-mail on them, including flagged items, sent etc. It seems to work OK except for o

  • IP Communicator Upgrade

    Hi Guys, I wonder if someone can guide. I have a customer who has deployed 10*IPC2.1 softphone clients and wants to move to 7.0 with CUCM upgrade. They don't have UCSS with older IPCs. Does this mean they have to purchase IPC software and client lice