On Tue, 2019-06-18 at 11:15 -0700, Firoz Alam wrote: > Dear Team, > I have installed dspace on locally and trying to run it run and jspui > page > is opening. > Now when i am trying to make rest call to dspace-rest i get below > error > ailure during filter init: DSpace home directory could not be > determined. > It MUST include a subpath of '/config/config-definition.xml'. Please > consider setting the 'dspace.dir' system property or ensure the > dspace-api.jar is being run from > [dspace]/lib/.:java.lang.RuntimeException: > DSpace home directory could not be determined. It MUST include a > subpath of > '/config/config-definition.xml'. Please consider setting the > 'dspace.dir' > system property or ensure the dspace-api.jar is being run from > [dspace]/lib/. > Jun 18, 2019 7:28:43 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: DSpace home > directory could not be determined. It MUST include a subpath of > '/config/config-definition.xml'. Please consider setting the > 'dspace.dir' > system property or ensure the dspace-api.jar is being run from > [dspace]/lib/.* > at > org.dspace.servicemanager.servlet.DSpaceKernelServletContextListener. > contextInitialized(DSpaceKernelServletContextListener.java:92) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContex > t.java:4770) > at > org.apache.catalina.core.StandardContext.startInternal(StandardContex > t.java:5236) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1423) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1413) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. > java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor > .java:624) > at java.lang.Thread.run(Thread.java:748) > *Caused by: java.lang.RuntimeException: DSpace home directory could > not be > determined. It MUST include a subpath of '/config/config- > definition.xml'.* > Please consider setting the 'dspace.dir' system property or ensure > the > dspace-api.jar is being run from [dspace]/lib/. > at > org.dspace.servicemanager.config.DSpaceConfigurationService.getDSpace > Home(DSpaceConfigurationService.java:628) > at > org.dspace.servicemanager.config.DSpaceConfigurationService.loadIniti > alConfig(DSpaceConfigurationService.java:465) > at > org.dspace.servicemanager.config.DSpaceConfigurationService.<init>(DS > paceConfigurationService.java:87) > at > org.dspace.servicemanager.DSpaceKernelImpl.start(DSpaceKernelImpl.jav > a:148) > at > org.dspace.servicemanager.servlet.DSpaceKernelServletContextListener. > contextInitialized(DSpaceKernelServletContextListener.java:81) > ... 9 more > > Jun 18, 2019 7:28:43 PM org.apache.catalina.core.ApplicationContext > log > INFO: Initializing Spring root WebApplicationContext > Jun 18, 2019 7:28:43 PM org.apache.catalina.core.StandardContext > listenerStart > *SEVERE: Exception sending context initialized event to listener > instance > of class [org.springframework.web.context.ContextLoaderListener]* > org.springframework.beans.factory.BeanCreationException: Error > creating > bean with name 'dspace.eventService' defined in ServletContext > resource > [/WEB-INF/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.instant > iateUsingFactoryMethod(ConstructorResolver.java:603) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBean > Factory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFact > ory.java:1057) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBean > Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:95 > 3) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBean > Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) > at > org.springframework.beans.factory.support.AbstractAutowireCapableBean > Factory.createBean(AbstractAutowireCapableBeanFactory.java:458) > at > org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb > ject(AbstractBeanFactory.java:293) > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistr > y.getSingleton(DefaultSingletonBeanRegistry.java:223) > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe > an(AbstractBeanFactory.java:290) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean > (AbstractBeanFactory.java:191) > at > org.springframework.beans.factory.support.DefaultListableBeanFactory. > preInstantiateSingletons(DefaultListableBeanFactory.java:636) > at > org.springframework.context.support.AbstractApplicationContext.finish > BeanFactoryInitialization(AbstractApplicationContext.java:938) > at > org.springframework.context.support.AbstractApplicationContext.refres > h(AbstractApplicationContext.java:479) > at > org.springframework.web.context.ContextLoader.configureAndRefreshWebA > pplicationContext(ContextLoader.java:410) > at > org.springframework.web.context.ContextLoader.initWebApplicationConte > xt(ContextLoader.java:306) > at > org.springframework.web.context.ContextLoaderListener.contextInitiali > zed(ContextLoaderListener.java:112) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContex > t.java:4770) > at > org.apache.catalina.core.StandardContext.startInternal(StandardContex > t.java:5236) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1423) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1413) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. > java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor > .java:624) > at java.lang.Thread.run(Thread.java:748) > 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:181) > at > org.springframework.beans.factory.support.ConstructorResolver.instant > iateUsingFactoryMethod(ConstructorResolver.java:592) > ... 23 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:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.springframework.beans.factory.support.SimpleInstantiationStrategy > .instantiate(SimpleInstantiationStrategy.java:160) > ... 24 more > > Jun 18, 2019 7:28:43 PM org.apache.catalina.core.StandardContext > listenerStart > SEVERE: Exception sending context initialized event to listener > instance of > class [org.dspace.app.util.DSpaceWebappListener] > java.lang.IllegalStateException: DSpace kernel cannot be null > at org.dspace.utils.DSpace.getServiceManager(DSpace.java:63) > at > org.dspace.services.factory.DSpaceServicesFactory.getInstance(DSpaceS > ervicesFactory.java:35) > at > org.dspace.app.util.factory.UtilServiceFactory.getInstance(UtilServic > eFactory.java:30) > at > org.dspace.app.util.AbstractDSpaceWebapp.<init>(AbstractDSpaceWebapp. > java:34) > at org.dspace.utils.DSpaceWebapp.<init>(DSpaceWebapp.java:23) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct > orAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC > onstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at java.lang.Class.newInstance(Class.java:442) > at > org.dspace.app.util.DSpaceWebappListener.contextInitialized(DSpaceWeb > appListener.java:30) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContex > t.java:4770) > at > org.apache.catalina.core.StandardContext.startInternal(StandardContex > t.java:5236) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1423) > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase. > java:1413) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. > java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor > .java:624) > at java.lang.Thread.run(Thread.java:748) > > further is my configuration file. > > ########################## > # SERVER CONFIGURATION # > ########################## > > # DSpace installation directory. > # This is the location where you want to install DSpace. > # Windows note: Please remember to use forward slashes for all paths > (e.g. > C:/dspace) > #dspace.dir=/home/kostis/Documents/projects/dspace > *dspace.dir = /dspace* > > # DSpace host name - should match base URL. Do not include port > number > dspace.hostname = localhost > > # DSpace base host URL. Include port number etc. > *dspace.baseUrl = http://localhost:8080* > > # The user interface you will be using for DSpace. Common usage is > either > xmlui or jspui > *dspace.ui = jspui* > > # Full link your end users will use to access DSpace. In most cases, > this > will be the baseurl followed by > # the context path to the UI you are using. > # > # Alternatively, you can use a url redirect or deploy the web > application > under the servlet container root. > # In this case, make sure to remove the /${dspace.ui} from the > dspace.url > property. > #dspace.url = ${dspace.baseUrl}/${dspace.ui} > "local.cfg" 207L, > 8350C > > > 1,1 Top > >
This is at least wrong in your config file: *dspace.dir = /dspace* should probably be: dspace.dir = /dspace AFAIK Generally you should remove the *'s HTH /tony -- Tony Albers - Systems Architect - IT Development Royal Danish Library, Victor Albecks Vej 1, 8000 Aarhus C, Denmark Tel: +45 2566 2383 - CVR/SE: 2898 8842 - EAN: 5798000792142 -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- You received this message because you are subscribed to the Google Groups "DSpace Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/1560920543.3389.2.camel%40kb.dk.
