Spring Security
  1. Spring Security
  2. SEC-1189

HttpSessionEventPublisher refectoring side effect?

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 3.0.0 M1
    • Fix Version/s: 3.0.0 M2
    • Component/s: Web
    • Labels:
      None

      Description

      When I use Spirng Security 2.0.4, I configure web.xml like this:

      <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>

      I upgrade Spring Security 2.0.4 > 3.0.0.M1 then error ocurred.

      java.lang.ClassNotFoundException: org.springframework.security.ui.session.HttpSessionEventPublisher

      So, I change listener class like this:

      <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>

      At this time, another error ocurred.

      2009-06-26 11:34:57,806 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_sessionRegistry': Initialization of bean failed; nested exception is java.lang.reflect.MalformedParameterizedTypeException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:308)
      at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:947)
      at org.springframework.context.support.AbstractApplicationContext.registerListeners(AbstractApplicationContext.java:701)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:377)
      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
      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:4342)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
      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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.reflect.MalformedParameterizedTypeException
      at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:42)
      at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:35)
      at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:77)
      at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:86)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:122)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      at sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:82)
      at java.lang.Class.getGenericInterfaces(Class.java:794)
      at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredInterfaces(Java15ReflectionBasedReferenceTypeDelegate.java:125)
      at org.aspectj.weaver.ReferenceType.getDeclaredInterfaces(ReferenceType.java:569)
      at org.aspectj.weaver.ResolvedType.getDirectSupertypes(ResolvedType.java:66)
      at org.aspectj.weaver.JoinPointSignatureIterator.findSignaturesFromSupertypes(JoinPointSignatureIterator.java:183)
      at org.aspectj.weaver.JoinPointSignatureIterator.hasNext(JoinPointSignatureIterator.java:74)
      at org.aspectj.weaver.patterns.SignaturePattern.matches(SignaturePattern.java:291)
      at org.aspectj.weaver.patterns.KindedPointcut.matchInternal(KindedPointcut.java:106)
      at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.getShadowMatch(PointcutExpressionImpl.java:235)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:101)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92)
      at org.springframework.security.config.ProtectPointcutPostProcessor.attemptMatch(ProtectPointcutPostProcessor.java:109)
      at org.springframework.security.config.ProtectPointcutPostProcessor.postProcessBeforeInitialization(ProtectPointcutPostProcessor.java:97)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
      ... 30 more

      Do I need change configuration anything else?

        Activity

        Hide
        Luke Taylor added a comment -

        Please make sure you are using Spring 3.0.0.M2 and supply a test case which replicates the issue.

        Show
        Luke Taylor added a comment - Please make sure you are using Spring 3.0.0.M2 and supply a test case which replicates the issue.
        Hide
        Shin Sang Jae added a comment -

        You are right.
        I used Spring 2.5.6, after change Spring 3.0.0.M3 it works.

        Show
        Shin Sang Jae added a comment - You are right. I used Spring 2.5.6, after change Spring 3.0.0.M3 it works.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Shin Sang Jae
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: