DSpace
  1. DSpace
  2. DS-785

SWORD deposits fail when ingest events are fired if Discovery event consumer is configured

    Details

    • Attachments:
      1
    • Comments:
      11

      Description

      If "discovery" is configured in the dspace.cfg property "event.dispatcher.default.consumers" and a SWORD deposit is made, dspace-services seems to have trouble starting DSpaceKernelManager / the kernel itself properly.

      Eg.

      (start SWORD deposit...)

      2010-12-16 09:58:06,104 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.104] Workflow process started;
      2010-12-16 09:58:06,105 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.105] Updated date added to response from item metadata where available;
      2010-12-16 09:58:06,105 INFO org.dspace.content.Item @ kim.shepherd@gmail.com:session_id=0:ip_addr=127.0.0.1:update_item:item_id=86729
      2010-12-16 09:58:06,110 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.110] Ingest successful;
      2010-12-16 09:58:06,110 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.110] Item created with internal identifier: 86729;
      2010-12-16 09:58:06,110 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.110] No external identifier available at this stage (item in workflow);
      2010-12-16 09:58:06,110 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.110] Archive ingest completed successfully;
      2010-12-16 09:58:06,110 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.110] Initialising ATOM entry generator for an Item;
      2010-12-16 09:58:06,116 INFO org.dspace.sword.SWORDService @ [2010-12-16 09:58:06.116] Total time for deposit processing: 478 ms;

      (...looks good so far, but...)

      2010-12-16 09:58:06,118 ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/sword].[deposit] @ Servlet.service() for servlet deposit threw exception
      java.lang.NoClassDefFoundError: Could not initialize class org.dspace.kernel.DSpaceKernelManager
              at org.dspace.utils.DSpace.<init>(DSpace.java:57)
              at org.dspace.utils.DSpace.<init>(DSpace.java:46)
              at org.dspace.discovery.IndexEventConsumer.<init>(IndexEventConsumer.java:41)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at java.lang.Class.newInstance0(Class.java:355)
              at java.lang.Class.newInstance(Class.java:308)
              at org.dspace.event.ConsumerProfile.readConfiguration(ConsumerProfile.java:87)
              at org.dspace.event.ConsumerProfile.makeConsumerProfile(ConsumerProfile.java:62)
              at org.dspace.event.EventManager$DispatcherPoolFactory.makeObject(EventManager.java:227)
              at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)
              at org.apache.commons.pool.PoolUtils$SynchronizedKeyedObjectPool.borrowObject(PoolUtils.java:1159)
              at org.dspace.event.EventManager.getDispatcher(EventManager.java:111)
              at org.dspace.core.Context.commit(Context.java:333)
              at org.dspace.sword.SWORDContext.commit(SWORDContext.java:178)
              at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:123)
              at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
              at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
              at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
              at java.lang.Thread.run(Thread.java:619)

        Activity

        Hide
        Kim Shepherd added a comment -
        Keiji Suzuki was the initial reporter of this issue. Below is Keiji's error (very similar to mine, though he managed to load the kernel manager ok?), pasted from a dspace-tech post:

        =====================PASTE================================

        Hi list,

        Illegal AccessError has occurred when I posted an item through SWORD
        to DSpace 1.7.0 rc1 with discovery cosumer setting.

        This error has not occurred when I posted through jspui nor xmlui.
        Also this error has not occurred when I posted through SWORD to
        DSpace without discovery consumer setting.

        The stacktrace is as follows:

        java.lang.IllegalAccessError: tried to access field
        org.slf4j.impl.StaticLoggerBinder.SINGLETON from class
        org.slf4j.LoggerFactory
               at org.slf4j.LoggerFactory.staticInitialize(LoggerFactory.java:83)
               at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:73)
               at org.dspace.kernel.DSpaceKernelManager.<clinit>(DSpaceKernelManager.java:28)
               at org.dspace.utils.DSpace.<init>(DSpace.java:57)
               at org.dspace.utils.DSpace.<init>(DSpace.java:46)
               at org.dspace.discovery.IndexEventConsumer.<init>(IndexEventConsumer.java:41)
               at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
               at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
               at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
               at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
               at java.lang.Class.newInstance0(Class.java:355)
               at java.lang.Class.newInstance(Class.java:308)
               at org.dspace.event.ConsumerProfile.readConfiguration(ConsumerProfile.java:87)
               at org.dspace.event.ConsumerProfile.makeConsumerProfile(ConsumerProfile.java:62)
               at org.dspace.event.EventManager$DispatcherPoolFactory.makeObject(EventManager.java:227)
               at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)
               at org.apache.commons.pool.PoolUtils$SynchronizedKeyedObjectPool.borrowObject(PoolUtils.java:1159)
               at org.dspace.event.EventManager.getDispatcher(EventManager.java:111)
               at org.dspace.core.Context.commit(Context.java:333)
               at org.dspace.sword.SWORDContext.commit(SWORDContext.java:178)
               at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:123)
               at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
               at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:427)
               at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)
               at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
               at java.lang.Thread.run(Thread.java:619)

        And an excerpt from the dependency tree of Building DSpace SWORD is as follows:

        [INFO] ------------------------------------------------------------------------
        [INFO] Building DSpace SWORD :: Web Application
        [INFO] task-segment: [dependency:tree]
        [INFO] ------------------------------------------------------------------------
        [INFO] [dependency:tree {execution: default-cli}]
        [INFO] org.dspace.modules:sword:war:1.7.0-rc1
        [INFO] +- org.dspace:dspace-sword-webapp:war:1.7.0-rc1:compile
        [INFO] +- org.dspace:dspace-sword-api:jar:1.7.0-rc1:compile

        -- snip

        [INFO] +- org.dspace:dspace-discovery-provider:jar:1.7.0-rc1:compile
        [INFO] | \- org.apache.solr:solr-solrj:jar:1.4.1:compile
        [INFO] | +- org.slf4j:slf4j-api:jar:1.5.5:compile
                                  <=== 1.5.5
        [INFO] | +- org.codehaus.woodstox:wstx-asl:jar:3.2.7:compile
        [INFO] | | \- stax:stax-api:jar:1.0.1:compile
        [INFO] | \-
        org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile

        --
        Keiji Suzuki
        Ebetsu, Japan
        Show
        Kim Shepherd added a comment - Keiji Suzuki was the initial reporter of this issue. Below is Keiji's error (very similar to mine, though he managed to load the kernel manager ok?), pasted from a dspace-tech post: =====================PASTE================================ Hi list, Illegal AccessError has occurred when I posted an item through SWORD to DSpace 1.7.0 rc1 with discovery cosumer setting. This error has not occurred when I posted through jspui nor xmlui. Also this error has not occurred when I posted through SWORD to DSpace without discovery consumer setting. The stacktrace is as follows: java.lang.IllegalAccessError: tried to access field org.slf4j.impl.StaticLoggerBinder.SINGLETON from class org.slf4j.LoggerFactory        at org.slf4j.LoggerFactory.staticInitialize(LoggerFactory.java:83)        at org.slf4j.LoggerFactory.<clinit>(LoggerFactory.java:73)        at org.dspace.kernel.DSpaceKernelManager.<clinit>(DSpaceKernelManager.java:28)        at org.dspace.utils.DSpace.<init>(DSpace.java:57)        at org.dspace.utils.DSpace.<init>(DSpace.java:46)        at org.dspace.discovery.IndexEventConsumer.<init>(IndexEventConsumer.java:41)        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)        at java.lang.Class.newInstance0(Class.java:355)        at java.lang.Class.newInstance(Class.java:308)        at org.dspace.event.ConsumerProfile.readConfiguration(ConsumerProfile.java:87)        at org.dspace.event.ConsumerProfile.makeConsumerProfile(ConsumerProfile.java:62)        at org.dspace.event.EventManager$DispatcherPoolFactory.makeObject(EventManager.java:227)        at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)        at org.apache.commons.pool.PoolUtils$SynchronizedKeyedObjectPool.borrowObject(PoolUtils.java:1159)        at org.dspace.event.EventManager.getDispatcher(EventManager.java:111)        at org.dspace.core.Context.commit(Context.java:333)        at org.dspace.sword.SWORDContext.commit(SWORDContext.java:178)        at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:123)        at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:427)        at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)        at java.lang.Thread.run(Thread.java:619) And an excerpt from the dependency tree of Building DSpace SWORD is as follows: [INFO] ------------------------------------------------------------------------ [INFO] Building DSpace SWORD :: Web Application [INFO] task-segment: [dependency:tree] [INFO] ------------------------------------------------------------------------ [INFO] [dependency:tree {execution: default-cli}] [INFO] org.dspace.modules:sword:war:1.7.0-rc1 [INFO] +- org.dspace:dspace-sword-webapp:war:1.7.0-rc1:compile [INFO] +- org.dspace:dspace-sword-api:jar:1.7.0-rc1:compile -- snip [INFO] +- org.dspace:dspace-discovery-provider:jar:1.7.0-rc1:compile [INFO] | \- org.apache.solr:solr-solrj:jar:1.4.1:compile [INFO] | +- org.slf4j:slf4j-api:jar:1.5.5:compile                           <=== 1.5.5 [INFO] | +- org.codehaus.woodstox:wstx-asl:jar:3.2.7:compile [INFO] | | \- stax:stax-api:jar:1.0.1:compile [INFO] | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile -- Keiji Suzuki Ebetsu, Japan
        Hide
        Kim Shepherd added a comment -
        Update: I can reproduce Keiji's exact error by ensuring that 'discovery' is *replacing* search in the list of event consumers rather than just adding it to the list.
        So replacing search with discovery will ensure that KernelManager is loaded, but then fails at slf4j init when trying to access the SINGLETON field.

        According to the slf4j FAQ, the SINGLETON field is private (and accessing it throws this IllegalAccessError) in versions 1.5.6+.

        Link to full discussion of error on the slf4j FAQ: http://www.slf4j.org/faq.html#IllegalAccessError

        dspace-solr module does indeed include version 1.5.6 of slf4j:

              <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-api</artifactId>
                 <version>1.5.6</version>
              </dependency>

              <dependency>
                 <groupId>org.slf4j</groupId>
                 <artifactId>slf4j-jdk14</artifactId>
                 <version>1.5.6</version>
              </dependency>

        We either need to roll back to slf4j or update code to handle the change in access to org.slf4j.impl.StaticLoggerBinder
        Show
        Kim Shepherd added a comment - Update: I can reproduce Keiji's exact error by ensuring that 'discovery' is *replacing* search in the list of event consumers rather than just adding it to the list. So replacing search with discovery will ensure that KernelManager is loaded, but then fails at slf4j init when trying to access the SINGLETON field. According to the slf4j FAQ, the SINGLETON field is private (and accessing it throws this IllegalAccessError) in versions 1.5.6+. Link to full discussion of error on the slf4j FAQ: http://www.slf4j.org/faq.html#IllegalAccessError dspace-solr module does indeed include version 1.5.6 of slf4j:       <dependency>          <groupId>org.slf4j</groupId>          <artifactId>slf4j-api</artifactId>          <version>1.5.6</version>       </dependency>       <dependency>          <groupId>org.slf4j</groupId>          <artifactId>slf4j-jdk14</artifactId>          <version>1.5.6</version>       </dependency> We either need to roll back to slf4j or update code to handle the change in access to org.slf4j.impl.StaticLoggerBinder
        Hide
        Kim Shepherd added a comment -
        Note: This needs rolling back to 1.5.5 (in lieu of a code change) in dspace-services as well as dspace-solr
        Show
        Kim Shepherd added a comment - Note: This needs rolling back to 1.5.5 (in lieu of a code change) in dspace-services as well as dspace-solr
        Hide
        Kim Shepherd added a comment -
        Extra note: This error also occurs when running [dspace]/bin/dspace update-discovery-index, so the link to SWORD is not really relevant (that's just another easy way of firing CREATE events)
        Show
        Kim Shepherd added a comment - Extra note: This error also occurs when running [dspace]/bin/dspace update-discovery-index, so the link to SWORD is not really relevant (that's just another easy way of firing CREATE events)
        Hide
        Kim Shepherd added a comment - - edited
        Note to confirm that I have successfully resolved this issue by manually rolling back slf4j-api and slf4j-log4j back to 1.5.5 in dspace-solr and dspace-services (and any webapps with these as dependencies) in normal ingest methods, update-discovery-index, etc., although SWORD still seems to be problematic
        Show
        Kim Shepherd added a comment - - edited Note to confirm that I have successfully resolved this issue by manually rolling back slf4j-api and slf4j-log4j back to 1.5.5 in dspace-solr and dspace-services (and any webapps with these as dependencies) in normal ingest methods, update-discovery-index, etc., although SWORD still seems to be problematic
        Hide
        Kim Shepherd added a comment -
        After rolling slf4j back to 1.5.5 and trying everything I can think of (order of consumers in dispatcher list, including search/browse/both/neither as well as discovery, etc.), I'm still having problems, but this is my stack trace. Seems to bounce between this and a more simple "ClassNotFound" for DSpaceKernelManager

        java.lang.IllegalStateException: Unable to aquire dispatcher named default
                at org.dspace.event.EventManager.getDispatcher(EventManager.java:115)
                at org.dspace.core.Context.commit(Context.java:333)
                at org.dspace.sword.SWORDContext.commit(SWORDContext.java:178)
                at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:123)
                at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
                at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
                at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
                at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
                at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
                at java.lang.Thread.run(Thread.java:619)
        Caused by: java.lang.IllegalStateException: DSpace kernel cannot be null
                at org.dspace.utils.DSpace.getServiceManager(DSpace.java:63)
                at org.dspace.discovery.IndexEventConsumer.<init>(IndexEventConsumer.java:43)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at org.dspace.event.ConsumerProfile.readConfiguration(ConsumerProfile.java:87)
                at org.dspace.event.ConsumerProfile.makeConsumerProfile(ConsumerProfile.java:62)
                at org.dspace.event.EventManager$DispatcherPoolFactory.makeObject(EventManager.java:227)
                at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)
                at org.apache.commons.pool.PoolUtils$SynchronizedKeyedObjectPool.borrowObject(PoolUtils.java:1159)
                at org.dspace.event.EventManager.getDispatcher(EventManager.java:111)
                ... 20 more
        Show
        Kim Shepherd added a comment - After rolling slf4j back to 1.5.5 and trying everything I can think of (order of consumers in dispatcher list, including search/browse/both/neither as well as discovery, etc.), I'm still having problems, but this is my stack trace. Seems to bounce between this and a more simple "ClassNotFound" for DSpaceKernelManager java.lang.IllegalStateException: Unable to aquire dispatcher named default         at org.dspace.event.EventManager.getDispatcher(EventManager.java:115)         at org.dspace.core.Context.commit(Context.java:333)         at org.dspace.sword.SWORDContext.commit(SWORDContext.java:178)         at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:123)         at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)         at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalStateException: DSpace kernel cannot be null         at org.dspace.utils.DSpace.getServiceManager(DSpace.java:63)         at org.dspace.discovery.IndexEventConsumer.<init>(IndexEventConsumer.java:43)         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)         at java.lang.Class.newInstance0(Class.java:355)         at java.lang.Class.newInstance(Class.java:308)         at org.dspace.event.ConsumerProfile.readConfiguration(ConsumerProfile.java:87)         at org.dspace.event.ConsumerProfile.makeConsumerProfile(ConsumerProfile.java:62)         at org.dspace.event.EventManager$DispatcherPoolFactory.makeObject(EventManager.java:227)         at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:964)         at org.apache.commons.pool.PoolUtils$SynchronizedKeyedObjectPool.borrowObject(PoolUtils.java:1159)         at org.dspace.event.EventManager.getDispatcher(EventManager.java:111)         ... 20 more
        Hide
        Kim Shepherd added a comment - - edited
        [i've edited this comment as some instructions were unnecessary -- it is recommended to apply the attached patch instead]
        Show
        Kim Shepherd added a comment - - edited [i've edited this comment as some instructions were unnecessary -- it is recommended to apply the attached patch instead]
        Hide
        Kim Shepherd added a comment -
        After chatting with Mark and testing more, I realised the Spring stuff is unnecessary -- all we need in this case is the new DSpaceKernelServletContextListener included as a listener, dspace-services-impl included as a dependency of dspace-sword-api, and an exclusion for slf4j in dspace-sword-api's dspace-api dependency.

        I've tested this smaller change, and it's working well. Patch will be committed to trunk and 1_7_x shortly
        Show
        Kim Shepherd added a comment - After chatting with Mark and testing more, I realised the Spring stuff is unnecessary -- all we need in this case is the new DSpaceKernelServletContextListener included as a listener, dspace-services-impl included as a dependency of dspace-sword-api, and an exclusion for slf4j in dspace-sword-api's dspace-api dependency. I've tested this smaller change, and it's working well. Patch will be committed to trunk and 1_7_x shortly
        Hide
        Kim Shepherd added a comment -
        Patch against trunk and 1_7_x branch
        Show
        Kim Shepherd added a comment - Patch against trunk and 1_7_x branch
        Hide
        Kim Shepherd added a comment -
        Committed to trunk (6175) and 1_7_x (6176)
        Show
        Kim Shepherd added a comment - Committed to trunk (6175) and 1_7_x (6176)
        Hide
        Kim Shepherd added a comment -
        Resolving.
        Show
        Kim Shepherd added a comment - Resolving.

          People

          • Assignee:
            Kim Shepherd
            Reporter:
            Kim Shepherd
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: