Hi, Hmmmmm... I don't think this is an SQL issue, I'm suspecting some faulty data somewhere.
Either your start date or end date is not of the correct format - ie. 2007-01-01 - or you have a value in your metadatavalue that isn't a valid timestamp (ie. 2007-01-01T23:01:01Z). I'm suspecting that it may be the latter. Check the start / end dates anyway, but can you execute this: SELECT text_value, decode( REGEXP_REPLACE(TO_CHAR(text_value), '([0-9])','0'), '0000-00-00T00:00:00Z', 1 , 0 ) AS valid FROM metadatavalue WHERE metadata_field_id = ( SELECT metadata_field_id FROM metadatafieldregistry WHERE element = 'date' AND qualifier = 'accessioned' ) ORDER BY valid, TO_CHAR(text_value); against your database. The first items to be listed will either have a badly formatted timestamp (valid will be 0), or will be an invalid value (ie. timestamp starting with 0000). In all other cases, the values *should* (more or less) be valid). G On Mon, 2007-06-11 at 11:32 +0200, luis jose miralls wrote: > > Hello ! > > I have a problem with oracle database. > When i run the the "stat-initial" > > i get the following errors: > > Exception in thread "main" java.sql.SQLException: ORA-01841: (full) > year must be between -4713 and +9999, and not be 0 > > at > oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) > at > oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316) > at oracle.jdbc.driver.T4CTTIoer.processError > (T4CTTIoer.java:282) > at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639) > at > oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185) > at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows > (T4CPreparedStatement.java:633) > at > oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:984) > at > oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java > :535) > at > oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051) > at > oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984) > at > oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026) > at > org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) > at > org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) > at > org.dspace.storage.rdbms.DatabaseManager.query(DatabaseManager.java:188) > at org.dspace.storage.rdbms.DatabaseManager.querySingle > (DatabaseManager.java:262) > at > org.dspace.app.statistics.LogAnalyser.getNumItems(LogAnalyser.java:1264) > at > org.dspace.app.statistics.LogAnalyser.processLogs(LogAnalyser.java:535) > at org.dspace.app.statistics.LogAnalyser.main > (LogAnalyser.java:327) > > > Thanks. > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ DSpace-tech mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dspace-tech ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

