Hi Joachim,
ConfigurationManager requires one to define the precise location of
dspace.cfg file.
So, if you are implementing a webapp you need to add two pieces of
information to the web.xml file:
1. A context parameter (
https://github.com/lyncode/DSpace/blob/springui/dspace-jspui/src/main/webapp/WEB-INF/web.xml#L27
)
2. Add a specific listener (
https://github.com/lyncode/DSpace/blob/springui/dspace-jspui/src/main/webapp/WEB-INF/web.xml#L136
)
On 18 December 2012 15:33, Joachim Bingel <[email protected]> wrote:
> Hi Helix,
>
> thanks for your help. In debug mode, my class doesn't even get to the
> point where the ConfigurationManager is called, still the earlier posted
> log excerpt (below) tells me that this is the problem.
>
> I tried to employ the DSpaceConfigurationService, too, but since its
> methods are non-static and I need to read the config values in a static
> initialiser block, it's not useful. :(
>
>
> Caused by: java.lang.IllegalStateException: Cannot find dspace.cfg
> at
>
> org.dspace.core.ConfigurationManager.loadConfig(ConfigurationManager.java:918)
> at
>
> org.dspace.core.ConfigurationManager.getMutableProperties(ConfigurationManager.java:130)
> at
>
> org.dspace.core.ConfigurationManager.getProperty(ConfigurationManager.java:175)
> at
>
> de.mannheim.ids.pid.dspace.IDSIdentifierProvider.<clinit>(IDSIdentifierProvider.java:65)
> ... 46 more
>
> Best,
> Joachim
>
> On 12/18/2012 02:37 PM, helix84 wrote:
> > Hi Joachim,
> >
> > again, this question is better suited for dspace-devel.
> >
> > Did you look at the log file to see where ConfigurationManager is
> > looking for configuration? If it's not there, try adding some println
> > debugging to ConfigurationManager.
> >
> > As an alternative, I noticed ConfigurationService has been the latest
> > fashion, can you use it instead of ConfigurationManager?
> >
> >
> > Regards,
> > ~~helix84
> >
> > Compulsory reading: DSpace Mailing List Etiquette
> > https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
> >
>
>
> --
> Joachim Bingel
> Institut für Deutsche Sprache, Zentrale Forschung
> R5, 6-13, 68161 Mannheim
> +49 - (0)621-1581-456 | http://www.ids-mannheim.de
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Dspace-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-devel
>
--
Thanks, João Melo (My Portfolio <http://www.lyncode.com/m/jmelo/>)
DSpace Department
*Lyncode*: Official
website<http://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2F&sa=D&sntz=1&usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ>
[image: Follow us on
Facebook]<http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncode&sa=D&sntz=1&usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q>
<http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncode&sa=D&sntz=1&usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette