dbTalk Databases Forums  

[Info-Ingres] Installing and using an Ingres JDBC connection

comp.databases.ingres comp.databases.ingres


Discuss [Info-Ingres] Installing and using an Ingres JDBC connection in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Harden
 
Posts: n/a

Default [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 12:12 AM






Greetings All,



I have no experience in setting up and configuring a JDBC connection to an
Ingres database.



I am trying to experiment with iReport connecting to Ingres 9.2 (win32) but
I don't know how to setup (or even if its installed) a jdbc connection.



The directions I was given was



1. From esd.ingres.com/product downloads ... download applicable jdbc
driver for your version of Ingres

First problem. There is no mention of any jdbc drivers there that I can
find.





Then goes on to say extract the iijdbc.jar and copy to the iReports libs
folder (can find that)

I found an iijdbc.jar in %II_SYSTEM%\Ingres\lib directory so I tried
copying that to the specified directory.





Reading the connectivity guide, I found the bit that said that the jdbc can
be tested using

'java jdbcinfo' command



Tried running that and all I got was

Exception in thread "main" java.lang.NoClassDefFoundError: jdbcinfo

Caused by: java.lang.ClassNotFoundException: jdbcinfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: jdbcinfo. Program will exit.



I have a full installation of Ingres 9.2 including the .NET data provider



IVM shows its up and running, with a listen of II7



Its probably a newbie problem, but

What am I doing wrong, where should I be going?



TIA



Dic Harden

Reply With Quote
  #2  
Old   
John Dennis
 
Posts: n/a

Default Re: [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 12:48 AM






Richard,

java is case sensitive. If you "cd" to the ingres\lib directory and then
issue the command "java JdbcInfo" you should get a better result. or you
might - do you have the classpath variable defined? If you set
CLASSPATH=%II_SYSTEM\ingres\lib\iijdbc.jar;.; you should then be able to
run that command from the lib directory. If you are running 9.2 the
answer should be something like:

Ingres Corporation - JDBC Driver [3.4.7]

John

________________________________

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Richard Harden
Sent: Wednesday, 10 June 2009 3:12 PM
To: 'Ingres and related product discussion forum'
Subject: [Info-Ingres] Installing and using an Ingres JDBC connection



Greetings All,



I have no experience in setting up and configuring a JDBC connection to
an Ingres database.



I am trying to experiment with iReport connecting to Ingres 9.2 (win32)
but I don't know how to setup (or even if its installed) a jdbc
connection.



The directions I was given was



1. From esd.ingres.com/product downloads ... download applicable
jdbc driver for your version of Ingres

First problem. There is no mention of any jdbc drivers there that I can
find.





Then goes on to say extract the iijdbc.jar and copy to the iReports libs
folder (can find that)

I found an iijdbc.jar in %II_SYSTEM%\Ingres\lib directory so I tried
copying that to the specified directory.





Reading the connectivity guide, I found the bit that said that the jdbc
can be tested using

'java jdbcinfo' command



Tried running that and all I got was

Exception in thread "main" java.lang.NoClassDefFoundError: jdbcinfo

Caused by: java.lang.ClassNotFoundException: jdbcinfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: jdbcinfo. Program will exit.



I have a full installation of Ingres 9.2 including the .NET data
provider



IVM shows its up and running, with a listen of II7



Its probably a newbie problem, but

What am I doing wrong, where should I be going?



TIA



Dic Harden

Reply With Quote
  #3  
Old   
Richard Harden
 
Posts: n/a

Default Re: [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 01:40 AM



Hi John,





If I run java JdbcInfo from the ingres lib directory I get

##

d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



If I set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar

Then tried again

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>

##



If I set the class path to the directory, rather than the single file I get

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib



d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



LIB is defined correctly

And the contents of the lib folder is

d:\IngresII\ingres\lib>dir

Volume in drive D is D_Data_Disk

Volume Serial Number is 3425-A1AC



Directory of d:\IngresII\ingres\lib



10/06/2009 05:12 p.m. <DIR> .

10/06/2009 05:12 p.m. <DIR> ..

17/03/2009 09:48 a.m. 922 abfimain.obj

17/03/2009 09:48 a.m. 981 abfmain.obj

03/12/2008 01:06 p.m. 961 DrvInfo.class

17/03/2009 09:48 a.m. 202,972 edbc.jar

03/12/2008 01:06 p.m. 4,181 EdbcInfo.class

17/03/2009 09:41 a.m. 644 Iiclsadt.obj

11/04/2009 02:41 a.m. 15,698 iiiceapi.lib

17/03/2009 05:23 p.m. 318,451 iijdbc.jar

11/04/2009 02:13 a.m. 13,784 iilibapi.lib

11/04/2009 02:35 a.m. 7,376 iilibutil.lib

17/03/2009 09:41 a.m. 644 iiuseradt.obj

03/12/2008 01:06 p.m. 6,896 JdbcInfo.class

11/04/2009 02:29 a.m. 2,225,434 libingres.lib

17/03/2009 10:09 a.m. 752,732 libspat.lib

17/03/2009 09:53 a.m. 160,256 oiutil.doc

15 File(s) 3,711,932 bytes

2 Dir(s) 189,443,981,312 bytes free



So, anymore suggestions John?



Cheers

Dic



From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of John
Dennis
Sent: Wednesday, 10 June 2009 5:48 p.m.
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC connection



Richard,



java is case sensitive. If you "cd" to the ingres\lib directory and then
issue the command "java JdbcInfo" you should get a better result. or you
might - do you have the classpath variable defined? If you set
CLASSPATH=%II_SYSTEM\ingres\lib\iijdbc.jar;.; you should then be able to run
that command from the lib directory. If you are running 9.2 the answer
should be something like:



Ingres Corporation - JDBC Driver [3.4.7]



John



_____

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Richard
Harden
Sent: Wednesday, 10 June 2009 3:12 PM
To: 'Ingres and related product discussion forum'
Subject: [Info-Ingres] Installing and using an Ingres JDBC connection

Greetings All,



I have no experience in setting up and configuring a JDBC connection to an
Ingres database.



I am trying to experiment with iReport connecting to Ingres 9.2 (win32) but
I don't know how to setup (or even if its installed) a jdbc connection.



The directions I was given was



1. From esd.ingres.com/product downloads ... download applicable jdbc
driver for your version of Ingres

First problem. There is no mention of any jdbc drivers there that I can
find.





Then goes on to say extract the iijdbc.jar and copy to the iReports libs
folder (can find that)

I found an iijdbc.jar in %II_SYSTEM%\Ingres\lib directory so I tried
copying that to the specified directory.





Reading the connectivity guide, I found the bit that said that the jdbc can
be tested using

'java jdbcinfo' command



Tried running that and all I got was

Exception in thread "main" java.lang.NoClassDefFoundError: jdbcinfo

Caused by: java.lang.ClassNotFoundException: jdbcinfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: jdbcinfo. Program will exit.



I have a full installation of Ingres 9.2 including the .NET data provider



IVM shows its up and running, with a listen of II7



Its probably a newbie problem, but

What am I doing wrong, where should I be going?



TIA



Dic Harden

Reply With Quote
  #4  
Old   
John Dennis
 
Posts: n/a

Default Re: [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 01:50 AM



Hi Richard,

set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar;.;

Note the semi-colons and full-stop at the end - the "." means to include
the current directory in the CLASSPATH, so when you have cd'd to the lib
directory it will find the JdbcInfo.class file.

Note also, this test doesn't require the DAS server to be running. It
doesnt connect to the database.

BTW, I am sure there are "more proper" ways to do this, but this works
for me...

John

________________________________

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Richard Harden
Sent: Wednesday, 10 June 2009 4:41 PM
To: 'Ingres and related product discussion forum'
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC
connection



Hi John,





If I run java JdbcInfo from the ingres lib directory I get

##

d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



If I set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar

Then tried again

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>

##



If I set the class path to the directory, rather than the single file I
get

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib



d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



LIB is defined correctly

And the contents of the lib folder is

d:\IngresII\ingres\lib>dir

Volume in drive D is D_Data_Disk

Volume Serial Number is 3425-A1AC



Directory of d:\IngresII\ingres\lib



10/06/2009 05:12 p.m. <DIR> .

10/06/2009 05:12 p.m. <DIR> ..

17/03/2009 09:48 a.m. 922 abfimain.obj

17/03/2009 09:48 a.m. 981 abfmain.obj

03/12/2008 01:06 p.m. 961 DrvInfo.class

17/03/2009 09:48 a.m. 202,972 edbc.jar

03/12/2008 01:06 p.m. 4,181 EdbcInfo.class

17/03/2009 09:41 a.m. 644 Iiclsadt.obj

11/04/2009 02:41 a.m. 15,698 iiiceapi.lib

17/03/2009 05:23 p.m. 318,451 iijdbc.jar

11/04/2009 02:13 a.m. 13,784 iilibapi.lib

11/04/2009 02:35 a.m. 7,376 iilibutil.lib

17/03/2009 09:41 a.m. 644 iiuseradt.obj

03/12/2008 01:06 p.m. 6,896 JdbcInfo.class

11/04/2009 02:29 a.m. 2,225,434 libingres.lib

17/03/2009 10:09 a.m. 752,732 libspat.lib

17/03/2009 09:53 a.m. 160,256 oiutil.doc

15 File(s) 3,711,932 bytes

2 Dir(s) 189,443,981,312 bytes free



So, anymore suggestions John?



Cheers

Dic



From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of John
Dennis
Sent: Wednesday, 10 June 2009 5:48 p.m.
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC
connection



Richard,



java is case sensitive. If you "cd" to the ingres\lib directory and then
issue the command "java JdbcInfo" you should get a better result. or you
might - do you have the classpath variable defined? If you set
CLASSPATH=%II_SYSTEM\ingres\lib\iijdbc.jar;.; you should then be able to
run that command from the lib directory. If you are running 9.2 the
answer should be something like:



Ingres Corporation - JDBC Driver [3.4.7]



John



________________________________

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Richard Harden
Sent: Wednesday, 10 June 2009 3:12 PM
To: 'Ingres and related product discussion forum'
Subject: [Info-Ingres] Installing and using an Ingres JDBC connection

Greetings All,



I have no experience in setting up and configuring a JDBC connection to
an Ingres database.



I am trying to experiment with iReport connecting to Ingres 9.2 (win32)
but I don't know how to setup (or even if its installed) a jdbc
connection.



The directions I was given was



1. From esd.ingres.com/product downloads ... download applicable
jdbc driver for your version of Ingres

First problem. There is no mention of any jdbc drivers there that I can
find.





Then goes on to say extract the iijdbc.jar and copy to the iReports libs
folder (can find that)

I found an iijdbc.jar in %II_SYSTEM%\Ingres\lib directory so I tried
copying that to the specified directory.





Reading the connectivity guide, I found the bit that said that the jdbc
can be tested using

'java jdbcinfo' command



Tried running that and all I got was

Exception in thread "main" java.lang.NoClassDefFoundError: jdbcinfo

Caused by: java.lang.ClassNotFoundException: jdbcinfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: jdbcinfo. Program will exit.



I have a full installation of Ingres 9.2 including the .NET data
provider



IVM shows its up and running, with a listen of II7



Its probably a newbie problem, but

What am I doing wrong, where should I be going?



TIA



Dic Harden

Reply With Quote
  #5  
Old   
ghingres@yahoo.co.uk
 
Posts: n/a

Default Re: Installing and using an Ingres JDBC connection - 06-10-2009 , 03:07 AM



Richard,

=================================================
To test that you have a good JDBC driver, try the following: -
=================================================

1/ Ensure you have the files "JdbcInfo.class" and "iijdbc.jar" inside
your %II_SYSTEM%\ingres\lib directory

2/ At the DOS command prompt use the following command (you can be in
any directory) : -

java -cp %II_SYSTEM%\ingres\lib;%II_SYSTEM%\ingres\lib\iijd bc.jar
JdbcInfo

If all is OK, you should see information about the JDBC driver
release

=================================================
Your Java reporting problem
=================================================

1/ All operating systems have a set of directories they will search to
resolve a command. Java is the same but for programs and classes that
make up programs. For Java this is the CLASSPATH variable which is set
at the operating system level before you start any Java program.

2/ In the case of your reporting program, normally there will be a
configuration file (or screen) that will describe where the program
looks for JDBC drivers (you enter the full path name and .JAR file
name). Think of the .JAR file as a ZIP file because that is what it
is.. you can use 7-zip to explore it :-) Just saves copying lots of
directory structures and keeps things tidy. The classname (driver) you
want from this file is called "com.ingres.jdbc.IngresDriver", which if
you explorer the .JAR file you'll see there's a file called
IngresDriver.class in the sub-directory of com\ingres\jdbc. The report
program will want to know this classname.

3) So now the report program should be configured to load the
iijdbc.jar file in the %II_SYSTEM%\ingres\lib area and use the class
called "com.ingres.jdbc.IngresDriver".

=================================================
Finally - using the JDBC driver
=================================================

1/ Now you've got the JDBC driver loaded into the reporting program,
you'll have to supply the URL for where it must go to find the Ingres
database (it's name/node/port/password etc)...

For Ingres you use the following structure: -

jdbc:ingres://hostort/db

so something like

jdbc:ingres://host:II7/testdb

the II7 is usually the default for the JDBC server component on an
ingres system configured with the installation code of II (but use CBF
on the system to see what the real port is).

=================================================

Hope this helps to clarify

Cheers

Gary

Reply With Quote
  #6  
Old   
Richard Harden
 
Posts: n/a

Default Re: [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 03:38 AM



Righty-Ho,



Got the syntax correct this time, and from the ingres\lib directory, I now
get the correct response.



Onward and upward,



Thanks John.



From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of John
Dennis
Sent: Wednesday, 10 June 2009 6:50 p.m.
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC connection



Hi Richard,



set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar;.;



Note the semi-colons and full-stop at the end - the "." means to include the
current directory in the CLASSPATH, so when you have cd'd to the lib
directory it will find the JdbcInfo.class file.



Note also, this test doesn't require the DAS server to be running. It doesnt
connect to the database.



BTW, I am sure there are "more proper" ways to do this, but this works for
me...



John



_____

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Richard
Harden
Sent: Wednesday, 10 June 2009 4:41 PM
To: 'Ingres and related product discussion forum'
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC connection

Hi John,





If I run java JdbcInfo from the ingres lib directory I get

##

d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



If I set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar

Then tried again

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>

##



If I set the class path to the directory, rather than the single file I get

##

d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib\iijdbc.jar



d:\IngresII\ingres\lib>java JdbcInfo

Exception in thread "main" java.lang.NoClassDefFoundError: JdbcInfo

Caused by: java.lang.ClassNotFoundException: JdbcInfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: JdbcInfo. Program will exit.



d:\IngresII\ingres\lib>set CLASSPATH=%II_SYSTEM%\ingres\lib



d:\IngresII\ingres\lib>java JdbcInfo

Error loading driver class 'com.ingres.jdbc.IngresDriver':

com.ingres.jdbc.IngresDriver



d:\IngresII\ingres\lib>

##



LIB is defined correctly

And the contents of the lib folder is

d:\IngresII\ingres\lib>dir

Volume in drive D is D_Data_Disk

Volume Serial Number is 3425-A1AC



Directory of d:\IngresII\ingres\lib



10/06/2009 05:12 p.m. <DIR> .

10/06/2009 05:12 p.m. <DIR> ..

17/03/2009 09:48 a.m. 922 abfimain.obj

17/03/2009 09:48 a.m. 981 abfmain.obj

03/12/2008 01:06 p.m. 961 DrvInfo.class

17/03/2009 09:48 a.m. 202,972 edbc.jar

03/12/2008 01:06 p.m. 4,181 EdbcInfo.class

17/03/2009 09:41 a.m. 644 Iiclsadt.obj

11/04/2009 02:41 a.m. 15,698 iiiceapi.lib

17/03/2009 05:23 p.m. 318,451 iijdbc.jar

11/04/2009 02:13 a.m. 13,784 iilibapi.lib

11/04/2009 02:35 a.m. 7,376 iilibutil.lib

17/03/2009 09:41 a.m. 644 iiuseradt.obj

03/12/2008 01:06 p.m. 6,896 JdbcInfo.class

11/04/2009 02:29 a.m. 2,225,434 libingres.lib

17/03/2009 10:09 a.m. 752,732 libspat.lib

17/03/2009 09:53 a.m. 160,256 oiutil.doc

15 File(s) 3,711,932 bytes

2 Dir(s) 189,443,981,312 bytes free



So, anymore suggestions John?



Cheers

Dic



From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of John
Dennis
Sent: Wednesday, 10 June 2009 5:48 p.m.
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC connection



Richard,



java is case sensitive. If you "cd" to the ingres\lib directory and then
issue the command "java JdbcInfo" you should get a better result. or you
might - do you have the classpath variable defined? If you set
CLASSPATH=%II_SYSTEM\ingres\lib\iijdbc.jar;.; you should then be able to run
that command from the lib directory. If you are running 9.2 the answer
should be something like:



Ingres Corporation - JDBC Driver [3.4.7]



John



_____

From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Richard
Harden
Sent: Wednesday, 10 June 2009 3:12 PM
To: 'Ingres and related product discussion forum'
Subject: [Info-Ingres] Installing and using an Ingres JDBC connection

Greetings All,



I have no experience in setting up and configuring a JDBC connection to an
Ingres database.



I am trying to experiment with iReport connecting to Ingres 9.2 (win32) but
I don't know how to setup (or even if its installed) a jdbc connection.



The directions I was given was



1. From esd.ingres.com/product downloads ... download applicable jdbc
driver for your version of Ingres

First problem. There is no mention of any jdbc drivers there that I can
find.





Then goes on to say extract the iijdbc.jar and copy to the iReports libs
folder (can find that)

I found an iijdbc.jar in %II_SYSTEM%\Ingres\lib directory so I tried
copying that to the specified directory.





Reading the connectivity guide, I found the bit that said that the jdbc can
be tested using

'java jdbcinfo' command



Tried running that and all I got was

Exception in thread "main" java.lang.NoClassDefFoundError: jdbcinfo

Caused by: java.lang.ClassNotFoundException: jdbcinfo

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: jdbcinfo. Program will exit.



I have a full installation of Ingres 9.2 including the .NET data provider



IVM shows its up and running, with a listen of II7



Its probably a newbie problem, but

What am I doing wrong, where should I be going?



TIA



Dic Harden

Reply With Quote
  #7  
Old   
Richard Harden
 
Posts: n/a

Default Re: [Info-Ingres] Installing and using an Ingres JDBC connection - 06-10-2009 , 04:28 AM



Thanks Gary,

A truly helpful explanation.

Based on what John had said earlier, and your explanation I was able to get
a correct response from the 'java jdbcinfo' (yes, I now realise its also
case-sensitive)

That done, I set the CLASSPATH as suggested as a system environment
variable. (I was manually setting it in a dos window whilst testing)

Once that was done, I re-started iReports and the ingres jdbc was now
available

Successfully created and tested a connection to my db, so its now only a
matter of experimenting / learning iReports


To all who replied,


Thanks a-lot you guys are life-savers.
Dic.



-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
ghingres (AT) yahoo (DOT) co.uk
Sent: Wednesday, 10 June 2009 8:08 p.m.
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Installing and using an Ingres JDBC connection

Richard,

=================================================
To test that you have a good JDBC driver, try the following: -
=================================================

1/ Ensure you have the files "JdbcInfo.class" and "iijdbc.jar" inside
your %II_SYSTEM%\ingres\lib directory

2/ At the DOS command prompt use the following command (you can be in
any directory) : -

java -cp %II_SYSTEM%\ingres\lib;%II_SYSTEM%\ingres\lib\iijd bc.jar
JdbcInfo

If all is OK, you should see information about the JDBC driver
release

=================================================
Your Java reporting problem
=================================================

1/ All operating systems have a set of directories they will search to
resolve a command. Java is the same but for programs and classes that
make up programs. For Java this is the CLASSPATH variable which is set
at the operating system level before you start any Java program.

2/ In the case of your reporting program, normally there will be a
configuration file (or screen) that will describe where the program
looks for JDBC drivers (you enter the full path name and .JAR file
name). Think of the .JAR file as a ZIP file because that is what it
is.. you can use 7-zip to explore it :-) Just saves copying lots of
directory structures and keeps things tidy. The classname (driver) you
want from this file is called "com.ingres.jdbc.IngresDriver", which if
you explorer the .JAR file you'll see there's a file called
IngresDriver.class in the sub-directory of com\ingres\jdbc. The report
program will want to know this classname.

3) So now the report program should be configured to load the
iijdbc.jar file in the %II_SYSTEM%\ingres\lib area and use the class
called "com.ingres.jdbc.IngresDriver".

=================================================
Finally - using the JDBC driver
=================================================

1/ Now you've got the JDBC driver loaded into the reporting program,
you'll have to supply the URL for where it must go to find the Ingres
database (it's name/node/port/password etc)...

For Ingres you use the following structure: -

jdbc:ingres://hostort/db

so something like

jdbc:ingres://host:II7/testdb

the II7 is usually the default for the JDBC server component on an
ingres system configured with the installation code of II (but use CBF
on the system to see what the real port is).

=================================================

Hope this helps to clarify

Cheers

Gary
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.