Timestamp Conversion Issue
Posted by: Kris Younger
Date: January 05, 2005 07:35PM

Okay - Now I am certain I am using 3.1.6. I even just dropped the database and reloaded the schema.
Then I used the app to create a record in an "Accounts" table... it has a Date oobject that gets created to timestamp the
event.
It stores it into the mysqld.
Command line reports:
mysql> select * from Accounts;
+------+-------+--------------+---------+------+---------------------+---------------+----------------+----------------+-------------+--------------+------------+
| acId | acDel | acName | acEmail | acPw | acCreate | acLastEventId | acCheckContact | acCheckAddress | acCheckCity | acCheckState | acCheckZip |
+------+-------+--------------+---------+------+---------------------+---------------+----------------+----------------+-------------+--------------+------------+
| 1 | 0 | 82North Test | k | k | 2005-01-05 00:00:00 | NULL | Kris Younger | 123 Main St. | Foo | Bar
| 12345 |
+------+-------+--------------+---------+------+---------------------+---------------+----------------+----------------+-------------+--------------+------------+
1 row in set (0.00 sec)

but when I fetch that rwo to edit it within my app - I get, in my browser, the following... NOTA BENE: at the spot where I have <<weird character here>>, there is, displayed in the browser, a character that looks like small dotted rectangle..... (I kid you not) (I'm running firefox 1.0 on linux in this case. although that should not matter.)

Exception Details: java.sql.SQLException
Cannot convert value '2005-01-05 00:00:00.<<weird character here>>' from column 6 to TIMESTAMP.

Possible Source of Error:
Class Name: com.mysql.jdbc.ResultSet
File Name: ResultSet.java
Method Name: getTimestampFromString
Line Number: 6369

Source not available. Information regarding the location of the exception can be identified using the exception stack trace below.

Stack Trace:

com.mysql.jdbc.ResultSet.getTimestampFromString(ResultSet.java:6369)
com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:6394)
com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:2268)
com.mysql.jdbc.ResultSet.getObject(ResultSet.java:1808)
com.sun.sql.rowset.JdbcRowSetXImpl.handleOnInsertRowGet(JdbcRowSetXImpl.java:2372)
com.sun.sql.rowset.JdbcRowSetXImpl.handleOnInsertRowGet(JdbcRowSetXImpl.java:2141)
com.sun.sql.rowset.JdbcRowSetXImpl.getObject(JdbcRowSetXImpl.java:1021)
com.sun.sql.rowset.JdbcRowSetXImpl.getObject(JdbcRowSetXImpl.java:1025)
com.sun.jsfcl.data.ResultSetPropertyResolver$RowData.getData(ResultSetPropertyResolver.java:176)
com.sun.jsfcl.data.ResultSetPropertyResolver.getValue(ResultSetPropertyResolver.java:59)
com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
javax.faces.component.UIOutput.getValue(UIOutput.java:147)
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:82)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:191)
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:169)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)
com.sun.faces.taglib.html_basic.OutputTextTag.doEndTag(OutputTextTag.java:173)
org.apache.jsp.AccountsEdit_jsp._jspx_meth_h_outputText_14(AccountsEdit_jsp.java:733)
org.apache.jsp.AccountsEdit_jsp._jspx_meth_h_form_0(AccountsEdit_jsp.java:190)
org.apache.jsp.AccountsEdit_jsp._jspx_meth_f_view_0(AccountsEdit_jsp.java:133)
org.apache.jsp.AccountsEdit_jsp._jspService(AccountsEdit_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:102)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:282)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:263)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:210)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
[snip]

oh dear -

-Kris

Options: ReplyQuote


Subject
Written By
Posted
Timestamp Conversion Issue
January 05, 2005 07:35PM
January 07, 2005 09:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.