Hi,

> try
> {
>       Class.forName("postgresql.Driver");
>       db = DriverManager.getConnection(url, usr, pwd);
>       st = db.createStatement();
> }
> st.executeUpdate(crt);
> ^^^^^^^^^^^^^^^^^^^^^^^^
> //While executing this statement it gives nullpointer

It looks as though the driver can't create a statement, since
"st" is null.  Are you sure you are including absolutely all the classes
required by all parts of your application and your jdbc driver?  To test
this specifically, try putting all the classes you use in one base
directory, then set your path variables and make sure that classes are
being only loaded from there and rt.jar.  Then jar that directory and see
what happens!

Another option might be turning on verbose class loading to see what's
happening.

Both these ideas should help to detect class loading, which by your
description sounds like the base of your problem, since it works out of
the jar.

Cheers,
dstn.


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to