5 Replies Latest reply on Dec 31, 2006 10:01 AM by Norman Richards

    messages example: import.sql is faulty

    eekboom Newbie

      Seam 1.1.0.GA, JBoss 4.0.5.GA

      Currently deployment fails with this exception:

      Caused by: java.sql.SQLException: Wrong data type: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
       at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
       at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
       at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
       at org.jboss.resource.adapter.jdbc.WrappedStatement.execute(WrappedStatement.java:84)
       at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:254)


      The import.sql reads:
      insert into Message (title, text, read, datetime) values ('Hello World', 'This is an example of a message.', 0, '2006-1-1 11:12')
      insert into Message (title, text, read, datetime) values ('Greetings Earthling', 'This is another example of a message.', 0, '2006-2-4 03:04')


      It works after changing it to
      insert into Message (title, text, read, datetime) values ('Hello World', 'This is an example of a message.', 0, '2006-01-01 11:12:00')
      insert into Message (title, text, read, datetime) values ('Greetings Earthling', 'This is another example of a message.', 0, '2006-02-04 03:04:00')