Closed djtfmartin closed 9 years ago
The problem is this line: LogEventVO incomingLog = new LogEventVO(request.getJSON());
The incoming JSON must have a 'class' attribute in it. That would explain why it suddenly stopped working: the client changed what is being sent.
I have put in a simple check to ignore a 'class' attribute in the incoming JSON.
This is odd. The biocache webservices (the client) havent been updated since November 2014. Similarly, the logger services hadnt changed since March.
Hmm, that's very odd.
I have deployed the updated version, and it's still failing at the same point but with a different error:
No such property: lastUpdated for class: org.ala.client.model.LogEventVO. Stacktrace follows: groovy.lang.MissingPropertyException: No such property: lastUpdated for class: org.ala.client.model.LogEventVO
I'll keep digging.
OK, it looks like the invalid requests are coming from ala-downloads, which is using an old version of the logger client jar (1.0-SNAPSHOT, 1.2 is the current) and is just dumping its LogEvent entity into the log as JSON instead of constructing the logger client's LogEventVO object. There are requests from the biocache service which are correctly formatted (it's using logger client 1.2 and constructs the LogEventVO).
This is from downloads:
{
"class": "au.org.ala.downloads.LogEvent",
"id": 137,
"comment": "",
"dateCreated": "2015-05-20T09:47:23Z",
"eventTypeId": 1002,
"lastUpdated": "2015-05-20T09:47:23Z",
"month": null,
"reasonTypeId": 0,
"recordCounts": {
...
"dr570": "696511",
"dr571": "2520423",
"dr473": "462",
"dr1984": "566"
},
"sourceTypeId": 0,
"sourceUrl": "http://biocache.ala.org.au/archives/exports/aves_brief/aves.zip",
"userEmail": "...",
"userIP": "..."
}
This is from biocache:
{
"recordCounts": {
"dp36": 1,
"in21": 1,
"co55": 1
},
"userIP": "...",
"eventTypeId": 1000,
"userEmail": "",
"comment": "Viewing Occurrence Record e64bae33-7e32-4cd7-b15c-e4e72239bbe2",
"month": ""
}
I have updated the logger service to ignore any attribute that is not a property of the LogEventVO class. We should probably also change downloads to construct the correct object like biocache-service does.
The logging is currently broken and there havent been any log events since April. Im not sure whats caused this as the software hasnt been updated since March.
This is the exception in the logs:
cc @nickdos