Uploaded image for project: 'ACE'
  1. ACE
  2. ACE-458

improve logging when adding entity to workspace failed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.1
    • None
    • None

    Description

      I tried to add a target with the same ID through the REST interface twice. Of course this fails at the second attempt. The log shows an error message without any data to identify which entity failed to be added and the attached stacktrace doesn't help either:

      2014.02.15 04:04:04 WARNING - Bundle: org.apache.ace.client.rest - Failed to add entity of type: target - java.lang.IllegalArgumentException: Failed to add new object: entity already exists!
              at org.apache.ace.client.repository.impl.ObjectRepositoryImpl.create(ObjectRepositoryImpl.java:93)
              at org.apache.ace.client.repository.stateful.impl.StatefulTargetRepositoryImpl.preregister(StatefulTargetRepositoryImpl.java:136)
              at org.apache.ace.client.rest.Workspace.addRepositoryObject(Workspace.java:213)
              at org.apache.ace.client.rest.RESTClientServlet.createRepositoryObject(RESTClientServlet.java:429)
              at org.apache.ace.client.rest.RESTClientServlet.doPost(RESTClientServlet.java:370)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
              at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
              at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
              at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
              at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
              at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
              at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
              at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:654)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
              at org.eclipse.jetty.server.Server.handle(Server.java:369)
              at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
              at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944)
              at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005)
              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
              at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
              at java.lang.Thread.run(Thread.java:744)
      

      I have created a patch that logs the data describing the entity that caused the failure.

      Attachments

        1. ACE-458.patch
          2 kB
          Arjan Schaaf

        Activity

          People

            marrs Marcel Offermans
            arjans Arjan Schaaf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: