[Dspace-tech] two form fields with same schema element and qualifier

318 views
Skip to first unread message

Graham Faulkner

unread,
Aug 26, 2015, 2:36:06 PM8/26/15
to dspac...@lists.sourceforge.net

Hi there,

 

This question relates to DS5.1 on Ubuntu using PostgreSQL.

 

In our /dspace/config/input-forms.xml we have two drop-down fields for Faculty and Department, respectively.  We want both fields to have the same element (“contributor”) and qualifier (“affiliation”), which are part of a custom schema (“uws”). 

 

However, when we submit the item in the submission workflow, the fields are each inserted twice in the database.  i.e. rather than having one entry for the Faculty and one for Department, there are two entries each. 

 

Here are the respective <fields> in input-forms.xml:

 

        <!-- New field: "Faculty" -->

        <field>

          <dc-schema>uws</dc-schema>

          <dc-element>contributor</dc-element>

          <dc-qualifier>affiliation</dc-qualifier>

          <repeatable>false</repeatable>

          <label>Faculty or affiliated and federated institution</label>

          <input-type value-pairs-name="FacultySubmissionForm_faculty">dropdown</input-type>

          <hint>Select your faculty or affiliated and federated institution from the drop down

            list.</hint>

          <required>You must choose from the list of Faculties and affiliated and federated

            institutions.</required>

        </field>

 

        <!-- New field: "Department" -->

        <field>

          <dc-schema>uws</dc-schema>

          <dc-element>contributor</dc-element>

          <dc-qualifier>affiliation</dc-qualifier>

          <repeatable>false</repeatable>

          <label>Department</label>

          <input-type value-pairs-name="FacultySubmissionForm_department">dropdown</input-type>

          <hint>Select your department from the drop down list.</hint>

          <required>You must choose from the list of departments.</required>

        </field>

 

Any suggestions on solutions, or pointers to where the duplicate entry is occurring in the source code?

 

Cheers,

 

Graham

 

-----------------------------------------

Graham Faulkner

Web Developer / Programmer

Digital Initiatives, Library

University of Waterloo

Waterloo, Ontario N2L 3G1 CANADA

519-888-4567 x32461

graham....@uwaterloo.ca

 

Graham Faulkner

unread,
Aug 26, 2015, 2:36:29 PM8/26/15
to dspac...@lists.sourceforge.net

Hello again. I failed to mention that this was for XMLUI (Mirage 2 to be specific) on DS 5.1.

 

Cheers,

 

Graham

Kleiner Eike (klie)

unread,
Aug 26, 2015, 2:36:46 PM8/26/15
to Graham Faulkner, dspac...@lists.sourceforge.net

Hi Graham,

 

We ran into the same problem with JSPUI on DSpace 5.1. We tried to fill dc.type from two different value-pair-lists and ended up with the duplicate entries you described. We came to two possible solutions:

 

1)      Merge the lists into one and make the field repeatable / multi selection.

2)      Distribute the fields over multiple pages of the ingest form. At least with JSPUI this avoids the duplicates.

 

Both approaches are not fully satisfactory but I wasn’t able to find a better solution on the fly.

 

Hope this helps

 

Eike

--

ZHAW Zürcher Hochschule für Angewandte Wissenschaften

Information & Communication Technology

 

Eike Kleiner

Gertrudstrasse 15

Postfach

CH-8401 Winterthur

 

Tel: +41 58 934 4959

Fax: +41 58 935 4959

E-Mail:eike.k...@zhaw.ch

Saidy Binta

unread,
Aug 26, 2015, 2:36:49 PM8/26/15
to dspac...@lists.sourceforge.net

Hi,

 

I am trying to update ant but I keep having the error, please help

 

C:\dspace\DSpace-master>cd C:\dspace\DSpace-master\dspace\target\dspace-installe

r

 

C:\dspace\DSpace-master\dspace\target\dspace-installer>ant update

Buildfile: C:\dspace\DSpace-master\dspace\target\dspace-installer\build.xml

 

prepare_configs:

    [mkdir] Created dir: C:\dspace\DSpace-master\dspace\target\dspace-installer\

config-temp

     [copy] Copying 1 file to C:\dspace\DSpace-master\dspace\target\dspace-insta

ller\config-temp

     [copy] Copying 142 files to C:\dspace\DSpace-master\dspace\target\dspace-in

staller\config-temp

 

copy_configs_keep:

 

overwrite_configs:

     [copy] Copying 3 files to C:\Program Files\dspace\config

Attempt to copy C:\Program Files\dspace\config\input-forms.dtd to C:\Program Fil

es\dspace\config\input-forms.dtd-20150602-133352.old using NIO Channels failed d

ue to 'C:\Program Files\dspace\config\input-forms.dtd-20150602-133352.old (Acces

s is denied)'.  Falling back to streams.

 

BUILD FAILED

C:\dspace\DSpace-master\dspace\target\dspace-installer\build.xml:215: Failed to

copy C:\Program Files\dspace\config\input-forms.dtd to C:\Program Files\dspace\c

onfig\input-forms.dtd-20150602-133352.old due to java.io.FileNotFoundException C

:\Program Files\dspace\config\input-forms.dtd-20150602-133352.old (Access is den

ied)

 

Total time: 1 second

 

Regards

Binta




DISCLAIMER: This message is private and confidential. If you have received this message in error please notify us and remove it from your system. Any views and opinions expressed in this message are those of the individual sender and do not necessarily represent the views and opinions of Medical Research Council Unit, The Gambia

___________________________________________________________
This communication is confidential and may contain privileged information intended solely for the named recipient(s). It may not be used or disclosed except for the purpose for which it has been sent. If you are not the intended recipient, you must not copy, distribute, take any action or reliance on it. If you have received this communication in error, do not open any attachments but please notify the Help Desk by e-mailing he...@mrc.gm quoting the sender details, and then delete this message along with any attached files. E-mail messages are not secure and attachments could contain software viruses which may damage your computer system. Whilst every reasonable precaution has been taken to minimise this risk, The MRC Unit The Gambia cannot accept any liability for any damage sustained as a result of these factors. You are advised to carry out your own virus checks before opening any attachments. Unless expressly stated, opinions in this message are those of the e-mail author and not of the Medical Research Council Unit The Gambia.
________________________________________________________________________

Saidy Binta

unread,
Aug 26, 2015, 2:36:50 PM8/26/15
to dspac...@lists.sourceforge.net

Hi,

 

Tomcat keep giving me the error and when I check the log this is what it says.

 

 

WARN [org.dspace.services.email.EmailServiceImpl] Couldn't get an email session from environment:  Name [mail/Session] is not bound in this Context. Unable to find [mail].

INFO [org.dspace.services.email.EmailServiceImpl] Initializing an email session from configuration.

INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@cfbc6e7: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.dspace.servicemanager.spring.DSpaceBeanPostProcessor#0,org.dspace.example.Example,org.dspace.discovery.SearchService,org.dspace.app.requestitem.RequestItemAuthorExtractor,org.dspace.app.sherpa.submit.SHERPASubmitConfigurationService,org.dspace.app.sherpa.SHERPAService,org.dspace.app.sherpa.submit.SHERPASubmitService,org.dspace.identifier.IdentifierService,org.dspace.identifier.VersionedHandleIdentifierProvider,org.dspace.services.CachingService,org.dspace.caching.ehcache.CacheManager,org.dspace.services.SessionService,org.dspace.services.EventService,org.dspace.services.email.EmailServiceImpl,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy

INFO [org.dspace.servicemanager.spring.SpringServiceManager] Spring Service Manager started up in 798 ms with 19 services...

INFO [org.dspace.servicemanager.DSpaceKernelImpl] DSpace kernel startup completed in 822 ms and registered as MBean: org.dspace:name=4beb889b-2bbb-4805-92ff-955fb294e522,type=DSpaceKernel

INFO [org.dspace.core.ConfigurationManager] Loading provided config file: ${dspace.dir}/config/dspace.cfg

FATAL [org.dspace.core.ConfigurationManager] Can't load configuration: file:/C:/tomcat/$%7Bdspace.dir%7D/config/dspace.cfg

java.io.FileNotFoundException: C:\tomcat\${dspace.dir}\config\dspace.cfg (The system cannot find the path specified)

                at java.io.FileInputStream.open(Native Method)

                at java.io.FileInputStream.<init>(FileInputStream.java:146)

                at java.io.FileInputStream.<init>(FileInputStream.java:101)

                at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)

                at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)

                at java.net.URL.openStream(URL.java:1037)

                at org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:660)

                at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:102)

                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)

                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)

                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)

                at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)

                at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)

                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

                at java.util.concurrent.FutureTask.run(FutureTask.java:262)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                at java.lang.Thread.run(Thread.java:745)

 

 

Please help

Regards

Binta

 

From: Kleiner Eike (klie) [mailto:kl...@zhaw.ch]

Sent: 02 June 2015 13:32
To: Graham Faulkner
Cc: dspac...@lists.sourceforge.net

Monika C. Mevenkamp

