> There are also some methods in DataUtilities to sort out default values for
you (based on the information contained in the feature type). But yeah it is
really tough; for mandatory parameters you need a real value from your user
before you can insert something.

Still returning no defaults. I suspect that means the problem is with the
database, not the code, but I'm not sure how that could happen.

Either way, I decided to try manually sending the defaults, too. I'm still
getting the 
javax.naming.OperationNotSupportedException: java.lang.String
java.io.IOException: An error occured while committing.

Since it happens during the commit, I can't tell exactly which value it's
failing on. Tracing the throws in the geotools source, it seems the first
exception is thrown by DocumentWriter.writeFragment(), but I'm not sure
about that, because it's not returning the full text ("Could not find an
appropriate Element to use for encoding of a " + ((value == null) ? null :
value.getClass().getName())) in the printout above, instead just printing
out the class name.

In the transaction, all the values are sent in as Strings. Fields that can
be null and have no defaults are sent empty Strings, though if I send null
instead, it has the same problem (unless I send null to a geometry field,
where it just fails outright, but I know how to send a string to that one).
Are there any data-types that would have issues being null or ""? (Date
maybe?)

Beyond that, I'm at a loss. I can insert things in other tables, and update
things on this table.

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Using-the-default-values-in-a-new-row-tp6842711p6845975.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to