cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vecchio Fabrizio <vecchio.fabri...@payroll.it>
Subject Spring Security with "namespace" configuration
Date Thu, 17 Apr 2008 12:34:53 GMT
Hi,
i'm working on cocoon 2.2 + spring-security 2.0 (ex acegi).
I've configured my block security using standard spring bean definitions
 i've tested with cocoon-rcl and cocoon-war and all works fine; then
i've switched to the new "namespace" spring configuration like the
following:

  <http auto-config="true">
    <intercept-url pattern="/_sec/**" access="ROLE_USER"/>
  </http>

When i run on cocoon-rcl all works fine but when i switch to cocoon-war
deployed on tomcat i got this exception :


[ERROR,ContextLoader,ContainerBackgroundProcessor[StandardEngine[Catalina]]]
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'org.apache.cocoon.template.script.InstructionFactory'
defined in URL
[jar:file:/home/pes1vec/tomcat6/webapps/bos/WEB-INF/lib/cocoon-template-impl-1.1.0.jar!/META-INF/cocoon/spring/cocoon-template.xml]:
Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanCreationException: unable to parse
template instructions configuration; nested exception is
java.lang.NullPointerException
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1302)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:463)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:404)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:375)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:263)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:170)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:260)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:184)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:430)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
        at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:254)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:198)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:829)
        at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:718)
        at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at
org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.BeanCreationException:
unable to parse template instructions configuration; nested exception is
java.lang.NullPointerException
        at
org.apache.cocoon.template.script.DefaultInstructionFactory.initialize(DefaultInstructionFactory.java:139)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1378)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1339)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1299)
        ... 31 more
Caused by: java.lang.NullPointerException
        at
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:117)
        at
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:183)
        at
org.apache.cocoon.template.script.DefaultInstructionFactory.initialize(DefaultInstructionFactory.java:131)
        ... 38 more

Any ideas ?
Thanks,
Fabrizio

Mime
View raw message