[Dspace-tech] xmlui in dspace 1.8.2 not working

308 views
Skip to first unread message

Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:31 AM8/26/15
to dspac...@lists.sourceforge.net
Hello

I just did a fresh install of dspace 1.8.2 on a test-server that used to
run 1.7.x and I can't get xmlui to work. jspui seems to work fine.
Apache says 404, requested resource is not available.

Looking through cocoon.log I see this:

2012-10-08 13:40:58,375 INFO
org.apache.cocoon.components.store.impl.EHDefaultStore - Disposing
EHCache cache 'cocoon-ehcache'.
2012-10-08 13:40:58,428 ERROR
org.springframework.web.context.ContextLoader - Context initialization
failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'dspace.eventService' defined in ServletContext resource
[/WEB-INF/spring/applicationContext.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public org.dspace.services.EventService
org.dspace.utils.DSpace.getEventService()] threw exception; nested
exception is java.lang.IllegalStateException: DSpace kernel cannot be null
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:444)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by:
org.springframework.beans.factory.BeanDefinitionStoreException: Factory
method [public org.dspace.services.EventService
org.dspace.utils.DSpace.getEventService()] threw exception; nested
exception is java.lang.IllegalStateException: DSpace kernel cannot be null
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
... 25 more
Caused by: java.lang.IllegalStateException: DSpace kernel cannot be null
at org.dspace.utils.DSpace.getServiceManager(DSpace.java:63)
at org.dspace.utils.DSpace.getEventService(DSpace.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
... 26 more

=================================================================================

And in tomcat/logs:

Oct 8, 2012 1:40:53 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance
of class
org.dspace.servicemanager.servlet.DSpaceKernelServletContextListener
java.lang.RuntimeException: Failure during filter init: Failed to
startup the DSpace Service Manager: failure starting up spring service
manager: Configuration pro
blem: Failed to register bean definition with name
'org.dspace.discovery.SearchService'
Offending resource: URL
[jar:file:/usr/local/apache-tomcat-7.0.22/webapps/xmlui/WEB-INF/lib/dspace-discovery-solr-1.8.2.jar!/spring/spring-dspace-addon-discovery-s
ervices.xml]; nested exception is
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid
bean definition with name 'org.dspace.discovery.SearchSer
vice' defined in URL
[jar:file:/usr/local/apache-tomcat-7.0.22/webapps/xmlui/WEB-INF/lib/dspace-discovery-solr-1.8.2.jar!/spring/spring-dspace-addon-discovery-serv
ices.xml]: Cannot register bean definition [Generic bean: class
[org.dspace.discovery.SolrServiceImpl]; scope=singleton; abstract=false;
lazyInit=false; autowireMo
de=0; dependencyCheck=0; autowireCandidate=true; primary=false;
factoryBeanName=null; factoryMethodName=null; initMethodName=null;
destroyMethodName=null; defined
in URL
[jar:file:/usr/local/apache-tomcat-7.0.22/webapps/xmlui/WEB-INF/lib/dspace-discovery-solr-1.8.2.jar!/spring/spring-dspace-addon-discovery-services.xml]]
for
bean 'org.dspace.discovery.SearchService': There is already [Generic
bean: class [org.dspace.discovery.SolrServiceImpl]; scope=singleton;
abstract=false; lazyInit
=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true;
primary=false; factoryBeanName=null; factoryMethodName=null;
initMethodName=null; destroyMethodN
ame=null; defined in URL
[jar:file:/usr/local/apache-tomcat-7.0.22/webapps/xmlui/WEB-INF/lib/dspace-discovery-provider-1.7.2.jar!/spring/spring-dspace-addon-discov
ery-services.xml]] bound.
at
org.dspace.servicemanager.servlet.DSpaceKernelServletContextListener.contextInitialized(DSpaceKernelServletContextListener.java:92)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.RuntimeException: Failed to startup the DSpace
Service Manager: failure starting up spring service manager:
Configuration problem: Failed to r
egister bean definition with name 'org.dspace.discovery.SearchService'

This is running on:
Centos 6.3
Tomcat 7.0.22


If you need any more info, I'll be happy to find it. I'll be grateful
for any help you can provide.


Regards

Kai Bjørnenak

Hilton Gibson

unread,
Aug 26, 2015, 9:55:32 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
Hi Kai

I suggest disable discovery and try again.
If it works, then your discovery setup is the problem.
This may help: http://wiki.lib.sun.ac.za/index.php/SUNScholar/Discovery

Cheers

hg
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech



--
Hilton Gibson
Systems Administrator
JS Gericke Library
Room 1025D
Stellenbosch University
Private Bag X5036
Stellenbosch
7599
South Africa

Tel: +27 21 808 4100 | Cell: +27 84 646 4758
http://library.sun.ac.za
http://scholar.sun.ac.za

helix84

unread,
Aug 26, 2015, 9:55:33 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
Can you try replacing this file with its unmodified version and
restarting Tomcat?

[dspace]/config/spring/discovery/spring-dspace-addon-discovery-configuration-services.xml

You can find the unmodified file here:
https://raw.github.com/DSpace/DSpace/dspace-1_8_x/dspace/config/spring/discovery/spring-dspace-addon-discovery-configuration-services.xml

Regards,
~~helix84

Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:34 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Diff shows there are no differences between the two and a replace with
restart made no difference, the only file I can think of that I have
manually edited is the dspace.conf file.

Regards
Kai Bjørnenak

helix84

unread,
Aug 26, 2015, 9:55:36 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
On Tue, Oct 9, 2012 at 10:04 AM, Kai Bjørnenak <kai.bj...@uit.no> wrote:
> Diff shows there are no differences between the two and a replace with
> restart made no difference, the only file I can think of that I have
> manually edited is the dspace.conf file.

Can you double-check that you didn't leave out any of the steps listed
in here? Discovery configuration format changed sigificantly between
1.7 and 1.8.

https://wiki.duraspace.org/display/DSDOC18/Discovery#Discovery-EnablingDiscovery

Regards,
~~helix84

Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:37 AM8/26/15
to Hilton Gibson, dspac...@lists.sourceforge.net
Discovery is not enabled (by default on a fresh install it seems?).

Regards
Kai Bjørnenak

helix84

unread,
Aug 26, 2015, 9:55:38 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
On Tue, Oct 9, 2012 at 10:19 AM, Kai Bjørnenak <kai.bj...@uit.no> wrote:
> Discovery is not enabled (by default on a fresh install it seems?).

That's correct. It will be, starting from DSpace 3.0.

Regards,
~~helix84

Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:39 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Discovery was not enabled, but I tried to enable it. When I got step 4. where I should run dspace update-discovery-index I got this error:

[dspace@dspace dspace]$ ./bin/dspace update-discovery-index
Exception: Error executing query
org.dspace.discovery.SearchServiceException: Error executing query
    at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:376)
    at org.dspace.discovery.IndexClient.main(IndexClient.java:119)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
