You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by "Tuomas Kiviaho (JIRA)" <ji...@apache.org> on 2012/11/29 14:12:59 UTC

[jira] [Created] (ACE-307) Misleading error when deployment fails due to OBR directory being out-of-sync

Tuomas Kiviaho created ACE-307:
----------------------------------

             Summary: 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

[jira] [Resolved] (ACE-307) Misleading error when deployment fails due to OBR directory being out-of-sync

Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ACE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Offermans resolved ACE-307.
----------------------------------

    Resolution: Fixed

Applied the patch.
                
> 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
>            Assignee: Marcel Offermans
>
> 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

[jira] [Commented] (ACE-307) Misleading error when deployment fails due to OBR directory being out-of-sync

Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ACE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509664#comment-13509664 ] 

Marcel Offermans commented on ACE-307:
--------------------------------------

Thanks for this patch, I agree this makes the exception a lot clearer.
                
> 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
>            Assignee: Marcel Offermans
>
> 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

[jira] [Commented] (ACE-307) Misleading error when deployment fails due to OBR directory being out-of-sync

Posted by "Tuomas Kiviaho (JIRA)" <ji...@apache.org>.
    [ 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

[jira] [Assigned] (ACE-307) Misleading error when deployment fails due to OBR directory being out-of-sync

Posted by "Marcel Offermans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ACE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Offermans reassigned ACE-307:
------------------------------------

    Assignee: Marcel Offermans
    
> 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
>            Assignee: Marcel Offermans
>
> 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