Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Re: JDBC driver...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 1983 of 2028
Post > Topic >>

Re: JDBC driver not found error: Windows XP / JDK1.6.06 / PG8.2.9

by pg@[EMAIL PROTECTED] (Dave Cramer) Jul 1, 2008 at 10:33 AM

You have used a capital P in the url jdbc:Postgresql://localhost:5432/ 
postgres","postgres","1234");

Dave
On 1-Jul-08, at 9:28 AM, Chandra ASGI Tech wrote:

> I have PostgreSQL 8.2.9 on Windows XP, with JDK 1.6.0_06.   Have got  
> the postgresql-8.2-508.jdbc4.jar  jdbc driver in /lib/ext of the  
> Java folder.
>
> HAve set both the PATH and CLASSPATH a****priately
>
> My Java code for testing is:
>
> im****t java.sql.*;
>
> class postgreSQLTest
>  {
>
> public static void main (java.lang.String[] args) throws Exception {
>
> try{
>
> Class.forName("org.postgresql.Driver");
>
> Connection con =
> DriverManager.getConnection("jdbc:Postgresql://localhost:5432/ 
> postgres","postgres","1234");
>
> Statement stmt = con.createStatement();
> ResultSet rs = stmt.executeQuery("select * from country");
>
> while(rs.next())
>
> {
>
> System.out.println(rs.getString(1)+"<br>");
>
> }
>
> }catch(Exception e){
>
> System.out.println(e);
>
> }
>
> }
>
> }
>
>
> But I get the error
> Exception in thread "main" java.lang.NoClassDefFoundError:  
> postgreSQLTest
>
>
> Any help? Thanks in advance.
>
>
> - ChandraASGI


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
 




 5 Posts in Topic:
JDBC driver not found error: Windows XP / JDK1.6.06 / PG8.2.9
chandraasgi@[EMAIL PROTEC  2008-07-01 09:28:55 
Re: JDBC driver not found error: Windows XP / JDK1.6.06 / PG8.2.
pg@[EMAIL PROTECTED] (Da  2008-07-01 10:33:08 
Re: JDBC driver not found error: Windows XP / JDK1.6.06 /
oliver@[EMAIL PROTECTED]   2008-07-02 03:21:42 
Re: JDBC driver not found error: Windows XP / JDK1.6.06 / PG8.2.
chandraasgi@[EMAIL PROTEC  2008-07-01 12:28:44 
Re: JDBC driver not found error: Windows XP / JDK1.6.06 /
tivvpgsqljdbc@[EMAIL PROT  2008-07-02 11:36:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 2:21:03 CDT 2008.