Your name : Gregory Faruch
Your email address : [EMAIL PROTECTED]
System Configuration
---------------------
Architecture (example: Intel Pentium) : Sparc
Operating System (example: Linux 2.0.26 ELF) : Solaris 2.9
PostgreSQL version (example: PostgreSQL-7.1.1): PostgreSQL-7.2
Compiler used (example: gcc 2.95.2) : gcc (GCC) 3.1
Please enter a FULL description of your problem:
------------------------------------------------
I tried to run the example : datestyle.java of jdbc interface. I have an
exception during the running.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
<greg@~/postgresqlJavaExample> java example/datestyle
jdbc:postgresql:corpus greg toto55 trace
PostgreSQL datestyle test v6.3 rev 1
DriverManager.initialize: jdbc.drivers = null
JDBC DriverManager initialized
registerDriver:
driver[className=org.postgresql.Driver,org.postgresql.Driver@6b97fd]
Connecting to Database URL = jdbc:postgresql:corpus
DriverManager.getConnection("jdbc:postgresql:corpus")
trying
driver[className=org.postgresql.Driver,org.postgresql.Driver@6b97fd]
getConnection returning
driver[className=org.postgresql.Driver,org.postgresql.Driver@6b97fd]
Connected...Now creating a statement
Running tests:
Test 0 - postgres,europeanNOTICE: DateStyle is Postgres with European
conventions
SQLWarning: reason(NOTICE: DateStyle is Postgres with European conventions
)
failed, returned 08-01-1998
Test 1 - postgres,usNOTICE: DateStyle is Postgres with US (NonEuropean)
conventions
SQLWarning: reason(NOTICE: DateStyle is Postgres with US (NonEuropean)
conventions
)
failed, returned 01-08-1998
Test 2 - isoNOTICE: DateStyle is ISO with US (NonEuropean) conventions
SQLWarning: reason(NOTICE: DateStyle is ISO with US (NonEuropean)
conventions
)
passed, returned 1998-01-08
Test 3 - sql,europeanNOTICE: DateStyle is SQL with European conventions
SQLWarning: reason(NOTICE: DateStyle is SQL with European conventions
)
Exception caught.
java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
at java.sql.Date.valueOf(Date.java:100)
at org.postgresql.jdbc2.ResultSet.toDate(Unknown Source)
at org.postgresql.jdbc2.ResultSet.getDate(Unknown Source)
at example.datestyle.doexample(datestyle.java:142)
at example.datestyle.<init>(datestyle.java:54)
at example.datestyle.main(datestyle.java:179)
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html