unread,
Aug 26, 2015, 2:36:52 PM8/26/15
to Saidy Binta, dspac...@lists.sourceforge.net
this looks like a permission problem - the user running the ant update command should be the same as the user owning  C:\Program Files\dspace\config
If you did the standard install - run ant update as the dspace user 

Monika

Monika Mevenkamp
Digital Repository Infrastructure Developer
333C 701 Carnegie, Princeton University, Princeton, NJ 08544

------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Graham Faulkner

unread,
Aug 26, 2015, 2:37:02 PM8/26/15
to Kleiner Eike (klie), dspac...@lists.sourceforge.net

Thank you Eike and Franziska for your responses and suggestions. 

 

Franziska, in response to your question about “why?”, we were reusing the same element.qualifier after discussions with a metadata librarian and reviewing the DC spec. 

 

Eike, thanks for the specific ideas on how to potentially solve the problem.  Not reusing the same element.qualifier would certainly be the easiest step so we’ll need to discuss this further within our team.

 

Cheers,

 

Graham  

 

 

 

From: Kleiner Eike (klie) [mailto:kl...@zhaw.ch]

Sent: Tuesday, June 02, 2015 9:32 AM
To: Graham Faulkner
Cc: dspac...@lists.sourceforge.net

Hakan Yanaz

unread,
Jun 17, 2016, 1:14:11 AM6/17/16
to DSpace Technical Support, kl...@zhaw.ch, dspac...@lists.sourceforge.net, graham....@uwaterloo.ca
Hi,

I have a similar issue on DSpace 5.5 XMLUI,
I configured the input form as item type based. I have more than 10 document types. 
I have the following metadata field as an example :

<!-- 6-Identifier**Article -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<dc-qualifier></dc-qualifier>
<!-- An input-type of qualdrop_value MUST be marked as repeatable -->
<repeatable>true</repeatable>
<label>Identifiers</label>
<input-type value-pairs-name="common_identifiers_article">qualdrop_value</input-type>
<hint></hint>
<required></required>
<type-bind>Article</type-bind>
</field>



<!-- 6-Identifier**Book Chapter -->
<field>
<dc-schema>dc</dc-schema>
<dc-element>identifier</dc-element>
<dc-qualifier></dc-qualifier>
<!-- An input-type of qualdrop_value MUST be marked as repeatable -->
<repeatable>true</repeatable>
<label>Identifiers</label>
<input-type value-pairs-name="common_identifiers_bookchapter">qualdrop_value</input-type>
<hint></hint>
<required></required>
<type-bind>Book Chapter</type-bind>
</field>

and some qualdrop value pairs are below:


<!-- dc.identifier ** docType:Article -->
   <value-pairs value-pairs-name="common_identifiers_article" dc-term="identifier">
     <pair>
       <displayed-value>ISSN</displayed-value>
       <stored-value>issn</stored-value>
     </pair>
     <pair>
       <displayed-value>Start Page</displayed-value>
       <stored-value>startpage</stored-value>
     </pair>
     <pair>
       <displayed-value>End Page</displayed-value>
       <stored-value>endpage</stored-value>
     </pair>
     <pair>
       <displayed-value>Volume</displayed-value>
       <stored-value>volume</stored-value>
     </pair>
     <pair>
       <displayed-value>Issue</displayed-value>
       <stored-value>issue</stored-value>
     </pair>
     <pair>
       <displayed-value>DOI #</displayed-value>
       <stored-value>doi</stored-value>
     </pair>
   </value-pairs>

<!-- dc.identifier ** docType:Book Chapter -->
   <value-pairs value-pairs-name="common_identifiers_bookchapter" dc-term="identifier">
     <pair>
       <displayed-value>ISBN</displayed-value>
       <stored-value>isbn</stored-value>
     </pair>
     <pair>
       <displayed-value>Start Page</displayed-value>
       <stored-value>startpage</stored-value>
     </pair>
     <pair>
       <displayed-value>End Page</displayed-value>
       <stored-value>endpage</stored-value>
     </pair>
     <pair>
       <displayed-value>DOI #</displayed-value>
       <stored-value>doi</stored-value>
     </pair>
   </value-pairs>

For instance; DOI field is been in both of value-pairs, one of them is for Article and the other is for Book Chapter.  If the submission is started as Article, the dropdown menu has DOI option and if the DOI option has any value but not empty, the checking step shows me two DOI value which is repeated and insert two metadatavalue into the database.. 

Is there any idea for the issue?

Regards,

Hakan

 

Reply all
Reply to author
Forward
0 new messages