[
https://issues.apache.org/jira/browse/ACE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506466#comment-13506466
]
Tuomas Kiviaho commented on ACE-307:
------------------------------------
The following patch cures at least the symptom so that it is more obvious what
went wrong
Index: src/org/apache/ace/deployment/servlet/DeploymentServlet.java
===================================================================
--- src/org/apache/ace/deployment/servlet/DeploymentServlet.java
(revision 1407371)
+++ src/org/apache/ace/deployment/servlet/DeploymentServlet.java
(working copy)
@@ -211,8 +211,11 @@
output.write(buffer, 0, bytesRead);
}
}
+ catch (IllegalArgumentException e) {
+ throw (AceRestException) new
AceRestException(HttpServletResponse.SC_BAD_REQUEST, "Request URI is
invalid").initCause(e);
+ }
catch (IOException e) {
- throw new AceRestException(HttpServletResponse.SC_BAD_REQUEST,
"Request URI is invalid");
+ throw (AceRestException) new
AceRestException(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Could not
deliver package").initCause(e);
}
finally {
tryClose(output);
> Misleading error when deployment fails due to OBR directory being out-of-sync
> -----------------------------------------------------------------------------
>
> Key: ACE-307
> URL: https://issues.apache.org/jira/browse/ACE-307
> Project: ACE
> Issue Type: Bug
> Reporter: Tuomas Kiviaho
>
> I was getting a mysterious error when I manipulated store directory makes up
> the OBR
> {{noformat}}
> ERROR - Bundle: org.apache.ace.deployment.task - Error accessing resources -
> java.io.IOException: Server returned HTTP response code: 400 for URL:
> http://localhost:8082/deployment/org.example/versions/1.0.0
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
> at
> org.apache.ace.deployment.service.impl.DeploymentServiceImpl.getContents(DeploymentServiceImpl.java:298)
> at
> org.apache.ace.deployment.service.impl.DeploymentServiceImpl.installVersion(DeploymentServiceImpl.java:114)
> at
> org.apache.ace.deployment.task.DeploymentUpdateTask.run(DeploymentUpdateTask.java:57)
> at org.apache.ace.scheduler.Executer.run(Executer.java:92)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> {{noformat}}
> I had to plugin the debugger to figure this one out because the error code
> was a bit misleading (should have been 500). I managed to figure out that
> RepositoryBasedProvider was serving outdated urls to StreamGenerator which in
> turn gave out FileNotFounldException. Then the DeploymentServlet replaced the
> original exception without passing forward the original cause.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira