You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by albert quinn <al...@gmail.com> on 2007/11/21 20:01:49 UTC

[AXIS2 1.3] REST problem

  Hi all :

  I'm developing a web service using the POJO approach. I have a
method like this :

class TestingClass {
...
public String testing(String param1, String param2) {
	System.out.println("message");
	return param1 + " " + param2;
}
...
}

  I've coded a RPC client and it works fine. Then I've tried to call
the service using REST like this :

http://localhost:8080/axis2/services/TestingClass/testing?param1=hi&param2=all

Then it fails with this exception :


java.util.ConcurrentModificationException
	java.util.HashMap$HashIterator.nextEntry(Unknown Source)
	java.util.HashMap$KeyIterator.next(Unknown Source)
	org.apache.axis2.builder.BuilderUtil.buildsoapMessage(BuilderUtil.java:92)
	org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:100)
	org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:130)
	org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:98)
	org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest(AxisServlet.java:776)
	org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:238)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

  I've searched in the Tomcat logs but I couldn't find more info. Any
idea of what could be happening here?. Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2 1.3] REST problem

Posted by albert quinn <al...@gmail.com>.
  Hi :

  First of all, THANKS A LOT, Charitha and Keith for your help!!.

  Finally, Keith was right. I've downloaded Axis2 1.3 and I thought I
was using it, but I was really using the old Axis2 1.2. So, I've moved
to Axis2 1.3 and the problem has gone.

  Thanks again for you help!!.




2007/11/22, keith chapman <ke...@gmail.com>:
> Hi Albert,
>
> Can you make sure that you are using Axis2-1.3. A issue similar to this was
> fixed on the Axis2 trunk before the Axis2-1.3 release
> (http://issues.apache.org/jira/browse/AXIS2-2662 ).
>
> I went through your stack trace it is identical to the one given in the JIRA
> (which makes me think that you are using Axis2-1.2 and not 1.3). Also line
> 92 of BuilderUtil in the 1.3 source is a null check which confirms that your
> not using 1.3. Please download Axis2-1.3 and give a try it should work for
> you.
>
> Thanks,
> Keith.
>
>
> On Nov 22, 2007 12:31 AM, albert quinn <albertbertal@gmail.com > wrote:
> >
> >  Hi all :
> >
> >  I'm developing a web service using the POJO approach. I have a
> > method like this :
> >
> > class TestingClass {
> > ...
> > public String testing(String param1, String param2) {
> >        System.out.println("message");
> >        return param1 + " " + param2;
> > }
> > ...
> > }
> >
> >  I've coded a RPC client and it works fine. Then I've tried to call
> > the service using REST like this :
> >
> >
> http://localhost:8080/axis2/services/TestingClass/testing?param1=hi&param2=all
> >
> > Then it fails with this exception :
> >
> >
> > java.util.ConcurrentModificationException
> >        java.util.HashMap$HashIterator.nextEntry (Unknown
> Source)
> >        java.util.HashMap$KeyIterator.next(Unknown Source)
> >
> org.apache.axis2.builder.BuilderUtil.buildsoapMessage(BuilderUtil.java:92)
> >
> org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument
> (XFormURLEncodedBuilder.java:100)
> >
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:130)
> >
> org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:98)
> >
> org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest(AxisServlet.java:776)
> >
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:238)
> >        javax.servlet.http.HttpServlet.service
> (HttpServlet.java:689)
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >  I've searched in the Tomcat logs but I couldn't find more info. Any
> > idea of what could be happening here?. Thanks in advance.
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2 1.3] REST problem

Posted by keith chapman <ke...@gmail.com>.
Hi Albert,

Can you make sure that you are using Axis2-1.3. A issue similar to this was
fixed on the Axis2 trunk before the Axis2-1.3 release (
http://issues.apache.org/jira/browse/AXIS2-2662).

I went through your stack trace it is identical to the one given in the JIRA
(which makes me think that you are using Axis2-1.2 and not 1.3). Also line
92 of BuilderUtil in the 1.3 source is a null check which confirms that your
not using 1.3. Please download Axis2-1.3 and give a try it should work for
you.

Thanks,
Keith.

On Nov 22, 2007 12:31 AM, albert quinn <al...@gmail.com> wrote:

>  Hi all :
>
>  I'm developing a web service using the POJO approach. I have a
> method like this :
>
> class TestingClass {
> ...
> public String testing(String param1, String param2) {
>        System.out.println("message");
>        return param1 + " " + param2;
> }
> ...
> }
>
>  I've coded a RPC client and it works fine. Then I've tried to call
> the service using REST like this :
>
>
> http://localhost:8080/axis2/services/TestingClass/testing?param1=hi&param2=all
>
> Then it fails with this exception :
>
>
> java.util.ConcurrentModificationException
>        java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>        java.util.HashMap$KeyIterator.next(Unknown Source)
>        org.apache.axis2.builder.BuilderUtil.buildsoapMessage(
> BuilderUtil.java:92)
>        org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(
> XFormURLEncodedBuilder.java:100)
>        org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:130)
>        org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(
> RESTUtil.java:98)
>
> org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest
> (AxisServlet.java:776)
>        org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java
> :238)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>  I've searched in the Tomcat logs but I couldn't find more info. Any
> idea of what could be happening here?. Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [AXIS2 1.3] REST problem

