We are seeing a strange problem with the insert-values function in
clojure.contrib.sql. Basically, we passed in a single record for
insert that in fact violated a foreign key constraint in the database
(we were adding an accountid that was not in the accounts table).
Usually when using clojure.contrib.sql, we get back the specific JDBC
error in clojure that indicates when foreign key errors, unique key
errors, or any other common database integrity error, in pretty much
the exact language that the driver emits.  However, when we tried to
insert this record which violated the foreign key constrain of the ID
field (both fields are UUIDs in a PostgreSQL database table), we get
back a strange error:

<CompilerException java.lang.IllegalArgumentException: No matching
method found: println for class java.io.OutputStreamWriter
(NO_SOURCE_FILE:0)>

We ran the insert function from our REPL, but once we did insert the
proper record into the Accounts table to stop the foreign key
violation, the record was written immediately, so it is clear tha hte
FK violation was the problem.

Is this message because we ran the code from the REPL rather than as
an application, or is there some other explanation as to we got this
error instead of the JDBC/PostgreSQL database error?

Thanks in advance for any assistance,
Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to