Caused by: org.apache.solr.client.solrj.SolrServerException: Error executing query
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
    at org.dspace.discovery.SolrServiceImpl.getSolr(SolrServiceImpl.java:101)
    at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:349)
    ... 6 more
Caused by: org.apache.solr.common.SolrException: Not Found

Not Found

request: http://localhost/solr/search/select?q=search.resourcetype:2 AND search.resourceid:1&wt=javabin&version=2
    at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
    at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
    ... 9 more


Not sure this is relevant though, since Lucene is not installed on this machine.


Regards

Kai Bjørnenak

helix84

unread,
Aug 26, 2015, 9:55:44 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
On Tue, Oct 9, 2012 at 10:44 AM, Kai Bjørnenak <kai.bj...@uit.no> wrote:
> Discovery was not enabled, but I tried to enable it. When I got step 4.

OK, haven't mentioned that before. I assumed you did because the error
says there's a problem with the Discovery configuration file. So it
must be something else.

> Caused by: org.apache.solr.common.SolrException: Not Found

OK, this may be a far cry, but try doing this:
find out what user and group owns your dspace directory (replace
"/dspace" with your actual directory):
ls -l /dspace

Make sure that all files in that directory are owned by this user ang
group (replace YOURUSER, YOURGROUP and /dspace):
chown -R YOURUSER:YOURGROUP /dspace

