EBISPOT / lodestar

Linked Data explorer and SPARQL endpoint
Apache License 2.0
23 stars 22 forks source link

"Error creating bean with name virtuosoDataSourceProvider" on startup #3

Closed agrueneberg closed 10 years ago

agrueneberg commented 10 years ago

Hi Simon,

the manual states that "a clean install will deploy a Lodestar instance that has been configured to wrap the DBpedia SPARQL endpoint." However, when I drop the WAR file into the webapps folder, the following error is thrown (seems like port is omitted if blank, but even if I provide 80 in the properties file, it doesn't work):

2014-08-14 15:28:04,283 ERROR [localhost-startStop-1] context.ContextLoader (ContextLoader.java:319) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'virtuosoDataSourceProvider' defined in ServletContext resource [/WEB-INF/ebi-lode-service.xml]: Could not resolve matching constructor (hint: specify index/type/name arguments for simple parameters to avoid type ambiguities)
  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:250)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1051)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:955)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4760)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
  at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)

I expected the tool to just work without configuration. I'd rather not create a JNDI resource and just communicate with the DBpedia SPARQL endpoint using HTTP. After seeing "Works with any SPARQL endpoint" in the list of features I got the impression that this should be possible.

simonjupp commented 10 years ago

In a clean checkout the virtuosoDataSourceProvider bean should be commented out. https://github.com/EBISPOT/lodestar/blob/master/web-ui/src/main/webapp/WEB-INF/ebi-lode-service.xml

To connect to dbpedia with a clean checkout you just need to set the following property in the lode.properties file. lode.sparqlendpoint.url http://dbpedia.org/sparql

agrueneberg commented 10 years ago

Thanks, Simon. In this case it's a simple packaging issue. The ebi-lode-service.xml configuration file of the WAR downloaded from http://www.ebi.ac.uk/fgpt/sw/downloads/index.html has both virtuosoDataSourceProvider and jenaVirtuosoConnectionPoolService uncommented.

agrueneberg commented 10 years ago

Do you mind re-releasing? A lot of people in our division want to deploy their own Lodestar now. Unfortunately, I can't re-package it for them because I cannot access the EBI-internal Maven repositories.

simonjupp commented 10 years ago

I'm working on a 1.2 release. Checkout the branch called virt-module, you should be able to build a new war with maven without the virtuoso dependencies. Let me know if any problems.

simonjupp commented 10 years ago

Just released 1.2 code checked into master now. I've also updated the war on http://www.ebi.ac.uk/fgpt/sw/downloads/index.html

agrueneberg commented 10 years ago

It both builds and runs—couldn't be happier! Thanks again, Simon. This is a great tool.