> I have a similar problem, but no newly defined field: I can't browse
> by author or subject, as I get a java.lang.NullPointerException very
> similar (or so it seems to me) to Lyn's error. (I've included the
> cocoon and java stacktraces below.)

The same thing happened to me when I was implementing Embargoes (Author and 
Subject browse stopped working), and here is the problem that I uncovered; 
hopefully the same fix will work for you. (Note: I have only worked with the 
1.5.1 patch, but presumably the same fix will work for you.) I don't think it's 
related to patching an existing database vs. using a fresh one, because the 
error happens even on a fresh database, once you add data that includes subject 
or author information.

Your patch file is not patching the DSpace code correctly. Check the 
dspace-api/src/main/java/org/dspace/browse/BrowseEngine.java class and the 
patch file. It looks like the patch file is patching the BrowseByValue method, 
instead of patching the BrowseByItem method, which it should be patching. The 
two methods look very similar, so the patch is getting confused. Double-check 
that class against the patch file manually, and make sure the appropriate 
changes are being made. Once I did that, all of my browsing problems were fixed.

Another note: this bug is hard to find because the stack trace is coming from 
the wrong place. There is a bug in the core DSpace class 
org.dspace.app.xmlui.aspect.artifactbrowser.ConfigurableBrowse.java, in the 
getValidity() method that is causing a null pointer exception when the validity 
should be null (the last line for logging should include a null pointer check).

Jim Halliday
Programmer/Analyst
Indiana University
[email protected]




------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to