I need help with the following exception:
Exception:
this is CustomAuthListener class:Code:sep 25, 2012 4:04:30 PM com.google.apphosting.utils.jetty.JettyLogger warn Advertencia: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customAuthListener' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: Expecting a stackmap frame at branch target 158 in method com.infomedical.presmedwebaplication.security.server.auth.CustomAuthListener.onApplicationEvent(Lorg/springframework/security/authentication/event/AbstractAuthenticationEvent;)V at offset 113: java.lang.VerifyError: Expecting a stackmap frame at branch target 158 in method com.infomedical.presmedwebaplication.security.server.auth.CustomAuthListener.onApplicationEvent(Lorg/springframework/security/authentication/event/AbstractAuthenticationEvent;)V at offset 113 at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404) at java.lang.Class.getConstructor0(Class.java:2714) at java.lang.Class.getDeclaredConstructor(Class.java:2002)
And this is de applicationContext.xmlCode:package com.infomedical.presmedwebaplication.security.server.auth; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationListener; import org.springframework.security.authentication.event.AbstractAuthenticationEvent; import org.springframework.security.authentication.event.AbstractAuthenticationFailureEvent; public class CustomAuthListener implements ApplicationListener<AbstractAuthenticationEvent> { private static final Log logger = LogFactory.getLog(CustomAuthListener.class); @Override public void onApplicationEvent(AbstractAuthenticationEvent event) { StringBuilder builder = new StringBuilder(); builder.append("Authentication event "); builder.append(event.getClass().getSimpleName()); builder.append(": "); builder.append(event.getAuthentication().getName()); builder.append("; details: "); builder.append(event.getAuthentication().getDetails()); if (event instanceof AbstractAuthenticationFailureEvent) { builder.append("; exception: "); builder.append(((AbstractAuthenticationFailureEvent) event).getException().getMessage()); } logger.warn(builder.toString()); } }
Code:<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd"> <beans:bean id="customAuthListener" class="com.infomedical.presmedwebaplication.security.server.auth.CustomAuthListener"/> <http auto-config="true"> <intercept-url pattern="/infomedical/**" access="ROLE_USER"/> <intercept-url pattern="/presmedwebaplication/**" access="ROLE_USER"/> <intercept-url pattern="/**/*.html" access="ROLE_USER"/> <intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" /> </http> <beans:bean id="customAuthenticationProvider" class="com.infomedical.presmedwebaplication.security.server.auth.CustomAuthenticationProvider" /> <authentication-manager alias="authenticationManager"> <authentication-provider ref="customAuthenticationProvider"/> </authentication-manager> </beans:beans>


Reply With Quote