Hi Phil:
The error comes from not having a value after the 'None:' in the
embargo.terms.days.property
The code requires that there be a number after the ':' - the 'forever' value
is the only exception to that rule (which looks fine in your property).
Just a quick thought - why have the 'None' case at all? Since the field
assignment is optional, one can simply skip assignment is no embargo is desired.
Thanks,
Richard
On Nov 1, 2011, at 12:41 PM, Shafer, Philip wrote:
I keep getting the following error when an item is submitted and attempted to
be installed in the repository:
java.lang.ArrayIndexOutOfBoundsException: 1
at
org.dspace.embargo.DayTableEmbargoSetter.<init>(DayTableEmbargoSetter.java:48)
I'm wondering if someone could see if I have something set wrong. I do need an
option for no embargo and an indefinite/forever embargo.
Here are the properties I have set:
dspace.cfg
#### Embargo Settings ####
# DC metadata field to hold the user-supplied embargo terms
embargo.field.terms = dc.embargo.terms
# DC metadata field to hold computed "lift date" of embargo
embargo.field.lift = dc.embargo.lift
# string in terms field to indicate indefinite embargo
embargo.terms.open = forever
# embargo.terms.days defines a table of values for the embargo system
embargo.terms.days = None:,90 days:90,6 months:180,1 year,365,2
years:730,Forever:forever
# implementation of embargo setter plugin - replace with local implementation
if applicable
# plugin.single.org.dspace.embargo.EmbargoSetter =
org.dspace.embargo.DefaultEmbargoSetter
plugin.single.org.dspace.embargo.EmbargoSetter =
org.dspace.embargo.DayTableEmbargoSetter
# implementation of embargo lifter plugin - - replace with local implementation
if applicable
plugin.single.org.dspace.embargo.EmbargoLifter =
org.dspace.embargo.DefaultEmbargoLifter
input-forms.xml
<field>
<dc-schema>dc</dc-schema>
<dc-element>embargo</dc-element>
<dc-qualifier>terms</dc-qualifier>
<repeatable>false</repeatable>
<label>Embargo Item For</label>
<input-type value-pairs-name="embargo_terms">dropdown</input-type>
<hint>Select the length for the embargo, or select 'None' for no embargo.
Select 'Forever' for an indefinate embargo.</hint>
<required></required>
</field>
<value-pairs value-pairs-name="embargo_terms" dc-term="embargo.terms">
<pair>
<displayed-value>None</displayed-value>
<stored-value>None</stored-value>
</pair>
<pair>
<displayed-value>90 days</displayed-value>
<stored-value>90 days</stored-value>
</pair>
<pair>
<displayed-value>6 months</displayed-value>
<stored-value>6 months</stored-value>
</pair>
<pair>
<displayed-value>1 year</displayed-value>
<stored-value>1 year</stored-value>
</pair>
<pair>
<displayed-value>2 years</displayed-value>
<stored-value>2 years</stored-value>
</pair>
<pair>
<displayed-value>Forever</displayed-value>
<stored-value>Forever</stored-value>
</pair>
</value-pairs>
-------------------------
Philip Shafer
Web Developer
Rowan University
Library Services
Ph: 856-256-4418
E-mail: [email protected]<mailto:[email protected]>
<ATT00001..c><ATT00002..c>
------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech