Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Larks
    • Fix Version/s: 1.2 Larks
    • Labels:
      None
    • Environment:

      PROD

    • Sprint:
      Larks 1.1, Larks 1.2

      Description

      We don't need these exceptions appearing in logs:

      012-12-13 20:08:13,979 [WARN ][http-8080-29    ][                 org.jtalks.jcommune] - Handler execution resulted in exception
      org.jtalks.jcommune.service.exceptions.NotFoundException: Entity with id: 175794 not found
              at org.jtalks.jcommune.service.transactional.AbstractTransactionalEntityService.get(AbstractTransactionalEntityService.java:62)
              at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
              at $Proxy57.get(Unknown Source)
              at org.jtalks.jcommune.web.controller.PostController.redirectToPageWithPost(PostController.java:234)
              at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
              at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
              at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
              at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
              at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
              at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
              at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

      They pollute the log and distract from real problems.

      It is expected to see a single line with INFO level:

      Entity [Topic] with id: 175794 not found

        Attachments

          Activity

          Hide
          ctapobep Stanislav Bashkyrtsev added a comment -

          Mm.. why do you need PowerMock? You don't need to mock private/statick methods.

          Show
          ctapobep Stanislav Bashkyrtsev added a comment - Mm.. why do you need PowerMock? You don't need to mock private/statick methods.
          Hide
          christoph Vitaliy Kravchenko added a comment -

          For mocking Logger factory

          Show
          christoph Vitaliy Kravchenko added a comment - For mocking Logger factory
          Hide
          ctapobep Stanislav Bashkyrtsev added a comment -

          No-no, you don't need that. What you need is to set the logger itself. LoggerFactory will be setting the Logger at the beginning, and afterwards you can change that logger to new, mocked one.

          Show
          ctapobep Stanislav Bashkyrtsev added a comment - No-no, you don't need that. What you need is to set the logger itself. LoggerFactory will be setting the Logger at the beginning, and afterwards you can change that logger to new, mocked one.
          Hide
          ctapobep Stanislav Bashkyrtsev added a comment -

          @QA: in order to test this issue, try to enter topics/12343214 or users/12341234 or any entity whose ID is not in our DB.

          Show
          ctapobep Stanislav Bashkyrtsev added a comment - @QA: in order to test this issue, try to enter topics/12343214 or users/12341234 or any entity whose ID is not in our DB.
          Hide
          varro Artem R added a comment -

          Test Environment
          Firefox 17.0.1, Chrome 23.0.1271.97, Opera 12.11 Build:1661

          Test Scenario
          Steps
          Enter link to non-existing topic (for example http://uat.jtalks.org/jcommune/topics/100101 )

          Actual result - error 404 is displaying, message

          2012-12-24 20:02:37,235 [INFO ][http-8105-5     ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [Topic] with id: 100101 not found

          appears in log
          Expected result - error 404 is displaying, message

          2012-12-24 20:02:37,235 [INFO ][http-8105-5     ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [Topic] with id: 100101 not found

          appears in log

          Steps
          Enter link to profile of non-existing user (for example http://uat.jtalks.org/jcommune/users/1001001 )

          Actual result - error 404 is displaying, message

          2012-12-24 19:43:44,482 [INFO ][http-8105-1     ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [JCUser] with id: 1001001 not found

          appears in log

          Expected result - error 404 is displaying, message

           2012-12-24 19:43:44,482 [INFO ][http-8105-1     ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [JCUser] with id: 1001001 not found

          appears in log

          Test results:
          Task can be closed.

          Show
          varro Artem R added a comment - Test Environment Firefox 17.0.1, Chrome 23.0.1271.97, Opera 12.11 Build:1661 Test Scenario Steps Enter link to non-existing topic (for example http://uat.jtalks.org/jcommune/topics/100101 ) Actual result - error 404 is displaying, message 2012-12-24 20:02:37,235 [INFO ][http-8105-5 ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [Topic] with id: 100101 not found appears in log Expected result - error 404 is displaying, message 2012-12-24 20:02:37,235 [INFO ][http-8105-5 ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [Topic] with id: 100101 not found appears in log Steps Enter link to profile of non-existing user (for example http://uat.jtalks.org/jcommune/users/1001001 ) Actual result - error 404 is displaying, message 2012-12-24 19:43:44,482 [INFO ][http-8105-1 ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [JCUser] with id: 1001001 not found appears in log Expected result - error 404 is displaying, message 2012-12-24 19:43:44,482 [INFO ][http-8105-1 ][org.jtalks.jcommune.web.exception.PrettyLogExceptionResolver] - Entity [JCUser] with id: 1001001 not found appears in log Test results: Task can be closed.

            People

            • Assignee:
              varro Artem R
              Reporter:
              ctapobep Stanislav Bashkyrtsev
            • Votes:
              0 Vote for this issue
              Watchers:
              Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h
                5h

                  Structure Helper Panel