Hi,
In Dspace 1.8.2 I get the following error when attempting to run the bin/stat-monthly script:
[dspace@vmerdmsdspace bin]$ ./dspace stat-monthly
Exception: ORA-01861: literal does not match format string
java.sql.SQLDataException: ORA-01861: literal does not match format string
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.dspace.storage.rdbms.DatabaseManager.query(DatabaseManager.java:284)
at org.dspace.storage.rdbms.DatabaseManager.querySingle(DatabaseManager.java:330)
at org.dspace.app.statistics.LogAnalyser.getNumItems(LogAnalyser.java:1255)
at org.dspace.app.statistics.LogAnalyser.getNumItems(LogAnalyser.java:1284)
at org.dspace.app.statistics.LogAnalyser.processLogs(LogAnalyser.java:495)
at org.dspace.app.statistics.CreateStatReport.statMonthly(CreateStatReport.java:181)
at org.dspace.app.statistics.CreateStatReport.main(CreateStatReport.java:121)
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 org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
Any idea what might be going on here?
Thanks
Ian
------------
Ian Wellaway
Senior System Support & Development Officer - Enterprise Applications (Wednesdays only)
&
Technical Developer, Open Exeter - Infrastructure Systems (Monday-Tuesday, Thursday-Friday)
Exeter IT
Room 54
Laver Building
University of Exeter
EX4 4QE
UK
tel +44 1392 722852
Thanks Bram,
I’ve rerun the cronjob with DEBUG enabled and have got the following out of the log file:
2012-08-31 14:51:01,825 INFO org.dspace.core.ConfigurationManager @ Loading from classloader: file:/opt/dspace/config/dspace.cfg
2012-08-31 14:51:01,891 INFO org.dspace.core.ConfigurationManager @ Using dspace provided log configuration (log.init.config)
2012-08-31 14:51:01,891 INFO org.dspace.core.ConfigurationManager @ Loading: /opt/dspace/config/log4j.properties
2012-08-31 14:51:08,304 INFO net.sf.ehcache.util.UpdateChecker @ New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4]
2012-08-31 15:11:29,789 DEBUG org.dspace.storage.rdbms.DatabaseManager @ Running query "SELECT COUNT(*) AS num FROM item WHERE in_archive = 1 AND withdrawn = 0 AND item_id IN ( SELECT /*+ ORDERED_PREDICATES */ item_id FROM metadatavalue WHERE metadata_field_id = ( SELECT metadata_field_id FROM metadatafieldregistry WHERE element = 'date' AND qualifier = 'accessioned') AND TO_TIMESTAMP( TO_CHAR(text_value), 'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) > TO_DATE('2012-08-01', 'yyyy-MM-dd') AND TO_TIMESTAMP( TO_CHAR(text_value), 'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) < TO_DATE('2012-08-31', 'yyyy-MM-dd') ) " with parameters:
This sql statement doesn’t run in sqldeveloper. I’ve removed the ‘/* + ORDERED_PREDICATES */’ removed but still no joy. It gives the following error:
Error starting at line 1 in command:
SELECT COUNT(*) AS num FROM item WHERE in_archive = 1 AND withdrawn = 0 AND item_id IN ( SELECT item_id FROM metadatavalue WHERE metadata_field_id = ( SELECT metadata_field_id FROM metadatafieldregistry WHERE element = 'date' AND qualifier = 'accessioned') AND TO_TIMESTAMP( TO_CHAR(text_value), 'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) > TO_DATE('2012-08-01', 'yyyy-MM-dd') AND TO_TIMESTAMP( TO_CHAR(text_value), 'yyyy-mm-dd"T"hh24:mi:ss"Z"' ) < TO_DATE('2012-08-31', 'yyyy-MM-dd') )
Error report:
SQL Error: ORA-01877: string is too long for internal buffer
01877. 00000 - "string is too long for internal buffer"
*Cause: This is an internal error.
*Action: Please contact Oracle Worldwide Support.
I haven’t changed anything in the underlying dspace source code so am very confused as to why this is happening. Any help you could give would be brilliant.
Thanks
Ian
------------
Ian Wellaway
Senior System Support & Development Officer - Enterprise Applications (Wednesdays only)
&
Technical Developer, Open Exeter - Infrastructure Systems (Monday-Tuesday, Thursday-Friday)
Exeter IT
Room 54
Laver Building
University of Exeter
EX4 4QE
UK
tel +44 1392 722852
From: blu...@gmail.com [mailto:blu...@gmail.com]
On Behalf Of Bram Luyten
Sent: 17 August 2012 12:12
To: Wellaway, Ian
Subject: Re: [Dspace-tech] stat-monthly script error
Hi Ian,
just a direct reply to you because I don't have the full solution. If you manage to find it, please feel free to repost to the list:
ORA-01861 indicates that you're suffering from an oracle specific issue.
http://www.techonthenet.com/oracle/errors/ora01861.php
Looking at your log, it looks like
public static
Integer getNumItems(Context
context, String
type) throws
SQLException on line 1255 is the culprit.
https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java
I suggest you turn on DEBUG mode in the logs to see the actual SQL query that's causing this
https://wiki.duraspace.org/display/DSPACE/TechnicalFaq#TechnicalFaq-SettingloggingleveluptoDEBUG
good luck!
Bram
--
|
Bram Luyten
@mire |
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats.
http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech