Hi,

helix84 has hinted I might want to address this question to the dspace-devel list, too, so here it is.

Best,
Joachim


-------- Original Message --------
Subject:        Injecting IdentifierProvider Bean
Date:   Tue, 16 Oct 2012 14:07:30 +0200
From:   Joachim Bingel <[email protected]>
To:     [email protected] <[email protected]>



Hi,

as mentioned in previous posts of mine to this list, I have written a
class that implements the org.dspace.identifier.IdentifierProvider
interface for DSpace 3.0. Now that this is complete and I have
successfully set up 3.0-rc1, I'm looking to use my own class instead of
the default one. How do I do this?

I have set the class attribute to the package+name of my class for the
respective bean in both
[dspace-src]/dspace-api/target/classes/spring/spring-dspace-core-services.xml
and
[dspace-src]/dspace/target/dspace3.0-rc1-build/config/spring/api/identifier-service.xml
(on this note, why does the same stuff get defined in these two
different files?)

Running 'ant update' and restarting Tomcat results in an error, the
Tomcat log says:
<<Cannot find class [de.mannheim.ids.pid.dspace.IDSIdentifierProvider]
for bean with name 'org.dspace.identifier.IdentifierService' defined in
file [/var/opt/ds
pace/config/spring/api/identifier-service.xml]; nested exception is
java.lang.ClassNotFoundException>>

... and a lot more, all related to the problem that the class cannot be
found.
The class is in the classpath and building worked, too. I presume I did
something wrong with the Bean definition (I'm very very new to the
Spring framework), right? The identifier-service.xml is attached. Also,
what annotation do I have to set in the code of my class? Basically I
adopted all the @Autowired/@Required/... annotation from
IdentifierProviderImpl.java.

Thanks a lot for your help!

--
Joachim Bingel
Institut für Deutsche Sprache, Zentrale Forschung
R5, 6-13, 68161 Mannheim
+49 - (0)621-1581-456 |http://www.ids-mannheim.de








<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2002-2010, DuraSpace.  All rights reserved
    Licensed under the DuraSpace License.

    A copy of the DuraSpace License has been included in this
    distribution and is available at: http://www.dspace.org/license

-->
<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd";>

    <!-- Identifier Service Application Interface.  Will be autowired with
         any Identifier Providers present in Spring context.
    -->
    <!-- bean id="org.dspace.identifier.IdentifierService"
          class="org.dspace.identifier.IdentifierServiceImpl"
          autowire="byType"
          scope="singleton"/ -->

    <bean id="org.dspace.identifier.IdentifierService"
          class="de.mannheim.ids.pid.dspace.IDSIdentifierProvider"
          autowire="byType"
          scope="singleton"/>

   <!-- provider for using the versioned handle identifier instead of the default one. -->
    <!--<bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.VersionedHandleIdentifierProvider"-->
          <!--scope="singleton">-->
        <!--<property name="configurationService" ref="org.dspace.services.ConfigurationService"/>-->
    <!--</bean>-->

</beans>


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to