[newbie] Netbeans and Oracle 11g jdbc driver

Z

zzzato

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
 
M

markspace

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:

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.
 
J

John B. Matthews

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:



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>
 
A

Alberto Salvati

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.
 
A

Alberto Salvati

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.
 
L

Lew

Alberto said:
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.
 
L

Lew

Alberto said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top