> Not sure this is relevant though, since Lucene is not installed on this
> machine.

No matter, Solr is distributed as a part of DSpace.

Regards,
~~helix84

Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:47 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
[dspace@dspace dspace]$ pwd
/usr/local/dspace
[dspace@dspace dspace]$ ls -l
total 52
drwxrwxr-x. 2 dspace dspace 4096 Oct 8 13:22 assetstore
drwxrwxr-x. 2 dspace dspace 4096 Oct 9 09:14 bin
drwxrwxr-x. 9 dspace dspace 4096 Oct 9 10:21 config
drwxrwxr-x. 5 dspace dspace 4096 Oct 9 09:14 etc
drwxrwxr-x. 3 dspace dspace 4096 Oct 8 13:22 exports
drwxrwxr-x. 2 dspace dspace 4096 Oct 8 13:22 handle-server
drwxrwxr-x. 2 dspace dspace 4096 Oct 9 09:14 lib
drwxrwxr-x. 2 dspace dspace 4096 Oct 9 09:15 log
drwxrwxr-x. 2 dspace dspace 4096 Oct 8 13:22 reports
drwxrwxr-x. 2 dspace dspace 4096 Oct 9 09:14 search
drwxrwxr-x. 4 dspace dspace 4096 Oct 8 13:32 solr
drwxrwxr-x. 2 dspace dspace 4096 Oct 8 13:22 upload
drwxrwxr-x. 9 dspace dspace 4096 Oct 8 13:32 webapps

Seems ok.

Regards
Kai Bjørnenak

helix84

unread,
Aug 26, 2015, 9:55:48 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
Try running
chown -R dspace:dspace /usr/local/dspace

It changes permissions recursively, there might still be some
ownership problems down the tree. In any case, running it won't hurt.

Regards,
~~helix84

Hilton Gibson

unread,
Aug 26, 2015, 9:55:49 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
See step 6.1 for an Ubuntu install:
http://wiki.lib.sun.ac.za/index.php/SUNScholar/Install_Dspace/S06
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech



Kai Bjørnenak

unread,
Aug 26, 2015, 9:55:53 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Ok, tried running chown on the dspace-folder, still same error-messages.

Regards
Kai Bjørnenak

helix84

unread,
Aug 26, 2015, 9:55:54 AM8/26/15
to Kai Bjørnenak, dspac...@lists.sourceforge.net
On Tue, Oct 9, 2012 at 12:30 PM, Kai Bjørnenak <kai.bj...@uit.no> wrote:
> Ok, tried running chown on the dspace-folder, still same error-messages.

OK, I said it was a far cry :)

I think the problem is that for some reason DSpace is not able to load
all configuration. How did you migrate your configuration when
upgrading from 1.7 to 1.8. Did you copy your 1.7 configuration over
the default 1.8 configuration? There have been many changes, so you
should instead take the default 1.8 installation and only change the
things you want to change in there. To find out what you actually
changed, you can take the default 1.7 configuration directory and do:
diff -ur /default/dspace1.7/config/ /your/dspace17/config/ | view -

Look at the diff and make your changes in the default 1.8 config
directory, then use that and restart Tomcat.

Regards,
~~helix84

Kai Bjørnenak

unread,
Aug 26, 2015, 9:56:20 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
I found the error, I didn't have a a xmlui-context path in
../tomcat/conf/server.xml, after I put in:

<!-- DEFINE A CONTEXT PATH FOR DSpace XMLUI User Interface -->
<Context path="/xmlui"
docBase="/usr/local/dspace/webapps/xmlui" debug="99"
reloadable="true" cachingAllowed="false"
allowLinking="true"/>

It worked. I hadn't thought to check this file as xmlui had worked in
1.7.x (and now I wonder how it could have worked there).

Anyway, thanks for the help. :-)


Regards

Kai Bjørnenak
Reply all
Reply to author
Forward
0 new messages