Return-Path: X-Original-To: apmail-ace-commits-archive@www.apache.org Delivered-To: apmail-ace-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE16010791 for ; Thu, 6 Mar 2014 08:30:49 +0000 (UTC) Received: (qmail 75517 invoked by uid 500); 6 Mar 2014 08:30:47 -0000 Delivered-To: apmail-ace-commits-archive@ace.apache.org Received: (qmail 75324 invoked by uid 500); 6 Mar 2014 08:30:45 -0000 Mailing-List: contact commits-help@ace.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ace.apache.org Delivered-To: mailing list commits@ace.apache.org Received: (qmail 75287 invoked by uid 99); 6 Mar 2014 08:30:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2014 08:30:43 +0000 Date: Thu, 6 Mar 2014 08:30:43 +0000 (UTC) From: "Marcel Offermans (JIRA)" To: commits@ace.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ACE-458) improve logging when adding entity to workspace failed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACE-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcel Offermans resolved ACE-458. ---------------------------------- Resolution: Fixed Applied the patch, thanks for your contribution, Arjan! > improve logging when adding entity to workspace failed > ------------------------------------------------------ > > Key: ACE-458 > URL: https://issues.apache.org/jira/browse/ACE-458 > Project: ACE > Issue Type: Improvement > Reporter: Arjan Schaaf > Assignee: Marcel Offermans > Priority: Minor > Attachments: ACE-458.patch > > > 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: > {code} > 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) > {code} > I have created a patch that logs the data describing the entity that caused the failure. -- This message was sent by Atlassian JIRA (v6.2#6252)