SANSA-Stack/Archived-SANSA-Examples

[SANSA-Query example] : ERROR DispatcherServlet: Context initialization failed

GezimSejdiu opened this issue · 10 comments

Hi,

this issue is happening when we try to run Sparqlify example.

ERROR SpringComponentProvider: None or multiple beans found in Spring context for type class org.aksw.jena_sparql_api.web.servlets.ServletSparqlServiceImpl, skipping the type.

For more details see the full stack :

Stack trace

18/04/20 13:11:07 ERROR SpringComponentProvider: None or multiple beans found in Spring context for type class org.aksw.jena_sparql_api.web.servlets.ServletSparqlServiceImpl, skipping the type.
18/04/20 13:11:07 INFO ROOT: Initializing Spring FrameworkServlet 'dispatcherServlet'
18/04/20 13:11:07 INFO DispatcherServlet: FrameworkServlet 'dispatcherServlet': initialization started
18/04/20 13:11:07 INFO AnnotationConfigWebApplicationContext: Refreshing WebApplicationContext for namespace 'dispatcherServlet-servlet': startup date [Fri Apr 20 13:11:07 CEST 2018]; parent: org.springframework.web.context.support.GenericWebApplicationContext@320fc4b0
18/04/20 13:11:07 INFO AnnotationConfigWebApplicationContext: Registering annotated classes: [class org.aksw.jena_sparql_api.web.server.WebMvcConfigSnorql]
18/04/20 13:11:07 INFO AutowiredAnnotationBeanPostProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
18/04/20 13:11:07 WARN AnnotationConfigWebApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
18/04/20 13:11:07 ERROR DispatcherServlet: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:540)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:665)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:423)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
	at org.eclipse.jetty.server.Server.start(Server.java:418)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:385)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:56)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:48)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:40)
	at org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer.create(FactoryBeanSparqlServer.java:84)
	at net.sansa_stack.examples.spark.query.Sparqlify$.run(Sparqlify.scala:54)
	at net.sansa_stack.examples.spark.query.Sparqlify$.main(Sparqlify.scala:22)
	at net.sansa_stack.examples.spark.query.Sparqlify.main(Sparqlify.scala)
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
	... 36 more
18/04/20 13:11:07 WARN ROOT: unavailable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:540)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:665)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:423)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
	at org.eclipse.jetty.server.Server.start(Server.java:418)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:385)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:56)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:48)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:40)
	at org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer.create(FactoryBeanSparqlServer.java:84)
	at net.sansa_stack.examples.spark.query.Sparqlify$.run(Sparqlify.scala:54)
	at net.sansa_stack.examples.spark.query.Sparqlify$.main(Sparqlify.scala:22)
	at net.sansa_stack.examples.spark.query.Sparqlify.main(Sparqlify.scala)
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
	... 36 more
18/04/20 13:11:07 WARN WebAppContext: Failed startup of context o.e.j.w.WebAppContext@28200d43{/,file:///tmp/jetty-0.0.0.0-7531-jena-sparql-api-server-utils-3.5.0-2.jar-_-any-8595261063220975453.dir/webapp/,UNAVAILABLE}{file:/home/gezim/.m2/repository/org/aksw/jena-sparql-api/jena-sparql-api-server-utils/3.5.0-2/jena-sparql-api-server-utils-3.5.0-2.jar}
javax.servlet.ServletException: dispatcherServlet@7ef5559e==org.springframework.web.servlet.DispatcherServlet,jsp=null,order=1,inst=false
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:686)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:423)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
	at org.eclipse.jetty.server.Server.start(Server.java:418)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:385)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:56)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:48)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:40)
	at org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer.create(FactoryBeanSparqlServer.java:84)
	at net.sansa_stack.examples.spark.query.Sparqlify$.run(Sparqlify.scala:54)
	at net.sansa_stack.examples.spark.query.Sparqlify$.main(Sparqlify.scala:22)
	at net.sansa_stack.examples.spark.query.Sparqlify.main(Sparqlify.scala)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:540)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:665)
	... 22 more
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
	... 36 more
18/04/20 13:11:07 INFO AbstractConnector: Started ServerConnector@3a36da5e{HTTP/1.1,[http/1.1]}{0.0.0.0:7531}
18/04/20 13:11:07 INFO Server: Started @9377ms

It seems that it could be related to Sparqlify’s servlet engine, but @Aklakan could you have a look for more details how to debug this issue.

Best regards,
Gezim

Sigh, I am constantly trying to separate spring-related code from any actual implementations due to all the version conflicts caused. The cause of the exception seems to indicate yet another one of those issues:

java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V

The issue should be fixed (added a unit test to jena-sparql-api-server-standalone)

HI @Aklakan ,
just to reactivate this thread. The error still persist on SANSA-Examples when we run Sparqlify example.

Properties

  • jena.version: 3.7.0
  • sparqlify-core.version: 0.8.5

The error is shown below :

18/07/13 15:51:31 ERROR DispatcherServlet: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:540)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:665)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:423)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
	at org.eclipse.jetty.server.Server.start(Server.java:418)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:385)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:54)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:46)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:38)
	at org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer.create(FactoryBeanSparqlServer.java:85)
	at net.sansa_stack.examples.spark.query.Sparqlify$.run(Sparqlify.scala:54)
	at net.sansa_stack.examples.spark.query.Sparqlify$.main(Sparqlify.scala:22)
	at net.sansa_stack.examples.spark.query.Sparqlify.main(Sparqlify.scala)
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
	... 36 more

Could you guide me how to resolve it as you mention on your previous comment that the issue should be fixed now.
Best regards,

There are still Spring version conflicts:

mvn dependency:tree

Sparqlify works on version 4.3.14.RELEASE

+- net.sansa-stack:sansa-query-spark_2.11:jar:0.4.1-SNAPSHOT:compile
[INFO] |  +- org.aksw.jena-sparql-api:jena-sparql-api-server-standalone:jar:3.7.0-3:compile
[INFO] |  |  \- org.aksw.jena-sparql-api:jena-sparql-api-server-utils:jar:3.7.0-3:compile
[INFO] |  |     +- org.aksw.jena-sparql-api:jena-sparql-api-web:jar:3.7.0-3:compile
[INFO] |  |     |  +- org.aksw.jena-sparql-api:jena-sparql-api-concepts:jar:3.7.0-3:compile
[INFO] |  |     |  |  \- org.aksw.gson:gson-utils-core:jar:1.0.0:compile
[INFO] |  |     |  +- org.aksw.jena-sparql-api:jena-sparql-api-update:jar:3.7.0-3:compile
[INFO] |  |     |  \- org.glassfish.jersey.ext:jersey-spring3:jar:2.26-b03:compile
[INFO] |  |     |     +- org.glassfish.hk2:hk2:jar:2.5.0-b36:compile
[INFO] |  |     |     |  +- org.glassfish.hk2:config-types:jar:2.5.0-b36:compile
[INFO] |  |     |     |  +- org.glassfish.hk2:hk2-core:jar:2.5.0-b36:compile
[INFO] |  |     |     |  +- org.glassfish.hk2:hk2-config:jar:2.5.0-b36:compile
[INFO] |  |     |     |  |  \- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] |  |     |     |  |     +- org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile
[INFO] |  |     |     |  |     \- com.fasterxml:classmate:jar:1.1.0:compile
[INFO] |  |     |     |  +- org.glassfish.hk2:hk2-runlevel:jar:2.5.0-b36:compile
[INFO] |  |     |     |  \- org.glassfish.hk2:class-model:jar:2.5.0-b36:compile
[INFO] |  |     |     |     \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.5.0-b36:compile
[INFO] |  |     |     \- org.glassfish.hk2:spring-bridge:jar:2.5.0-b36:compile
[INFO] |  |     +- org.glassfish.jersey.media:jersey-media-multipart:jar:2.26-b03:compile
[INFO] |  |     |  \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
[INFO] |  |     +- org.springframework:spring-webmvc:jar:4.3.14.RELEASE:compile
[INFO] |  |     +- org.springframework:spring-web:jar:4.3.14.RELEASE:compile

but

[INFO] +- net.sansa-stack:sansa-ml-spark_2.11:jar:0.4.1-SNAPSHOT:compile
...
[INFO] |  \- org.springframework:spring:jar:2.5.6.SEC03:compile

The question is, who added the Spring dependency for the ML layer and why?

Ok, it was Hamed:
SANSA-Stack/Archived-SANSA-ML@1e6bedd

and he's using it just for a StopWatch class org.springframework.util.StopWatch in a script for testing ... I guess this should be removed and replaced by maybe Guava StopWatch or plain Java/Scala...

Hi @LorenzBuehmann ,
many thanks for deprecating the dependency from SANSA-ML. I just tested it on SANSA-Example locally by doing mvn -U install and then run from the IDE. I still get the error:

18/07/16 16:29:34 ERROR DispatcherServlet: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.event.internalEventListenerProcessor': Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:540)
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
	at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:665)
	at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:423)
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:760)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:348)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1515)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1477)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:133)
	at org.eclipse.jetty.server.Server.start(Server.java:418)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:385)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:54)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:46)
	at org.aksw.jena_sparql_api.web.server.ServerUtils.startServer(ServerUtils.java:38)
	at org.aksw.jena_sparql_api.server.utils.FactoryBeanSparqlServer.create(FactoryBeanSparqlServer.java:85)
	at net.sansa_stack.examples.spark.query.Sparqlify$.run(Sparqlify.scala:54)
	at net.sansa_stack.examples.spark.query.Sparqlify$.main(Sparqlify.scala:22)
	at net.sansa_stack.examples.spark.query.Sparqlify.main(Sparqlify.scala)
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(Ljava/lang/Class;)V
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:350)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:296)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:992)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:523)
	... 36 more

The springframework is no longer part of SANSA-ML (see the dependency tree below) and still the issue persist.

[INFO] +- net.sansa-stack:sansa-ml-spark_2.11:jar:0.4.1-SNAPSHOT:compile
[INFO] |  +- net.sansa-stack:sansa-ml-common_2.11:jar:0.4.1-SNAPSHOT:compile
[INFO] |  +- com.github.fommil.netlib:all:pom:1.1.2:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-osx-x86_64:jar:natives:1.1:compile
[INFO] |  |  |  \- com.github.fommil.netlib:native_ref-java:jar:1.1:compile
[INFO] |  |  |     \- com.github.fommil:jniloader:jar:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-linux-x86_64:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-linux-i686:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-win-x86_64:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-win-i686:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_ref-linux-armhf:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_system-osx-x86_64:jar:natives:1.1:compile
[INFO] |  |  |  \- com.github.fommil.netlib:native_system-java:jar:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_system-linux-x86_64:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_system-linux-i686:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_system-linux-armhf:jar:natives:1.1:compile
[INFO] |  |  +- com.github.fommil.netlib:netlib-native_system-win-x86_64:jar:natives:1.1:compile
[INFO] |  |  \- com.github.fommil.netlib:netlib-native_system-win-i686:jar:natives:1.1:compile
[INFO] |  +- net.jpountz.lz4:lz4:jar:1.3.0:compile
[INFO] |  +- net.sourceforge.owlapi:org.semanticweb.hermit:jar:1.3.8.510:compile
[INFO] |  |  +- net.sourceforge.owlapi:owlapi-distribution:jar:5.1.0:compile
[INFO] |  |  |  +- net.sourceforge.owlapi:owlapi-compatibility:jar:5.1.0:compile
[INFO] |  |  |  \- org.eclipse.rdf4j:rdf4j-util:jar:2.1.4:compile
[INFO] |  |  +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.14:compile
[INFO] |  |  |  +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:compile
[INFO] |  |  |  +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  |  |  +- jaxen:jaxen:jar:1.1.4:compile
[INFO] |  |  |  +- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] |  |  |  \- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] |  |  +- org.apache.ws.commons.axiom:axiom-c14n:jar:1.2.14:compile
[INFO] |  |  +- org.apache.ws.commons.axiom:axiom-impl:jar:1.2.14:compile
[INFO] |  |  |  \- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.4:compile
[INFO] |  |  |     \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
[INFO] |  |  +- org.apache.ws.commons.axiom:axiom-dom:jar:1.2.14:compile
[INFO] |  |  \- dk.brics.automaton:automaton:jar:1.11-8:compile
[INFO] |  +- org.apache.hadoop:hadoop-streaming:jar:2.8.3:compile
[INFO] |  +- net.sf.extjwnl:extjwnl:jar:1.9.4:compile
[INFO] |  |  \- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.3.2:compile
[INFO] |  +- net.sf.extjwnl:extjwnl-data-wn31-map:jar:1.0:compile
[INFO] |  +- com.intel.analytics.bigdl:bigdl-SPARK_2.2:jar:0.3.0:compile
[INFO] |  |  +- org.apache.opennlp:opennlp-tools:jar:1.6.0:compile
[INFO] |  |  +- com.twelvemonkeys.imageio:imageio-jpeg:jar:3.2.1:compile
[INFO] |  |  |  +- com.twelvemonkeys.imageio:imageio-core:jar:3.2.1:compile
[INFO] |  |  |  +- com.twelvemonkeys.imageio:imageio-metadata:jar:3.2.1:compile
[INFO] |  |  |  +- com.twelvemonkeys.common:common-lang:jar:3.2.1:compile
[INFO] |  |  |  +- com.twelvemonkeys.common:common-io:jar:3.2.1:compile
[INFO] |  |  |  \- com.twelvemonkeys.common:common-image:jar:3.2.1:compile
[INFO] |  |  +- com.intel.analytics.bigdl:bigdl-core:pom:0.3.0:compile
[INFO] |  |  |  +- com.intel.analytics.bigdl.native:mkl-java:jar:0.3.0:compile
[INFO] |  |  |  +- com.intel.analytics.bigdl.bigquant:bigquant-java:jar:0.3.0:compile
[INFO] |  |  |  +- com.intel.analytics.bigdl.native:mkl-java-mac:jar:0.3.0:compile
[INFO] |  |  |  +- com.intel.analytics.bigdl.bigquant:bigquant-java-mac:jar:0.3.0:compile
[INFO] |  |  |  +- com.intel.analytics.bigdl.native:mkl-java-win64:jar:0.3.0:compile
[INFO] |  |  |  \- com.intel.analytics.bigdl.bigquant:bigquant-java-win64:jar:0.3.0:compile
[INFO] |  |  \- com.intel.analytics.bigdl.spark-version:2.0-SPARK_2.2:jar:0.3.0:compile
[INFO] |  \- org.json:json:jar:20180130:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.scalatest:scalatest_2.11:jar:2.2.6:test
[INFO] |  +- org.scala-lang:scala-reflect:jar:2.11.7:compile
[INFO] |  \- org.scala-lang.modules:scala-xml_2.11:jar:1.0.2:compile
[INFO] +- com.typesafe.scala-logging:scala-logging_2.11:jar:3.5.0:compile
[INFO] \- com.github.scopt:scopt_2.11:jar:3.5.0:compile
[INFO] ------------------------------------------------------------------------

Best,

@GezimSejdiu what are the arguments your using when running the query example?

Hi Lorenz,
since the SPARQL endpoint is exposed by default on the example, you just need to specify the input path (e.g -i src/main/resources/rdf.nt).

For me it works in IDE, the only thing that I had to do is to fix the Jersey dependency to latest - there are as usual multiple version around due to dependencies...

Many thanks, @LorenzBuehmann for solving the issue via Jersey dependency upgrade commit.

It is working for me as well.