This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Megha Singhal

Ranch Hand
+ Follow
since Feb 28, 2012
Megha likes ...
IBM DB2 Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Megha Singhal

activate to deactivate button is done through search function in jsp but the thing when i am getting result in the table format from the database the deactivate link is appended with each row so when i click on deactivate it should change to activate and correspondingly to the database the status of employee become deactivate and he or she can't log into through login page.
but the problem is how to get the row id of each row so that when i am calling javascript to change the status deactivate to activate that change has to be done in particular row only not on the all the rows because when i am clicking on deactivate , i am calling javascript function through that how should i call the controller that function should apply only on the particular row , not on all the rows.

i am doing this project through spring mvc
3 years ago
JSP
in my jsp page , functionality is their to change the status of the employee, so i want that if i click on activate it should change the link to the deactivate and when i click on deactivate it should change to activate.

how can i do that? please help
3 years ago
JSP
sorry i didn't understand your question.
how can i write following query in hql in spring-hibernate system with reference to bean


following are my beans


but i don't want that cached page should appear.. i want that that it should not allow me to go back and when i click on back button login page should refresh and appears again.
3 years ago
No..directly i cannot access welcome page directly..
3 years ago
in my controller class i have mentioned like this so it is redirecting me to the login page , when i am clicking on logout
3 years ago
spring-security.xml



yes i can see the login page on logout but when i am clicking on back button i can see my welcome page
3 years ago
i want to apply spring security on logout so that it won't maintain session if i click on the back button of the browser, that i don't want to do with history, i have to use spring security.
In the following way i applied in my xml file


and my jsp page is



but still when i am clicking back button after logging out it is showing my welcome page.
i want to end the session.
can anyone suggest me the way to end the session using spring security
3 years ago
its working now.. i created another project and replace all the jars with new version...
3 years ago

Prasad Krishnegowda wrote:Can you tell us what you did after you got the previous exception? Did you add any extra Spring security Jars?



i didn't add extra jars .. i just replaced the version of jars like previously i was using spring 3.0 and i read somewhere that for hibernate 4.0 compatibility i need atleast version above 3.1 so i just do that.

now i am facing this new exception
3 years ago
now following exception is coming on the web page


HTTP Status 500 - Filter execution threw an exception

type Exception report

message Filter execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Filter execution threw an exception

root cause

java.lang.NoSuchMethodError: org.springframework.security.authentication.AnonymousAuthenticationToken.<init>(Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.createAuthentication(AnonymousAuthenticationFilter.java:97)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:64)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)

3 years ago
still same problem
3 years ago
error is still same 404 and on console following is coming


org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot create inner bean '(inner bean)' of type [org.springframework.beans.factory.config.MethodInvokingFactoryBean] while setting bean property 'eraseCredentialsAfterAuthentication'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Invocation of init method failed; nested exception is java.lang.NoSuchMethodException: org.springframework.security.authentication.ProviderManager.isEraseCredentialsAfterAuthentication()
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1308)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:562)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:871)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:196)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Invocation of init method failed; nested exception is java.lang.NoSuchMethodException: org.springframework.security.authentication.ProviderManager.isEraseCredentialsAfterAuthentication()
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1403)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
... 24 more
Caused by: java.lang.NoSuchMethodException: org.springframework.security.authentication.ProviderManager.isEraseCredentialsAfterAuthentication()

3 years ago
following are names of jar files
  • jar

    /SpringSecurity/WebContent/WEB-INF/lib/activation-1.0.2.jar
    /SpringSecurity/WebContent/WEB-INF/lib/antlr-2.7.6.jar
    /SpringSecurity/WebContent/WEB-INF/lib/aopalliance-1.0.jar
    /SpringSecurity/WebContent/WEB-INF/lib/asm-1.5.3.jar
    /SpringSecurity/WebContent/WEB-INF/lib/asm-attrs-1.5.3.jar
    /SpringSecurity/WebContent/WEB-INF/lib/cglib-2.1_3.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-beanutils-1.7.0.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-collections-2.1.1.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-digester-1.8.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-email-1.0.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-fileupload-1.1.1.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-io-1.1.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-lang-2.5.jar
    /SpringSecurity/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar
    /SpringSecurity/WebContent/WEB-INF/lib/hibernate-commons-annotations-4.0.2.Final.jar
    /SpringSecurity/WebContent/WEB-INF/lib/hibernate-core-4.2.15.Final.jar
    /SpringSecurity/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar
    /SpringSecurity/WebContent/WEB-INF/lib/jstl-1.2.jar
    /SpringSecurity/WebContent/WEB-INF/lib/mysql-connector-java-5.1.6.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-aop-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-asm-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-beans-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-context-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-core-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-expression-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-jdbc-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-orm-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-acl-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-aspects-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-cas-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-config-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-core-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-crypto-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-ldap-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-openid-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-remoting-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-taglibs-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-security-web-3.1.3.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-tx-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-web-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/spring-webmvc-3.0.1.RELEASE.jar
    /SpringSecurity/WebContent/WEB-INF/lib/stax-api-1.0-2.jar
    /SpringSecurity/WebContent/WEB-INF/lib/validation-api-1.0.0.GA.jar
  • 3 years ago