title: javax.servlet.ServletException: Filter execution threw an exception in spring boot
body: <p>When I implement the hashCode() method in Entity classes, I get the following error. What 's that ?</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: Filter execution threw an exception
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
      at
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at
    org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:130)
      at
    org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
      at
    org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:105)
      at
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at
    org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:123)
      at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
      at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      at
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
      at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      at
    org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
      at
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
      at
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
      at
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748) Caused by:
    java.lang.StackOverflowError  at
    org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:116)
      at com.sun.proxy.$Proxy2212.executeQuery(Unknown Source)    at
    org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:70)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getResultSet(AbstractLoadPlanBasedLoader.java:434)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeQueryStatement(AbstractLoadPlanBasedLoader.java:186)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:121)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86)
      at
    org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:88)
      at
    org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688)
      at
    org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
      at
    org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1991)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:570)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:252)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:566)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:135)
      at
    org.hibernate.collection.internal.PersistentSet.hashCode(PersistentSet.java:430)
      at java.util.Arrays.hashCode(Arrays.java:4146)  at
    java.util.Objects.hash(Objects.java:128)  at
    net.fis.fava.model.Group.hashCode(Group.java:115)     at
    java.util.HashMap.hash(HashMap.java:339)  at
    java.util.HashMap.put(HashMap.java:612)   at
    java.util.HashSet.add(HashSet.java:220)   at
    java.util.AbstractCollection.addAll(AbstractCollection.java:344)  at
    org.hibernate.collection.internal.PersistentSet.endRead(PersistentSet.java:327)
      at
    org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:234)
      at
    org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:221)
      at
    org.hibernate.engine.loading.internal.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:194)
      at
    org.hibernate.loader.plan.exec.process.internal.CollectionReferenceInitializerImpl.endLoading(CollectionReferenceInitializerImpl.java:154)
      at
    org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishLoadingCollections(AbstractRowReader.java:249)
      at
    org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:212)
      at
    org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:133)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:122)
      at
    org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86)
      at
    org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:88)
      at
    org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688)
      at
    org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
      at
    org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:1991)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:570)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:252)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:566)
      at
    org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:135)
      at
    org.hibernate.collection.internal.PersistentSet.hashCode(PersistentSet.java:430)
      at java.util.Arrays.hashCode(Arrays.java:4146)  at
    java.util.Objects.hash(Objects.java:128)  at
    net.fis.model.Activity.hashCode(Activity.java:146)    at
    java.util.HashMap.hash(HashMap.java:339)  at
    java.util.HashMap.put(HashMap.java:612)   at
    java.util.HashSet.add(HashSet.java:220) . . . . .</p>
  </blockquote>