I'm having difficulties with SWORD URL handling.

I'm running 1.6 at http://researcharchive.vuw.ac.nz/ it's behind apache 
httpd, the obviously relevant section of the config is:

<VirtualHost *:80>
         ServerName researcharchive.vuw.ac.nz
         <Proxy *>
                 Order deny,allow
                 Allow from all
         </Proxy>
         ProxyPass /down/ !
         ProxyPass / http://localhost:8080/
         ProxyPassReverse / http://localhost:8080/

#        CustomLog logs/researcharchive_access_log combined
</VirtualHost>


in my dspace.cfg I have:

sword.deposit.url = http://researcharchive.vuw.ac.nz/sword/deposit
sword.servicedocument.url = http://localhost:8080/sword/servicedocument
sword.media-link.url = http://researcharchive.vuw.ac.nz/sword/media-link

[I've tried a number of permutations of these]

When I try to deposit an item the error message I get is:

java.lang.StringIndexOutOfBoundsException: String index out of range: -2
java.lang.String.substring(String.java:1937)
java.lang.String.substring(String.java:1904)
org.dspace.sword.SWORDUrlManager.getDSpaceObject(SWORDUrlManager.java:208)
...

The full error is at: http://pastebin.com/j8vh88HU

As near as I can see, SWORDUrlManager.getDSpaceObject() should be using 
URL-parsing methods to extract and operate on only the file part of the 
URL. At the very least URL canonicalisation needs to happen here.

Or have I misunderstood something?

cheers
stuart





-- 
Stuart Yeates
Library Technology Services http://www.victoria.ac.nz/library/

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to