How to create database connection using DB2Driver in JDeveloper 10.1.2.1.0?

I am trying to create a JDeveloper/Data Connection using com.oracle.ias.jdbc.db2.DB2Driver. The driver is registered from a User Libraries: DataDirect JDBC. I have the following class path for the library:
E:\DataDirect\3.4\lib\YMdb2.jar;E:\DataDirect\3.4\lib\YMbase.jar;E:\DataDirect\3.4\lib\YMutil.jar
I have no trouble configuring the connection but when I test it and I got ‘No suitable driver Vendor code 0’. What’s wrong? I have successfully created several database connections using Oracle thin driver. This is first time I am using a third party driver. Has any one successfully create a database connection using the com.oracle.ias.jdbc.db2.DB2Driver?

Hi
Since the error points to the unavailability of the driver class,can you double check your library claspath entries again.
I just tried a DB2 connection using the following properties and the connection went through fine:
Driver class name: com.oracle.ias.jdbc.db2.DB2Driver
URL: jdbc:merant:db2://<host_name>:50000;DatabaseName=SAMPLE
Thanks
Prasanth

Similar Messages

  • How to create database connection and how to call it using Java

    Hi,
    Good day! I'd like to know how I can create a db connection in JDev, then use this connection to retrieve data using a Java Class? I've seen using New Gallery > Database Connection. But I'm not sure how I can access this connection using Java and display some output from the retrieved records.
    Any steps/tutorial link is appreciated.
    Thanks in advance,
    Rian

    Hi,
    If you need to access the connection in the entity object then refer http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#BABEIFAI i.e in MODEL.
    But if you want to access connection in ViewController part of application then you need to do it manually.For this i am giving you my code for reference.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.faces.context.FacesContext;
    import oracle.jdbc.pool.OracleDataSource;
    public class DataHandler {
    String jdbcUrl = null;
    String userid = null;
    String password = null;
    Connection conn;
    public static final String CONNECTION_STRING =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("connectionString");
    public static final String USER_NAME =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("userName");
    public static final String PASSWORD =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("password");
    public DataHandler(String jdbcUrl, String userid, String password,
    boolean shouldConnect) throws SQLException {
    this.jdbcUrl = jdbcUrl;
    this.userid = userid;
    this.password = password;
    if (shouldConnect) {
    connect();
    public void connect() throws SQLException {
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(userid, password);
    public Connection getConnection() {
    return conn;
    public ResultSet executeQuery(String sql) throws SQLException {
    Statement s = conn.createStatement();
    return s.executeQuery(sql);
    public void closeConnection() throws SQLException {
    if (!conn.isClosed()) {
    conn.close();
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • How to create  database connection in JDev

    Dear Sir,
    I am not able to create a connection to the Oracle9i database in JDeveloper.Plz guide me.
    Thanx
    Aradhana Jain

    Please post this in the JDeveloper forums for an appropriate response: JDeveloper and ADF
    OTN

  • Unable to create database connection using jboss

    hi masters,
    i have developed an application using jdeveloper ADF, and created .EAR file and deployed it in jboss. it shows that application is deployed, but when using application using URL http://localhost:8080/appl/index.jspx it opens login window, but when we enter username and password it does not authenticate user.
    i am not developer, but a DBA and ask to deploy application using jboss. how can i resolve this issue??? while starting , jboss generates error "creating connection to database failed- unauthenticated login attempted"
    what might be the issue?????
    posting my exact error here, hope someone will post some suggestion.
    MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
    ObjectName: jboss.mq:service=PersistenceManager
    state: FAILED
    I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS
    Depends On Me: jboss.mq:service=DestinationManager
    java.lang.SecurityException: Invalid authentication attempt, principal=null
    ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
    state: FAILED
    I Depend On: jboss:service=TransactionManager
    jboss.jca:service=DataSourceBinding,name=DefaultDS
    Depends On Me: java.lang.SecurityException: Invalid authentication attempt, principal=null
    ObjectName: jboss.mq:service=StateManager
    state: FAILED
    I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS
    Depends On Me: jboss.mq:service=DestinationManager
    org.jboss.mq.SpyJMSException: Error creating connection to the database.; - nested throwable: (java.
    lang.SecurityException: Invalid authentication attempt, principal=null)
    ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
    state: FAILED
    I Depend On: jboss.jca:service=DataSourceBinding,name=DefaultDS
    Depends On Me: java.lang.SecurityException: Invalid authentication attempt, principal=null
    any suggestion will be appreciated..
    thanks and regards
    VD
    Edited by: vikrant dixit on १९ फ़रवरी, २००९ ९:१६ अपराह्न

    hello all,
    do anyone have any suggestion????
    thanks and regards
    VD

  • How to create multi connections using JCO in different application servers

    Hi all,
    I want to connect to sap using jco from different servers at the same time.
    There are 3 Jave application servers now. But I can only connect the sap servers using ONE server ( random ) at same time. It means when one server connect to sap , the other 2 servers CANNOT connect to sap.
    Anyone konw what wrong?
    Thanks in advance.
    Ned

    ......

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • How to create a connection pooling in Netbeans 6.0 using the oracle driver

    hi all,
    I am using Netbeans 6.0. Apache Tomcat 6.0.14 server, oracle 9i.
    I tried to create a connection pooling using tomcat web server.
    I have included the following code in context.xml and web.xml.
    CONTEXT.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/network1">
    <Resource name="jdbc/myoracle"
    auth="Container"
    type="javax.sql.DataSource"
    username="scott"
    password="tiger"
    factory="BasicDataSourceFactory"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:odbc:thin:@127.0.0.1:1521:mydb"
    maxActive="20"
    maxIdle="10"
    maxwait="-1"/>
    </Context>
    WEB.XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    After that i have included the following JDBC driver's jar files in the $Catalina_Home/lib folder.
    classes 111.jar,
    classes 111_g.jar
    classes12.jar
    classes 12_g.jar
    classes12dms.jar
    classes12dms_g.jar
    nls_charset11.jar
    nls_charset12.jar
    ocrs12.jar
    ojdbc14.jar
    ojdbc14_g.jar
    Then i stop the tomcat web server and start it again.
    In jsp page i have included the following code:
    Context ctx=new InitialContext();
    Context envctx=(Context)ctx.lookup("java:comp:env");
    DataSource ds=(DataSource)envctx.lookup("jdbc/myoracle");
    Connection con=ds.getConnection(); ----->(In this line an error occured that Connection class cannot be found.)
    please help me how to create a connection pooling and rectify the error in conneciton.
    Thanks in advance

    Please refer
    http://www.netbeans.org/kb/60/web/customer-book.html

  • How to create database using shell script

    hai
    how to create database using shell script

    The documentation details the steps to create a database manually. Another option is to use DBCA to create the scripts. DBCA will give you a complete set of scripts that will create a database.
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14231/create.htm#sthref220

  • How to get database connection in common java class

    hi friendz,
    plz help me...
    I am using JDEV 11.1.2.2.0 version.
    my problem is I'm writing common java class which can reuse any application.
    in this case when im create database connection like this,
    String username = "a";
    String password = "b";
    String thinConn = "jdbc:oracle:thin:@IP:1521:database";
    DriverManager.registerDriver(new OracleDriver());
    Connection conn =
    DriverManager.getConnection(thinConn, username, password);
    conn.setAutoCommit(false);
    return conn;
    but this statement not working in java class.its working only backing bean.
    import oracle.jdbc.OracleDriver;
    DriverManager.registerDriver(new OracleDriver());
    how can i do that??
    hope your help
    -Harsh-

    What is the error message in Java class?
    With JDBC 4.0 driver the DriverManager class has added support for the Java SE Service Provider mechanism to the getConnection() and getDrivers() methods using which JDBC drivers may be loaded automatically. The following Class.forName() method is not required to be invoked.
    Class.forName(“oracle.jdbc.OracleDriver”);
    Only the following is required to obtain a connection.
    String url="jdbc:oracle:thin:@localhost:1521:ORCL";
    Connection connection = DriverManager.getConnection(url,"oe", "pw");

  • How to create database from servlet?

    Hey all,
    I want to create database and store the tables in that database.
    I don't have idea.
    any help..
    the concern is...
    I am using WSAD as a IDE.my backend is Oracle.
    First ,I need to check if user having ms-access in his system.if yes
    then I need to create datbase in that ..and store some tables in that database .
    any sample code snippet helpful for me..

    ok.Thank you.
    I am developing business application.The users enter some data.and I am storing that data into the oracle database.
    for every month...they need to check again that data and validate.
    for that...I want to create MS-access connection and get (oracle ) those data and store in ms-access ,I need to give link for that data to validate them. after that I will update.
    I don't have any idea how to store the data after i am retrieving data from the oracle database.how to generate link to that.
    now...I am trying to create database connection to the MS-ACCESS.I am
    using WSAD 5.1.2 VERSION.and jdk 1.4 version.
    below is my code..for connecting ms-access..
                        System.out.println("start connect");
                        try {
                             Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
                        } catch (Exception e1) {
                             e1.printStackTrace();
                        System.out.println("connected..");
                   Connection con=DriverManager.getConnection("jdbc:odbc:msd","","");
                   Statement stmt=con.createStatement();
                   result=stmt.execute("create table test(col1 char(10))");
                   System.out.println("the success");
    its giving below error. I know that the classpath error.But where I need to give that classpath .I think I need to get driver software from somewhere.please any suggestions......
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.Class.forName1(Native Method)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at java.lang.Class.forName(Class.java(Compiled Code))
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.dbCreate(DBGenerationServlet.java:102)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.doPost(DBGenerationServlet.java:87)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.philips.servlets.DBGenerationServlet.doGet(DBGenerationServlet.java:73)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    [4/7/06 19:32:53:699 SGT] 7f4721ba SystemErr R      at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    [4/7/06

  • How to create database in timesten?

    Please let me know how to create database in timesten as we create in Oracle 10g named orcl
    Please guide in detail
    Thanks.

    Hi!
    You can use TimesTen in standalone mode instead of Cache connect to Oracle.
    If you have deployed TimesTen on Linux then you should make DSN in sys.odbc.ini which is located in info folder of TimesTen. If you are using Windows then you can use ODBC utility in control panel.
    You can see the documentation of TimesTen for more detailed information.
    /Ahmad

  • When and How to close database connection in JSP?

    Hi there,
    I am using MySQL and JDBC 3.0, in my system, When and How to close database connection in JSP?
    Thanks in advance.
    Lonely Wolf
    <%@ page session="true" language="java" %>
    <jsp:include page="checkauthorization.jsp" />
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    <%--
    Execute query, with wildcard characters added to the
    parameter values used in the search criteria
    --%>
    <sql:query var="availablecomputerList" dataSource="jdbc/Bookingcomputer" scope="request">
    SELECT * FROM computer where status=0
    order by s_code
    </sql:query>
    <html>
    <head>
    <title>Search Result</title>
    </head>
    <body bgcolor="white">
    <center>
    <form action="checkin.jsp" method="post">
    <input type="submit" value="Back to Check-in Page">
    </form>
    <c:choose>
    <c:when test="${availablecomputerList.rowCount == 0}">
    Sorry, no available computer found.
    </c:when>
    <c:otherwise>
    The following available computers were found:
    <table border="1">
    <th>Computer</th>
    <th>Description</th>
    <th>Status</th>
    <c:forEach items="${availablecomputerList.rows}" var="row">
    <tr>
    <td><c:out value="${row.s_code}" /></td>
    <td><c:out value="${row.description}" /></td>
    <td><c:out value="${row.status}" /></td>
    </tr>
    </c:forEach>
    </table>
    </c:otherwise>
    </c:choose>
    </center>
    </body>
    </html>

    when should you close the connection? when you're done with it.
    how should you close the connection? like this: conn.close();
    that said, doing this in a JSP page is bad form and not recommended
    JSP's typically don't contain ANY business or data logic

  • How to create CRUD application using bapi in webdynpro java

    Hi All,
          I have implemented the CRUD application using bapi  Now i want to create, retrieve , update and delete the existing table by click on Insert, delete, retrieve ,and update button dynamically. i get null values from database,  Please let me know the logic and procedure for how to create CRUD application using bapi  Please any one help me..
    Thanks in advance

    Hi,
    Hey tell me one thing your BAPI having CURD methods. See you are getting data from BAPI and pull the data in Table in WDJ. So if u can do any action it will comes trough BAPI.
    If your BAPI having CURD methods. You can implement CURD methods in WDJAVA also.
    @ You said you are getting null values from the database. Please let me know what code you have to wrote for CURD. Please tell me.
    Hope this is help full for u
    Best Regards
    Vijay K

  • How to create JDBC connection in J2ME with MS-SQL server?

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

    I need to have database connection in PDA with SQL server,as i am new to J2ME ,i dont know how to create jdbc connection on J2ME device.Please help me out with this problem........

  • How to create database with ASM

    HI
    How to create database with ASM?
    I install vmware workstation on window XP .On virtual machine install Linux 5 enterprise (Oracle) install.
    I install oracle DB software only. Also make 3 disk for ASM .
    1 -- When I want to install oracle DB with ASM . In this process candidate disks not show . Why?
    How I can see disks ..
    so I simple install oracle DB software only.
    2 -- Now I want to create database with ASM by DBCA .
    What process I will follow ?
    Please guide me
    Thanks

    Hi
    Steps to create database with ASM.
    1.Install oracle binary with active CRS(For single node installation CRS is activated when you run root.sh) .
    2.Create disk without file ssytem.
    3.Assign disk to raw .
    4.Change owner and permission to raw devices.
    5.Configure ASM manually or USing DBCA.
    Manually ASM Configuration.
    a.Create initialization parameter file and password file.
    b.Mandatory parameter is "instance_type=asm" as per your need configure rest of parameter like db_cache_size,large_pool_size,processes,remote_login_passwordfile,shared_pool_size etc..
    c.To discover disk configure "asm_diskstring=/dev/raw/raw*"
    Using DBCA to configure ASM.
    1.In storage type section choose ASM.It will ask for password of sysdba in 10g.
    2.ASM configuration window will open -> here it create disk group -> it shows all available ASM candidate disk automatical -> choose normal redundancy,external redundancy or high redundancy.
    ASM disk also can be conbfigured with ASMLIB .
    If ASM disk is configured you can start asm instance in nomount state and query to v$asm_disk to see all candidate disk.V$asm_disk only shows disk which is configured in asm_diskstrings.
    Hope this will help U,
    Tinku

Maybe you are looking for

  • Newbie Here..plz help

    Hi Friends, I'm a newbie to Flash Media Server.. i have a book titled "Programmin Flash Communication Server"..its kinda outdated though.. does nyone know any site thats good for newbies?im plannin on makin an two-way audio conferencin site.. which l

  • Images sporadically not loading

    All of a suddent, I have started experiencing a problem where images are not loading in my application. I have four applications in my workspace and they all share images that are defined for any application in the workspace to use. This issue seems

  • Performance consequences to adding materialized view logs to tables?

    I am writing a very complex query for a client of our transactional database system and this will require the creation of a materialized viewbecause all attempts at tuning to make performance acceptable have failed. I want to enable fast refresh of t

  • Why do I have two different speed connections with my express?

    I have my Airport Express setup. On my MacBook Pro using speedtest, the download connection shows 15.0 mbps, but downloads are only 0.15 mbps...10 times too slow. When I run speedtest on my iPhone 4S attached to same wifi, the download speed only sho

  • Drop-down menus hangs

    Hi, ever so often, my menus hangs when I try to select something. It's the same in the "Files" window - I highlight a file and right click to get my options, when menu opens, the highlight gets stuck on some menu item and I can't select anything. It