All,
DSpace 4.2, xmlui
After investigating some very low statistics since implementing
version 4.2, I have found that the function isSpider() in
SpiderDetector.java is throwing an error at line 208 because the
variable candidate is null. When the matcher method is called on the
null variable, an error is thrown, the function never returns, and the
request does not get logged.
I added an additional conditional at 208 to test for null:
if ( null != candidate && candidate.matcher(agent).find() ) {
to prevent the error.
The question of how there is a null pattern in the agents list is
another issue -- I'm not sure how that happens. I'm using the
out-of-the-box agents/example file, and as a matter of fact, the
problem does not present itself on every startup. I have noticed in
dspace.log that agents/example gets loaded 3 times. Is there a
possible synchronization issue with ArrayList.add at line 174?
At any rate, it seems like a good idea to test for a null value since
users will likely add odd items to the agents file at some point.
Comments? I'd love to hear 'em!
Cheers,
Bill
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette