You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by olivier <ol...@gmail.com> on 2016/08/17 10:48:57 UTC

Can't make camel-example-spring-security works

Hi,

This is probably a basic issue but i'm not very familiar with neither Camel,
nor Maven.

I'm simply trying to run the camel-example-spring-security provided with
Camel 2.17.3 version.

I'm running Maven 3.2.3 with Java 1.8.0_101.

In the instructions it says to run:
mvn clean install
And then:
mvn jetty:run

The "mvn clean install" works, no problem. But when I run "mvn jetty:run", I
get the following errors:

2016-08-17 12:43:43,909 [main           ] ERROR ContextLoader                 
- Context initialization failed
org.springframework.beans.factory.BeanCreationException: *Error creating
bean with name 'accessDecisionManager' defined in class path resource
[camel-context.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.security.access.vote.AffirmativeBased]: No default
constructor found; nested exception is java.lang.NoSuchMethodException*:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        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:772)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:298)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:520)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:365)
        at
org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:523)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to
instantiate [org.springframework.security.access.vote.AffirmativeBased]: No
default constructor found; nested exception is
java.lang.NoSuchMethodException:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
        ... 55 more
Caused by: java.lang.NoSuchMethodException:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at java.lang.Class.getConstructor0(Class.java:3082)
        at java.lang.Class.getDeclaredConstructor(Class.java:2178)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
        ... 56 more
2016-08-17 12:43:43.909:WARN:oejw.WebAppContext:Failed startup of context
o.m.j.p.JettyWebAppContext{/,file:/C:/Programs/apache-camel-2.17.3/examples/camel-example-spring-security/src/main/webapp/},file:/C:/Programs/apache-camel-2.17.3/examples/camel-example-spring-security/src/main/webapp/
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'accessDecisionManager' defined in class path resource
[camel-context.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.security.access.vote.AffirmativeBased]: No default
constructor found; nested exception is java.lang.NoSuchMethodException:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1105)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        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:772)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:298)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:520)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:365)
        at
org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:523)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by:
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.security.access.vote.AffirmativeBased]: No default
constructor found; nested exception is java.lang.NoSuchMethodException:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:85)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        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:772)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:298)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:520)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:365)
        at
org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:523)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by:
java.lang.NoSuchMethodException:
org.springframework.security.access.vote.AffirmativeBased.<init>()
        at java.lang.Class.getConstructor0(Class.java:3082)
        at java.lang.Class.getDeclaredConstructor(Class.java:2178)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:80)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1098)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1050)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        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:772)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
        at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
        at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
        at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
        at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
        at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
        at
org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
        at
org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:298)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:172)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
        at org.eclipse.jetty.server.Server.doStart(Server.java:282)
        at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:520)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:365)
        at
org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:523)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

I can't understand how to fix it and don't understand why I get this out of
the box, I haven't touched anything in the example.

Any idea? Anyone can have it working?

Thanks.

Olivier



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't make camel-example-spring-security works

Posted by olivier <ol...@gmail.com>.
Hi,

Thanks for having handled this.

2016-08-26 22:14 GMT+02:00 Claus Ibsen-2 [via Camel] <
ml-node+s465427n5786774h14@n5.nabble.com>:

> Hi
>
> I just fixed the example so we wont forget to do it
> https://github.com/apache/camel/commit/ba6fc872e40b48344330b7bc469892
> e63eb739cc
>
>
> On Fri, Aug 19, 2016 at 10:08 AM, Claus Ibsen <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5786774&i=0>> wrote:
>
> > Hi
> >
> > Thanks for spotting.
> >
> > You are welcome to log a JIRA and provide a patch / github PR with a fix
> > http://camel.apache.org/support.html
> > http://camel.apache.org/contributing.html
> >
> > On Fri, Aug 19, 2016 at 9:53 AM, olivier <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=5786774&i=1>> wrote:
> >> So, i've figured it out by myself. Here is the solution for those who
> might
> >> have the same issue.
> >>
> >> It seems Camel security 2.17.3 depends on Spring security 4.x...but the
> >> camel-context spring security part of the example is written in Spring
> >> security 3.x, which produces the errors above, because, indeed, in
> Spring
> >> security 4.x, there is no more default constructor for AffirmativeBased
> >> (which existed in 3.x version).
> >>
> >> So below are the changes to do in camel-context.xml.
> >>
> >> The <spring-security:http> becomes:
> >> <spring-security:http realm="User Restrict Realm">
> >>     *<spring-security:intercept-url pattern="/camel/**"
> >> access="hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')"/>*
> >>     <spring-security:http-basic/>
> >>     <spring-security:remember-me/>
> >>   </spring-security:http>
> >>
> >> And the accessDecisionManager becomes:
> >> <bean id="accessDecisionManager"
> >> class="org.springframework.security.access.vote.AffirmativeBased">
> >>     <property name="allowIfAllAbstainDecisions" value="true"/>
> >>     *<constructor-arg>
> >>       <list>
> >>         <bean class="org.springframework.security.access.vote.RoleVoter"/>
>
> >>       </list>
> >>     </constructor-arg>*
> >>   </bean>
> >>
> >> Then you can mvn install and mvn jetty:run without any error, and test
> the
> >> endpoints by passing the credentials in HTTP Authorization header.
> >>
> >>
> >>
> >> --
> >> View this message in context: http://camel.465427.n5.nabble.
> com/Can-t-make-camel-example-spring-security-works-tp5786528p5786624.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> >
> > --
> > Claus Ibsen
> > -----------------
> > http://davsclaus.com @davsclaus
> > Camel in Action 2: https://www.manning.com/ibsen2
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Can-t-make-camel-example-
> spring-security-works-tp5786528p5786774.html
> To unsubscribe from Can't make camel-example-spring-security works, click
> here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5786528&code=b2xpdmllci5kZWxvYnJlQGdtYWlsLmNvbXw1Nzg2NTI4fDE2OTkwMDM5OTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786963.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't make camel-example-spring-security works

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I just fixed the example so we wont forget to do it
https://github.com/apache/camel/commit/ba6fc872e40b48344330b7bc469892e63eb739cc

On Fri, Aug 19, 2016 at 10:08 AM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Thanks for spotting.
>
> You are welcome to log a JIRA and provide a patch / github PR with a fix
> http://camel.apache.org/support.html
> http://camel.apache.org/contributing.html
>
> On Fri, Aug 19, 2016 at 9:53 AM, olivier <ol...@gmail.com> wrote:
>> So, i've figured it out by myself. Here is the solution for those who might
>> have the same issue.
>>
>> It seems Camel security 2.17.3 depends on Spring security 4.x...but the
>> camel-context spring security part of the example is written in Spring
>> security 3.x, which produces the errors above, because, indeed, in Spring
>> security 4.x, there is no more default constructor for AffirmativeBased
>> (which existed in 3.x version).
>>
>> So below are the changes to do in camel-context.xml.
>>
>> The <spring-security:http> becomes:
>> <spring-security:http realm="User Restrict Realm">
>>     *<spring-security:intercept-url pattern="/camel/**"
>> access="hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')"/>*
>>     <spring-security:http-basic/>
>>     <spring-security:remember-me/>
>>   </spring-security:http>
>>
>> And the accessDecisionManager becomes:
>> <bean id="accessDecisionManager"
>> class="org.springframework.security.access.vote.AffirmativeBased">
>>     <property name="allowIfAllAbstainDecisions" value="true"/>
>>     *<constructor-arg>
>>       <list>
>>         <bean class="org.springframework.security.access.vote.RoleVoter"/>
>>       </list>
>>     </constructor-arg>*
>>   </bean>
>>
>> Then you can mvn install and mvn jetty:run without any error, and test the
>> endpoints by passing the credentials in HTTP Authorization header.
>>
>>
>>
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786624.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Can't make camel-example-spring-security works

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for spotting.

You are welcome to log a JIRA and provide a patch / github PR with a fix
http://camel.apache.org/support.html
http://camel.apache.org/contributing.html

On Fri, Aug 19, 2016 at 9:53 AM, olivier <ol...@gmail.com> wrote:
> So, i've figured it out by myself. Here is the solution for those who might
> have the same issue.
>
> It seems Camel security 2.17.3 depends on Spring security 4.x...but the
> camel-context spring security part of the example is written in Spring
> security 3.x, which produces the errors above, because, indeed, in Spring
> security 4.x, there is no more default constructor for AffirmativeBased
> (which existed in 3.x version).
>
> So below are the changes to do in camel-context.xml.
>
> The <spring-security:http> becomes:
> <spring-security:http realm="User Restrict Realm">
>     *<spring-security:intercept-url pattern="/camel/**"
> access="hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')"/>*
>     <spring-security:http-basic/>
>     <spring-security:remember-me/>
>   </spring-security:http>
>
> And the accessDecisionManager becomes:
> <bean id="accessDecisionManager"
> class="org.springframework.security.access.vote.AffirmativeBased">
>     <property name="allowIfAllAbstainDecisions" value="true"/>
>     *<constructor-arg>
>       <list>
>         <bean class="org.springframework.security.access.vote.RoleVoter"/>
>       </list>
>     </constructor-arg>*
>   </bean>
>
> Then you can mvn install and mvn jetty:run without any error, and test the
> endpoints by passing the credentials in HTTP Authorization header.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786624.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Can't make camel-example-spring-security works

Posted by olivier <ol...@gmail.com>.
So, i've figured it out by myself. Here is the solution for those who might
have the same issue.

It seems Camel security 2.17.3 depends on Spring security 4.x...but the
camel-context spring security part of the example is written in Spring
security 3.x, which produces the errors above, because, indeed, in Spring
security 4.x, there is no more default constructor for AffirmativeBased
(which existed in 3.x version).

So below are the changes to do in camel-context.xml.

The <spring-security:http> becomes:
<spring-security:http realm="User Restrict Realm">
    *<spring-security:intercept-url pattern="/camel/**"
access="hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')"/>*
    <spring-security:http-basic/>
    <spring-security:remember-me/>
  </spring-security:http>

And the accessDecisionManager becomes:
<bean id="accessDecisionManager"
class="org.springframework.security.access.vote.AffirmativeBased">
    <property name="allowIfAllAbstainDecisions" value="true"/>
    *<constructor-arg>
      <list>
        <bean class="org.springframework.security.access.vote.RoleVoter"/>
      </list>
    </constructor-arg>*
  </bean>

Then you can mvn install and mvn jetty:run without any error, and test the
endpoints by passing the credentials in HTTP Authorization header.



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-make-camel-example-spring-security-works-tp5786528p5786624.html
Sent from the Camel - Users mailing list archive at Nabble.com.