You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Gregor Zurowski (JIRA)" <ji...@apache.org> on 2014/06/05 03:29:01 UTC

[jira] [Comment Edited] (SM-2314) Trying to get person with unknown end with error in camel-cxf-rest example

    [ https://issues.apache.org/jira/browse/SM-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14017339#comment-14017339 ] 

Gregor Zurowski edited comment on SM-2314 at 6/5/14 1:27 AM:
-------------------------------------------------------------

I have submitted the following pull request with a fix for this ticket: https://github.com/apache/servicemix/pull/13.

A patch file is available at the following URL: https://github.com/apache/servicemix/pull/13.patch.


was (Author: gzurowski):
I have submitted the following pull request with a fix for this ticket: https://github.com/apache/servicemix/pull/13

> Trying to get person with unknown end with error in camel-cxf-rest example
> --------------------------------------------------------------------------
>
>                 Key: SM-2314
>                 URL: https://issues.apache.org/jira/browse/SM-2314
>             Project: ServiceMix
>          Issue Type: Task
>          Components: examples
>    Affects Versions: 5.0.2, 5.1.0, 6.0.0
>            Reporter: Krzysztof Sobkowiak
>            Assignee: Krzysztof Sobkowiak
>            Priority: Minor
>             Fix For: 5.0.2, 5.1.1, 6.0.0
>
>         Attachments: log.txt
>
>
> The example generally works (creating, deleting, getting existing person), but trying to get a person with non-existing id (e.g. 10) causes following entry in log (full stacktrace attached
> {code}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 10, Size: 1
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:635)[:1.7.0_55]
> 	at java.util.ArrayList.get(ArrayList.java:411)[:1.7.0_55]
> 	at org.apache.servicemix.examples.camel.rest.ServiceHandler.get(ServiceHandler.java:37)[158:camel-cxf-rest-route:5.1.0]
> 	at org.apache.servicemix.examples.camel.rest.ServiceHandler.getPerson(ServiceHandler.java:45)[158:camel-cxf-rest-route:5.1.0]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_55]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_55]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_55]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_55]
> {code}
> I haven't analyzed the code but the implementation of the service does not correctly handle the case when the request contains id which dos not exist.



--
This message was sent by Atlassian JIRA
(v6.2#6252)