I need to update the "modified" field (which is of type DATE) to the
current date and time the AL runs. In the output map, I map the field
to javascript
var d = new java.util.Date();
task.logmsg(d);
ret.value = d;
but I get the error below. I have tried manipulating with parseDate
like when reading in modfiied dates from LDAP, but surely this should
be quite simple to say like Date() or Now() etc
Any help appreciated as I've searched quite extensively here, and they
just seem to cover converting LDAP string dates into date format
Cheers
CTGDIS810E handleException - cannot handle exception , update
java.sql.SQLException: ORA-01841: (full) year must be between -4713
and +9999, and not be 0
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:589)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1957)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:
1114)
at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:
2181)
at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:
2063)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:
2920)
at
oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:
884)
at com.ibm.di.connector.JDBCConnector.putEntry(Unknown Source)
at com.ibm.di.server.AssemblyLineComponent.add1(Unknown Source)
at com.ibm.di.server.AssemblyLineComponent.update(Unknown Source)
at com.ibm.di.server.AssemblyLine.msExecuteNextConnector(Unknown
Source)
at com.ibm.di.server.AssemblyLine.executeMainStep(Unknown Source)
at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
at com.ibm.di.server.AssemblyLine.executeMainLoop(Unknown Source)
at com.ibm.di.server.AssemblyLine.executeAL(Unknown Source)
at com.ibm.di.server.AssemblyLine.run(Unknown Source)
[16:23:36 BST] java.sql.SQLException: ORA-01841: (full) year must be
between -4713 and +9999, and not be 0
var d = new java.util.Date();
task.logmsg(d);
ret.value = new java.sql.Timestamp(d.getTime());
Best Regards,
Kaloyan Kolev.
Thanks. Will report back tomorrow, but I think I tried that one and
got some sort of pattern match, or string too short / not terminated
message.
Failing that, I will just have to build it up myself into "YYYY-DD-MM
HH:MM" format
ret.value = new
java.sql.Timestamp(java.lang.System.currentTimeMillis());
Which is pretty much the same but does not create an auxiliary Date
object.
Best Regards,
Kaloyan Kolev.
Thank you. The trouble actually was the table structure in my POC
environment was wrong and I was trying to
insert a new row into a table and one of the fields was erroneously
set as not nullable
Only once I put "detailed" onto the connector itself did this become
clear
Once I checked the structure was when I realised what the problem was