Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Info-Ingres] Newby Java connection issue

14 views
Skip to first unread message

Martin Bowes

unread,
May 14, 2012, 8:56:22 AM5/14/12
to info-...@kettleriverconsulting.com

Hi All,

 

I’m starting some experiments writing java code to connect to an Ingres database.

 

I’m using a Linux box to develop.

 

I’ve set CLASSPATH to $II_SYSTEM/ingres/lib/iijdbc.jar:.

 

The initial code compiles OK with javac, but when I attempt to execute the class I get:

Exception in thread "main" java.lang.ClassFormatError: com.ingres.jdbc.IngresDriver (unrecognized class file version)

 

Any ideas what I’m missing?

 

Marty

Roy Hann

unread,
May 14, 2012, 9:17:31 AM5/14/12
to
That rings a bell. I think I ran into that last year some time. My
java and javac versions where out of sync.

--
Roy

UK Actian User Association Conference 2012 will be on Tuesday June 19 2012.
Register now at https://www.regonline.co.uk/ukiua2012
The latest information is available from www.uk-iua.org.uk.


Martin Bowes

unread,
May 14, 2012, 9:39:48 AM5/14/12
to Ingres and related product discussion forum

Hi Roy,

 

java --version

java version "1.4.2"

gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-52)

 

Copyright (C) 2006 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 

javac -version

Eclipse Java Compiler v_677_R32x, 3.2.1 release, Copyright IBM Corp 2000, 2006. All rights reserved.

 

Marty

From: Martin Bowes [mailto:martin...@ctsu.ox.ac.uk]
Sent: 14 May 2012 13:56
To: info-...@kettleriverconsulting.com
Subject: [Info-Ingres] Newby Java connection issue

 

Hi All,

 

I’m starting some experiments writing java code to connect to an Ingres database.

 

I’m using a Linux box to develop.

 

I’ve set CLASSPATH to $II_SYSTEM/ingres/lib/iijdbc.jar:.

 

The initial code compiles OK with javac, but when I attempt to execute the class I get:

Exception in thread "main" java.lang.ClassFormatError: com.ingres.jdbc.IngresDriver (unrecognized class file version)

 

Any ideas what I’m missing?

 

Marty

Paul Mason

unread,
May 14, 2012, 9:29:56 AM5/14/12
to Ingres and related product discussion forum

What version of Java are you using? Is it possible you’re picking up javac from a later version than java itself?

 

Java –version

Javac -version

Roy Hann

unread,
May 14, 2012, 10:18:07 AM5/14/12
to
Martin Bowes wrote:

> Hi Roy,
>
> java --version
> java version "1.4.2"
> gij (GNU libgcj) version 4.1.1 20070105 (Red Hat 4.1.1-52)
>
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> javac -version
> Eclipse Java Compiler v_677_R32x, 3.2.1 release, Copyright IBM Corp 2000, 2006. All rights reserved.

I have no idea if those are compatible.

My java dev system shows:

c:\temp>javac -version
javac 1.6.0_22

c:\temp>java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

Martin Bowes

unread,
May 14, 2012, 10:24:15 AM5/14/12
to Ingres and related product discussion forum

Ok a fresh install: yum install *jdk* and suddenly java and javac have the same version and the test program is now working!

 

Hurrah!

 

Marty

Ingres Forums

unread,
May 14, 2012, 11:23:04 AM5/14/12
to

Not sure what Ingres JDBC driver you are using but 4.0.x requires Java
1.6 as a minimum.

See 'Ingres Java Development Center/Ingres Java Learn - Ingres Community
Wiki' (http://tinyurl.com/79trl7z) for minimum JRE versions for various
Ingres JDBC drivers.

Regards,
Teresa


--
teresa
------------------------------------------------------------------------
teresa's Profile: http://community.actian.com/forum/member.php?userid=26
View this thread: http://community.actian.com/forum/showthread.php?t=14422

0 new messages