Upgrading from MySQL 4.7 to 5.5, problematic date fields
I get this error in a legacy application running SQL from JSP pages (not
my app):
java.sql.SQLException: Value '7Some text from a field123133
2001-09-2012001-10-01 08:37:1910000-00-00 00:00:00' can not be represented
as java.sql.Timestamp/p /blockquote pIt looks like the fields are
concatenated and that is what the timestamp (and date, and datetime) is
trying to decipher. Everything works fine if I run the query in mysql
client and if I remove all date, datetime and timestamp fields. This
happens when executeQuery(query) is run./p pWhat I've done:/p ul
limysqldump the old database/li liimported to the new/li lichanged the old
mysql driver to mysql-connector-java-5.1.26-bin.jar/li liremoved any old
jdbc libraries/li litomcat is running on java 1.7/li /ul pI'm guessing
it's a problem with libraries./p ul liapache-tomcat-7.0.42/li
li5.5.32-0ubuntu0.12.04.1 (Ubuntu)/li lijdk1.7.0_15/li /ul pHere's the
tomcat/lib:/p pactivation.jar catalina-tribes.jar el-api.jar jmxtools.jar
naming-factory.jar poolman.xml tomcat-i18n-es.jar annotations-api.jar
commons-codec-1.4.jar hssf-serializer.jar jsp-api.jar NetComponents.jar
servlet-api.jar tomcat-i18n-fr.jar catalina-ant.jar cos.jar jasper-el.jar
log4j.jar pg73jdbc3.jar tomcat-api.jar tomcat-i18n-ja.jar catalina-ha.jar
dnsjava.jar jasper.jar mail.jar poi-hssf.jar tomcat-coyote.jar
tomcat-jdbc.jar catalina.jar ecj-4.2.2.jar jmxri.jar
mysql-connector-java-5.1.26-bin.jar poolman.jar tomcat-dbcp.jar
tomcat-util.jar/p pAnd a few in the WEB-INF/lib:/p pfop.jar jce1_2_1.jar
jsse.jar NetaxeptClientVirtual.jar soap.jar w3c.jar xerces.jar/p pThanks
for any help!/p
No comments:
Post a Comment