Posted by Charitha Kankanamge <ch...@wso2.com>.
Hello Albert,

I tried to reproduce your issue with Axis2-1.3(Winxp/jdk15). However, I 
was able to invoke your service (A service impl class with more than one 
method) in RESTful manner without having any issue. Please try again in 
a fresh environment and if u can reproduce the issue in successive 
calls, report a JIRA http://issues.apache.org/jira/browse/AXIS2

regards
Charitha

albert quinn wrote:

>I've new info. If I comment all the class except the testing method,
>it works fine with REST. If I uncomment another method like this :
>
>
>class TestingClass {
>
>public MyTestingData anotherMethod(String param1, String param2,
>String param3) {
>  return new MyTestingData(param1, param2, param3);
>}
>
>public String testing(String param1, String param2) {
>       System.out.println("message");
>       return param1 + " " + param2;
>}
>
>}
>
>  Then, the REST call to the testing method fails with the exception
>on the previous post, but it works fine with the RPC client. Any
>idea?. Thanks in advance.
>
>albert
>
>
>
>
>2007/11/21, albert quinn <al...@gmail.com>:
>  
>
>> Hi all :
>>
>> I'm developing a web service using the POJO approach. I have a
>>method like this :
>>
>>class TestingClass {
>>...
>>public String testing(String param1, String param2) {
>>       System.out.println("message");
>>       return param1 + " " + param2;
>>}
>>...
>>}
>>
>> I've coded a RPC client and it works fine. Then I've tried to call
>>the service using REST like this :
>>
>>http://localhost:8080/axis2/services/TestingClass/testing?param1=hi&param2=all
>>
>>Then it fails with this exception :
>>
>>
>>java.util.ConcurrentModificationException
>>       java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>>       java.util.HashMap$KeyIterator.next(Unknown Source)
>>       org.apache.axis2.builder.BuilderUtil.buildsoapMessage(BuilderUtil.java:92)
>>       org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:100)
>>       org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:130)
>>       org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:98)
>>       org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest(AxisServlet.java:776)
>>       org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:238)
>>       javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>> I've searched in the Tomcat logs but I couldn't find more info. Any
>>idea of what could be happening here?. Thanks in advance.
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>  
>


-- 
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2 1.3] REST problem

Posted by albert quinn <al...@gmail.com>.
I've new info. If I comment all the class except the testing method,
it works fine with REST. If I uncomment another method like this :


class TestingClass {

public MyTestingData anotherMethod(String param1, String param2,
String param3) {
  return new MyTestingData(param1, param2, param3);
}

public String testing(String param1, String param2) {
       System.out.println("message");
       return param1 + " " + param2;
}

}

  Then, the REST call to the testing method fails with the exception
on the previous post, but it works fine with the RPC client. Any
idea?. Thanks in advance.

albert




2007/11/21, albert quinn <al...@gmail.com>:
>  Hi all :
>
>  I'm developing a web service using the POJO approach. I have a
> method like this :
>
> class TestingClass {
> ...
> public String testing(String param1, String param2) {
>        System.out.println("message");
>        return param1 + " " + param2;
> }
> ...
> }
>
>  I've coded a RPC client and it works fine. Then I've tried to call
> the service using REST like this :
>
> http://localhost:8080/axis2/services/TestingClass/testing?param1=hi&param2=all
>
> Then it fails with this exception :
>
>
> java.util.ConcurrentModificationException
>        java.util.HashMap$HashIterator.nextEntry(Unknown Source)
>        java.util.HashMap$KeyIterator.next(Unknown Source)
>        org.apache.axis2.builder.BuilderUtil.buildsoapMessage(BuilderUtil.java:92)
>        org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:100)
>        org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:130)
>        org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:98)
>        org.apache.axis2.transport.http.AxisServlet$ProcessRESTRequest.processURLRequest(AxisServlet.java:776)
>        org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:238)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>  I've searched in the Tomcat logs but I couldn't find more info. Any
> idea of what could be happening here?. Thanks in advance.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org