Hi,

This issue is resolved. The <WEBOBJECT name="JSONRPCAdd"> </ WEBOBJECT> was existing in AjaxUpdateContainer, once I moved out this from the update area then the error got resolved. It looks like if this is in the ajax update area then everytime the url script is getting added everytime in the rpc response and response string is getting index out of range exception.

Thanks,
Raghavender.

On 14-Dec-09, at 8:15 PM, Raghavender wrote:

Hi,

I am working on WebObjects application, using AjaxUpdateContainer, AjaxSubmitButton and AjaxProxy components(ProjectWonder).

I have used AjaxProxy component to handle the Java and Javascript communication. This is working fine, but after around 20 plus Ajax request/responses I am getting the following exception consistently:

Following is the code snippet and the exception attached. Any help would be appreciated. -----------------------------------------------------HTML Javascript function -----------------------------------------------------------------------------------------
function showFrameset(){
var a=jason.wopage.test();
....
}
-----------------------------------------------------WOD Bindings -----------------------------------------------------------------------------------------
JSONRPCAdd: AjaxProxy {
        name = "jason";
        proxyName = "wopage";
}
-----------------------------------------------------HTML code -----------------------------------------------------------------------------------------
<webobject name="JSONRPCAdd"></webobject>
-----------------------------------------------------Java code -----------------------------------------------------------------------------------------
public String test(){
        //Based on some condition
        return "true";
        else
        return "false";
}
----------------------------------------------------------------------------------------------------------------------------------------------EXCEPTION -------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------
2990427 [WorkerThread8] WARN NSLog - <er.ajax.AjaxRequestHandler>: Exception occurred while handling request: java.lang.StringIndexOutOfBoundsException: String index out of range: 3321 [2009-12-14 12:53:17 IST] <WorkerThread8> java.lang.StringIndexOutOfBoundsException: String index out of range: 3321
        at java.lang.String.substring(String.java:1765)
at er .extensions .foundation.ERXStringUtilities.insertString(ERXStringUtilities.java: 1937) at er .extensions .appserver .ERXResponseRewriter .insertInResponseBeforeTag(ERXResponseRewriter.java:328) at er .extensions .appserver .ERXResponseRewriter .insertInResponseBeforeHead(ERXResponseRewriter.java:250) at er .extensions .appserver .ERXResponseRewriter.addScriptCodeInHead(ERXResponseRewriter.java:484) at er .extensions .appserver .ERXResponseRewriter.addScriptCodeInHead(ERXResponseRewriter.java:467)
        at er.ajax.AjaxUtils.addScriptCodeInHead(AjaxUtils.java:178)
        at er.ajax.AjaxProxy.addRequiredWebResources(AjaxProxy.java:127)
        at er.ajax.AjaxComponent.appendToResponse(AjaxComponent.java:136)
at com .webobjects .appserver ._private .WOComponentReference.appendToResponse(WOComponentReference.java:135) at com .webobjects .appserver ._private .WODynamicGroup.appendChildrenToResponse(WODynamicGroup.java:126) at er.ajax.AjaxUpdateContainer.handleRequest(AjaxUpdateContainer.java: 238) at er.ajax.AjaxDynamicElement.invokeAction(AjaxDynamicElement.java: 87) at er.ajax.AjaxUpdateContainer.invokeAction(AjaxUpdateContainer.java:63) at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115) at er .extensions .components._private.ERXWOForm.invokeAction(ERXWOForm.java:180) at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115) at com .webobjects .appserver ._private .WOHTMLURLValuedElement.invokeAction(WOHTMLURLValuedElement.java:149) at com .webobjects .appserver ._private.WODynamicGroup.invokeChildrenAction(WODynamicGroup.java:105) at com .webobjects .appserver._private.WODynamicGroup.invokeAction(WODynamicGroup.java: 115) at com.webobjects.appserver.WOComponent.invokeAction(WOComponent.java: 1079) at er.extensions.components.ERXComponent.invokeAction(ERXComponent.java: 92) at com.webobjects.appserver.WOSession.invokeAction(WOSession.java: 1357)
        at Session.invokeAction(Session.java:177)
at com .webobjects.appserver.WOApplication.invokeAction(WOApplication.java: 1745) at er .extensions .appserver .ajax.ERXAjaxApplication.invokeAction(ERXAjaxApplication.java:50) at er .extensions .appserver.ERXApplication.invokeAction(ERXApplication.java:1687)
        at er.ajax.AjaxResponse.generateResponse(AjaxResponse.java:73)
at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedPage(WOComponentRequestHandler.java:229) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedSession(WOComponentRequestHandler.java:298) at com .webobjects .appserver ._private .WOComponentRequestHandler ._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332) at com .webobjects .appserver ._private .WOComponentRequestHandler ._handleRequest(WOComponentRequestHandler.java:369) at com .webobjects .appserver ._private .WOComponentRequestHandler .handleRequest(WOComponentRequestHandler.java:442) at er.ajax.AjaxRequestHandler.handleRequest(AjaxRequestHandler.java: 17) at com .webobjects .appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er .extensions .appserver .ERXApplication.dispatchRequestImmediately(ERXApplication.java:1802) at er .extensions .appserver.ERXApplication.dispatchRequest(ERXApplication.java:1767)
        at Application.dispatchRequest(Application.java:720)
at com .webobjects .appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com .webobjects .appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
        at java.lang.Thread.run(Thread.java:613)
-------------------------------------------------------------------------------------------------------------------------------------------------

Regards,
Raghavender.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to