Mailinglist Archive: opensuse-programming (105 mails)

< Previous Next >
Re: [suse-programming-e] Exception in thread (JDBC for adabas D first use)
  • From: Prabu Subroto <prabu_subroto@xxxxxxxxx>
  • Date: Thu, 3 Jul 2003 15:50:57 -0700 (PDT)
  • Message-id: <20030703225057.80484.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Dear Verdi. Thank you very...very... much for your
furthered help.

It still doesn't give any change without I know why.

Here is my last try:
"
sag@susefujitsu:~/arsip> java -classpath
"/usr/sag/arsip/adabasd.jar:." konek
Exception in thread "main"
java.lang.NoClassDefFoundError:
com/softwareag/common/instrumentation/logging/LoggerFactory
at
de.sag.jdbc.adabasd.ADriver.<clinit>(ADriver.java:423)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at konek.main(konek.java:8)
sag@susefujitsu:~/arsip> java -classpath
".:/usr/sag/arsip/adabasd.jar" konek
Exception in thread "main"
java.lang.NoClassDefFoundError:
com/softwareag/common/instrumentation/logging/LoggerFactory
at
de.sag.jdbc.adabasd.ADriver.<clinit>(ADriver.java:423)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:140)
at konek.main(konek.java:8)
sag@susefujitsu:~/arsip>
"

The correct instance is :
"de.sag.jdbc.adabasd.ADriver".

Here is my current code:
===
import java.sql.*;

public class konek
{
public static void main(String[] args)
{
try {
Class.forName("de.sag.jdbc.adabasd.ADriver");

} catch (ClassNotFoundException e){
System.out.println("JDBC driver for Adabas D not
found");
e.printStackTrace();
}
try {
java.sql.Connection con =
java.sql.DriverManager.getConnection("jdbc:adabasd://127.0.0.1/MYDB",
"control", "adabas");
} catch (java.sql.SQLException e) {
System.out.println("Error " + e.getErrorCode() + "
" + e.getMessage());
e.printStackTrace();
}

}
}
--- Verdi March <cincaipatron@xxxxxxx> wrote:
> On Thursday 03 July 2003 19:34, Prabu Subroto wrote:
> > Exception in thread "main"
> > java.lang.NoClassDefFoundError: konek
>
> It seems that java is unable to find "konek". So
> here's what you
> need to verified:
> 1. You need to run java with [-cp
> ".:path_to_adabas_jar"] parameter.
> Notice the "." part? It instructs java to include
> current path when
> searching for classes. Without ".", you'll get
> "NoClassDefFOundError:
> konek".
> 2. With [-cp ".;path_to_adabass_jar"], from the
> previous mail, you got:
> Hallo Prabu
> JDBC driver for Adabas D not found
> Error 0 No suitable driver
> This means "konek" has been executed, but adabas
> jdbc driver can't be
> located. In your code, try to add
> e.printStackTrace() in both of the
> catch blocks, i.e
> try (...) { ... }
> catch (...) {
> ....
> e.printStackTrace();
> }
> This will give more detail of the error.
> Hopefully you'll find
> something.
>
> 3. Make sure you're instantiating the correct class
> -- is it "adabas"
> or "de.sag.jdbc.adabasd.ADriver"? I tend to
> believe that it should
> be "de.sag.jdbc.adabasd.ADriver".
>
> 4. If everything has been verified, as the last
> resort, try to unzipping
> adabasd.jar (you can simply use unzip) to, say
> /tmp/haha/, then make
> sure that file /tmp/haha
> de/sag/jdbc/adabasd/ADriver.class exists.
>
> --
>
> -- Verdi March --
>
>
> --
> To unsubscribe, email:
> suse-programming-e-unsubscribe@xxxxxxxx
> For additional commands, email:
> suse-programming-e-help@xxxxxxxx
> Archives can be found at:
> http://lists.suse.com/archive/suse-programming-e
>

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

< Previous Next >
Follow Ups
References