You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by miliev <mi...@vmware.com> on 2011/03/21 13:23:00 UTC
java.lang.StringIndexOutOfBoundsException: String index out of
range
I've got the following exception when trying to process REST requests
2011-03-21 14:06:17,989 | ERROR | 1189263173@pool-jetty-17 |
JaxRsDispatcherServlet | Unexpected runtime exception from
CxfServlet while processing the requst: String index out of range: -14 |
java.lang.StringIndexOutOfBoundsException: String index out of range: -14
at java.lang.String.substring(String.java:1937)
at
org.apache.cxf.transport.servlet.AbstractServletController.getBaseURL(AbstractServletController.java:112)
at
org.apache.cxf.transport.servlet.ServletController.updateDests(ServletController.java:83)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:145)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
The problem seems to be into getBaseURL method. Is it a known issue ?
Thanks!
--
View this message in context: http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4225629.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: java.lang.StringIndexOutOfBoundsException: String index out of range
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Here it is:
http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/
Thanks, Sergey
On Fri, Mar 25, 2011 at 10:13 AM, miliev <mi...@vmware.com> wrote:
> Hi Sergey,
>
> I couldn't find cxf-bundle-2.3.4-SNAPSHOT.jar. Could you provide location
> for it ?
>
> Thanks,
> Martin
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4263788.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: java.lang.StringIndexOutOfBoundsException: String index out of
range
Posted by miliev <mi...@vmware.com>.
Hi Sergey,
I couldn't find cxf-bundle-2.3.4-SNAPSHOT.jar. Could you provide location
for it ?
Thanks,
Martin
--
View this message in context: http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4263788.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: java.lang.StringIndexOutOfBoundsException: String index out of range
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Martin
Did you get a chance to verify 2.3.4-SNAPSHOT works ?
thanks, Sergey
On Mon, Mar 21, 2011 at 4:04 PM, miliev <mi...@vmware.com> wrote:
> Thanks Sergey!
>
> I'll try it.
>
> --Martin
>
> --
>
Re: java.lang.StringIndexOutOfBoundsException: String index out of
range
Posted by miliev <mi...@vmware.com>.
Thanks Sergey!
I'll try it.
--Martin
--
View this message in context: http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4232857.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: java.lang.StringIndexOutOfBoundsException: String index out of range
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On Mon, Mar 21, 2011 at 1:33 PM, miliev <mi...@vmware.com> wrote:
> Sorry for the incomplete info
> CXF is 2.3.0
>
> requestURI=/api/error/badRequest
>
> urlpattern: /api/*
>
> the contextPath is '/'
>
> First I thought it is issue with registration of my ErrorHandler but if it
> can't be found I expect an 404 to be thrown
>
> I don't recall seeing this exception before, and the contextPath/etc have
the usual values...2.3.0 has some workaround code to do with handling matrix
parameters, which has been removed recently.
Can you give me a favor please and try 2.3.4-SNAPSHOT please [1], and see if
the error persists ?
With the above values, 404 should be returned, but you might have something
specific in your environment that exposes this bug, if the problem persists
in 2.4.0-SNAPSHOT then getting the source from [1] and checking
AbstractServletController will help a lot...
Thanks, Sergey
[1]
http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/2.3.4-SNAPSHOT/
> Thanks,
> Martin
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4228192.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: java.lang.StringIndexOutOfBoundsException: String index out of
range
Posted by miliev <mi...@vmware.com>.
Sorry for the incomplete info
CXF is 2.3.0
requestURI=/api/error/badRequest
urlpattern: /api/*
the contextPath is '/'
First I thought it is issue with registration of my ErrorHandler but if it
can't be found I expect an 404 to be thrown
Thanks,
Martin
--
View this message in context: http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4228192.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: java.lang.StringIndexOutOfBoundsException: String index out of range
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Is it happening with the latest snapshot code or do you use a released CXF
version ?
Can you give more info please:
- sample request URI
- context name
- CXFServlet url pattern
thanks, Sergey
On Mon, Mar 21, 2011 at 12:23 PM, miliev <mi...@vmware.com> wrote:
> I've got the following exception when trying to process REST requests
>
> 2011-03-21 14:06:17,989 | ERROR | 1189263173@pool-jetty-17 |
> JaxRsDispatcherServlet | Unexpected runtime exception from
> CxfServlet while processing the requst: String index out of range: -14 |
> java.lang.StringIndexOutOfBoundsException: String index out of range: -14
> at java.lang.String.substring(String.java:1937)
> at
>
> org.apache.cxf.transport.servlet.AbstractServletController.getBaseURL(AbstractServletController.java:112)
> at
>
> org.apache.cxf.transport.servlet.ServletController.updateDests(ServletController.java:83)
> at
>
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:145)
> at
>
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
> at
>
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
> at
>
> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
>
>
> The problem seems to be into getBaseURL method. Is it a known issue ?
> Thanks!
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/java-lang-StringIndexOutOfBoundsException-String-index-out-of-range-tp4225629p4225629.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Sergey Beryozkin
Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com