Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   [newbie] Netbeans and Oracle 11g jdbc driver (http://www.velocityreviews.com/forums/t946602-newbie-netbeans-and-oracle-11g-jdbc-driver.html)

zzzato@gmail.com 05-31-2012 07:41 AM

[newbie] Netbeans and Oracle 11g jdbc driver
 
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

markspace 05-31-2012 01:44 PM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
On 5/31/2012 12:41 AM, zzzato@gmail.com 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.


John B. Matthews 05-31-2012 06:05 PM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
In article <jq7sk8$dr4$1@dont-email.me>, markspace <-@.> wrote:

> On 5/31/2012 12:41 AM, zzzato@gmail.com 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>

Alberto Salvati 06-01-2012 06:26 AM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
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 06-01-2012 06:30 AM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
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.

Lew 06-01-2012 06:24 PM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
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 06-01-2012 06:25 PM

Re: [newbie] Netbeans and Oracle 11g jdbc driver
 
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


All times are GMT. The time now is 04:43 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.