Azure-Samples / ms-identity-java-webapp

A Java web application calling Microsoft graph that is secured using the Microsoft identity platform
MIT License
118 stars 105 forks source link

Error: One or more Filters failed to start #25

Closed ravindra12jan closed 3 years ago

ravindra12jan commented 4 years ago

I have followed the instruction but tomcat is giving below error while startup -

03-Feb-2020 14:35:11.967 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file 03-Feb-2020 14:35:11.967 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/msal4jsample] startup failed due to previous errors

What could be the reason?

johnbyers commented 4 years ago

I had the same issue. The localhost log shows: java.lang.AbstractMethodError: Receiver class com.microsoft.azure.msalwebsample.AuthFilter does not define or inherit an implementation of the resolved method abstract init(Ljavax/servlet/FilterConfig;)V of interface javax.servlet.Filter.

You need to add this code to the top of AuthFilter: @Override public void init(FilterConfig filterConfig) throws ServletException { } I am wondering how this was missed and why others aren't having the same issue.

sangonzal commented 3 years ago

@ravindra12jan @johnbyers I'm not able to reproduce this issue.

Avery-Dunn commented 3 years ago

Closing due to lack of activity and inability to reproduce. If there are still any issues, feel free to re-open or leave a comment.

dvanderl commented 3 years ago

I am getting this issue after packaging with Maven and deploying to Tomcat. Adding the line of code below resolved my issue.

@Override public void init(FilterConfig filterConfig) throws ServletException { }

cricketsamya commented 2 years ago

Worked for me too @dvanderl ! Thanks for the tip!