« July 2009 | Main | September 2009 »

August 31, 2009

Error in DSPACE search ... handles from index not having items


Hi, I was checking abstracts for Volume 41 No. 2 of Journal of Agricultural and Applied Economics. When I searched on "Race, Gender, School . . ." I got an error message saying that the website had experienced an internal error and I tried it again w/ the same results. Since the same message requested letting you know of the problem I am responding. Sincerely,

Error Message

Trying the search above generated the error message: An internal server error occurred on http://ageconsearch.umn.edu: Date: 8/28/09 10:59 AM Session ID: 6AAEA1B2D8AADD0C7F1BE28731AE9083 -- URL Was: http://ageconsearch.umn.edu/simple-search?sort=date&query=%28%28keyword%3Arace%29%29&from_advanced=true&query2=&field1=keyword&conjunction2=AND&query1=race+&field2=keyword&query3=&conjunction1=AND&field3=ANY&SortDirection=descending -- Method: GET -- Parameters were: -- field3: "ANY" -- field2: "keyword" -- field1: "keyword" -- sort: "date" -- query3: "" -- query2: "" -- SortDirection: "descending" -- query1: "race " -- query: "((keyword:race))" -- from_advanced: "true" -- conjunction2: "AND" -- conjunction1: "AND" Exception: java.sql.SQLException: Query "((keyword:race))" returned unresolvable handle: 53087 at org.dspace.app.webui.servlet.SimpleSearchServlet.doDSGet(SimpleSearchServlet.java:271) at org.dspace.app.webui.servlet.DSpaceServlet.processRequest(DSpaceServlet.java:151) at org.dspace.app.webui.servlet.DSpaceServlet.doGet(DSpaceServlet.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)

Outline of Solution

1) A handle was found by search that was not in the database (probably a deleted file and IndexAll has not run yet).
2) I found the segment of code that collects into a list all the items found by search.
3) When any word that was on this deleted record was input, the search routine would throw an error and halt.
4) I rewrote the code to ignore handles that are not in the database.
5) Ran a few basic tests on Odin (our private DSAPCE setup).
6) Deployed it to strip1 (production site)

Modified Code

// FROM SimpleSearchServlet.java /* resultsItems = new Item[numItems]; for (int i = 0; i < numItems; i++) { String myhandle = (String) itemHandles.get(i); Object o = HandleManager.resolveToObject(context, myhandle); resultsItems[i] = (Item) o; if (resultsItems[i] == null) { throw new SQLException("Query \"" + query + "\" returned unresolvable handle: " + myhandle); } } */ // The code below will only add handles to the list if a well defined // item is associated with it. Item[] resultsItems_temp = new Item[numItems]; int item_count =0; for (int i = 0; i < numItems; i++){ String myhandle = (String) itemHandles.get(i); Object o = HandleManager.resolveToObject(context, myhandle); if (o != null){ resultsItems_temp[item_count] = (Item) o; item_count++; } } resultsItems = new Item[item_count]; for (int i = 0; i < item_count; i++){ resultsItems[i] = resultsItems_temp [i]; }

August 10, 2009

Ames collection ingest ... multiple metadata per file

The problem

While ingesting the metadata for the AMes collection I found a problem. Below is a list of metadata sets that map to the same image. s
identifier local Image
ama00711 ama00711.jpg
ama00712 ama00711.jpg
amp00259 amp00259.jpg
ap00259 amp00259.jpg
amp00435 amp00435.jpg
amp00436 amp00435.jpg
amp00448 amp00449.jpg
amp00449 amp00449.jpg
amp00513 amp00531.jpg
amp00531 amp00531.jpg

Jason's solution

identifier local Image ama00711 ama00711.jpg ama00712 ama00711.jpg - error in the data. Should point to ama00712.jpg (I've fixed it in IMAGES) amp00259 amp00259.jpg ap00259 amp00259.jpg - delete this version amp00435 amp00435.jpg amp00436 amp00435.jpg - error in the data. Should point to amp00436.jpg (I've fixed it in IMAGES) amp00448 amp00449.jpg - error in the data. Should point to amp00448.jpg (I've fixed it in IMAGES) amp00449 amp00449.jpg amp00513 amp00531.jpg - error in the data. Should point to amp00513.jpg (I've fixed it in IMAGES) amp00531 amp00531.jpg

What to do from here

Bill will need to pull the ames collection from IMAGES. I will need to re ingest it and delete ap00259.

August 7, 2009

Problem with a dspace user and solution


A problem that happened once before. Although Erin George has successfully uploaded files to some of the collections in the Univeresity Archives community, she is now if a cycle where she logs in, goes to a collection, and whatever she does gets cycled back to the log in screen with her x500 there but no password. She enters her password, and goes through the same thing again and again. This happened to one of our students.


This command fixed it:
update eperson set netid = 'georg038' where eperson_id = '190';