[newbie] Netbeans and Oracle 11g jdbc driver

Discussion in 'Java' started by zzzato@gmail.com, May 31, 2012.

  1. Guest

    Hi, all.
    I'm a newbie in java but I work in borland delphi since 1997.
    Now, I'm learning java.
    I'm using netbeans, oracle 11g 64bit database and glassfish.
    I'm sorry if my question is OT or it's too simple for this ng...

    I've a simple jsp project made with netbeans.
    I've just only one jsp page to show data from a db table with a simple select statement.
    Netbeans connects database fine but when my project starts, response is an exception related to "database driver not found":


    http status 500
    no suitable driver found for jdbc/qweb

    Jdbc driver is present in glassfish\domains\domain1\lib

    I tried to add c:\app......\dbhome_1\jdbc\lib in prj-options-lib: non changes.

    There are other settings about jdbc driver? And, WHERE?


    I apologize for this (stupid) question.

    TIA

    A.Salvati
     
    , May 31, 2012
    #1
    1. Advertising

  2. markspace Guest

    On 5/31/2012 12:41 AM, wrote:
    > http status 500
    > no suitable driver found for jdbc/qweb
    >
    > Jdbc driver is present in glassfish\domains\domain1\lib



    I guess Oracle might be shipping their own drivers with Glassfish now,
    but I'd also be kinda surprised, since drivers need to be matched to an
    installation, and are frequently updated. Just for kicks, please
    download a new driver that matches your Oracle db version and such-like.
    Searching the web for "Oracle jdbc", I find this:

    <http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html>


    >
    > I tried to add c:\app......\dbhome_1\jdbc\lib in prj-options-lib: non changes.
    >
    > There are other settings about jdbc driver? And, WHERE?



    On your Projects tab, expand your web app project. There are items like
    Web Pages, Source Packages, Test Packages, Libraries, etc. Right click
    on Libraries, choose "Add Folder/Jar..." and browse to the Oracle driver
    you just downloaded.

    For example, for my web app I'm looking at right now, I had to add both
    derby.jar and mysql-connector-java-5.1.20-bin.jar (both are other
    vendor's database drivers). Your IDE doesn't know about extra .jar
    files unless you point it at the Jar file.
     
    markspace, May 31, 2012
    #2
    1. Advertising

  3. In article <jq7sk8$dr4$>, markspace <-@.> wrote:

    > On 5/31/2012 12:41 AM, wrote:
    > > http status 500
    > > no suitable driver found for jdbc/qweb
    > >
    > > Jdbc driver is present in glassfish\domains\domain1\lib

    >
    > I guess Oracle might be shipping their own drivers with Glassfish
    > now, but I'd also be kinda surprised, since drivers need to be
    > matched to an installation, and are frequently updated. Just for
    > kicks, please download a new driver that matches your Oracle db
    > version and such-like. Searching the web for "Oracle jdbc", I find
    > this:
    >
    > <http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html>
    >
    > > I tried to add c:\app......\dbhome_1\jdbc\lib in prj-options-lib: non
    > > changes.
    > >
    > > There are other settings about jdbc driver? And, WHERE?

    >
    > On your Projects tab, expand your web app project. There are items
    > like Web Pages, Source Packages, Test Packages, Libraries, etc.
    > Right click on Libraries, choose "Add Folder/Jar..." and browse to
    > the Oracle driver you just downloaded.
    >
    > For example, for my web app I'm looking at right now, I had to add
    > both derby.jar and mysql-connector-java-5.1.20-bin.jar (both are
    > other vendor's database drivers). Your IDE doesn't know about extra
    > .jar files unless you point it at the Jar file.


    zzzato: As you're using NetBeans, the illustrations here may help:

    <http://stackoverflow.com/q/1975973/230513>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, May 31, 2012
    #3
  4. First, many thanks for the answers.

    I know that my question is a stupid question.
    I've not experience in java and web.


    I'm already using jdbc driver suggested by you.
    I see in netbeans I'm using jdk 1.7.....and oracle jdbc driver is for jdk 1.6....

    .....maybe jdbc for 1.7 is not good for 1.6?

    I'll install jdk 1.6 and create a new prj in netbeans.
     
    Alberto Salvati, Jun 1, 2012
    #4
  5. Hi, John.
    Many thanks for your useful link.
    I had already made this attempt.

    As reply of other response, I'll try to use jdk 1.6.

    Many thanks.
    SYL

    A.
     
    Alberto Salvati, Jun 1, 2012
    #5
  6. Lew Guest

    Alberto Salvati wrote:
    > First, many thanks for the answers.
    >
    > I know that my question is a stupid question.


    There is absolutely nothing stupid about your question.

    In fact, even experienced developers have trouble with JDBC sometimes.

    > I've not experience in java and web.


    You should practice correct upper- and lower-case to get your
    mind used to the rigor of Java conventions.

    > I'm already using jdbc driver suggested by you.
    > I see in netbeans I'm using jdk 1.7.....and oracle jdbc driver is for jdk 1.6....
    >
    > ....maybe jdbc for 1.7 is not good for 1.6?


    It's the other way around - you are using JDBC for 1.6 under Java 7.

    That should not be any problem.

    > I'll install jdk 1.6 and create a new prj in netbeans.


    That will not be the answer, most likely.

    How are you setting up your JDBC driver? You only say
    you "tried to add" it, but not how you did that.

    The rules changed with Java 6.

    --
    Lew
     
    Lew, Jun 1, 2012
    #6
  7. Lew Guest

    Alberto Salvati wrote:
    > Many thanks for your useful link.
    > I had already made this attempt.
    >
    > As reply of other response, I'll try to use jdk 1.6.


    That is unlikely to get to the root of the problem.

    --
    Lew
     
    Lew, Jun 1, 2012
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Konrad Piersdorfer

    NetBeans and MySQL-JDBC-Driver

    Konrad Piersdorfer, Sep 1, 2003, in forum: Java
    Replies:
    0
    Views:
    830
    Konrad Piersdorfer
    Sep 1, 2003
  2. Betty
    Replies:
    1
    Views:
    9,901
    Juha Laiho
    May 21, 2005
  3. Bruce
    Replies:
    4
    Views:
    780
    Bjorn Abelli
    Mar 25, 2006
  4. Stryder
    Replies:
    3
    Views:
    3,374
    Stryder
    Apr 29, 2009
  5. Lew
    Replies:
    0
    Views:
    536
Loading...

Share This Page