RMI TCP Connection(2)

Guys, I’m trying to connect, via smart client, and getting an error on the server log. Can any of you give me a heads up on what it might be or where I need to start looking. I’m thinking it may be a security type, permissions issue:

RMI TCP Connection(2)-216.106.179.254

java.sql.SQLException: Value ‘0000-00-00’ can not be represented as java.sql.Timestamp
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.getNativeTimestamp(ResultSet.java:4513)
at com.mysql.jdbc.ResultSet.getTimestampInternal(ResultSet.java:6271)
at com.mysql.jdbc.ResultSet.getTimestamp(ResultSet.java:5887)
at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:150)
at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:150)
at org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:150)
at com.servoy.j2db.dataprocessing.BufferedDataSet.(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

The problem is stated in your trace:

java.sql.SQLException: Value ‘0000-00-00’ can not be represented as java.sql.Timestamp

Value for a timestamp should be something like : 0000-00-00 00:00:00 .

lvostinar:
Value for a timestamp should be something like : 0000-00-00 00:00:00 .

I don’t think that works either. 0000-00-00 is not a valid date while 00:00:00 is indeed a valid time. A timestamp has both a time and date component.
MySQL is notorious for allowing invalid dates in a date/timestamp column. MySQL even sets automatically the default of NOT NULL date columns to ‘0000-00-00’ instead of setting it to NULL so you will get an error when you forget to set it, like any other RDBMS would. Very annoying.

So to fix this you need to set a valid date/time or when allowed set it to NULL.

Hope this helps.