cancel
Showing results for 
Search instead for 
Did you mean: 

JCO_ERROR_XML_PARSER

Former Member
0 Kudos

Hello,

we have recently developed a portal application using JCo. It seems to be working fine, however 2 users (in 2000) are generating an error.

When the application is calling a function module in R/3, we get the following exception:

[code]java.lang.reflect.InvocationTargetException: com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of ''

at com.sap.mw.jco.util.XMLReaderBase.nextTag(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.nextTag(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.nextElement(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.nextStatement(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.nextElement(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.nextStatement(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.parse(Unknown Source)

at com.sap.mw.jco.util.XMLReaderBase.parse(Unknown Source)

at com.sap.mw.jco.JCO$Record.fromXML(Unknown Source)

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeExecute(Native Method)

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.execute(Unknown Source)

at com.sap.mw.jco.JCO$Client.execute(Unknown Source)

at com.sap.mw.jco.JCO$Client.execute(Unknown Source)

at com.img.polkomtel.hr.jco.FunctionJCoDocumentGetDetail.runFunction(FunctionJCoDocumentGetDetail.java:91)

at com.img.polkomtel.hr.AppraisalCard$UsingJSPDynPagePage.onShowAppraisal(AppraisalCard.java:713)

at java.lang.reflect.Method.invoke(Native Method)

at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:172)

at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:101)

at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:135)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.core.async.AsyncPortalComponentResponse.include(AsyncPortalComponentResponse.java:384)

at com.sapportals.portal.prt.core.async.AsyncPortalComponentResponse.include(AsyncPortalComponentResponse.java:338)

at com.sapportals.portal.navigation.workAreaiView.doContent(workAreaiView.java:252)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable$1$DoDispatchRequest.run(AsyncIncludeRunnable.java:363)

at java.security.AccessController.doPrivileged(Native Method)

at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable.run(AsyncIncludeRunnable.java:376)

at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:729)

at java.lang.Thread.run(Unknown Source)

May 18, 2006 10:10:32 AM Warning PRT-Async 1 ELO: APPRAISER_ID

May 18, 2006 10:10:32 AM Warning PRT-Async 1 ELO: APPRAISEE_ID 00001579

May 18, 2006 10:10:32 AM Warning PRT-Async 1 ELO: APPRAISAL ID 44479FFE701B1261E10000000A0DAB1C[/code]

the exception is generated in last line of the following code:

[code]m_Repository = JCO.createRepository("repository", client);

zmbo_appraisal_get = m_Repository.getFunctionTemplate("ZMBO_APPRAISAL_GET");

JCO.Function function = new JCO.Function(zmbo_appraisal_get);

JCO.ParameterList importList = function.getImportParameterList();

importList.setValue(selectedAppId, "APPRAISAL_ID");

MyLogger.getInstance().warning("ELO: 1");

if (goal) {

importList.setValue("X","GOAL_APP");

MyLogger.getInstance().warning("ELO: 2");

}

importList.setValue(appraiseeId,"APPRAISEE_ID");

importList.setValue(appraiserId,"APPRAISER_ID");

MyLogger.getInstance().warning("ELO: 3");

MyLogger.getInstance().warning("ELO: APPRAISAL ID " + selectedAppId);

MyLogger.getInstance().warning("ELO: APPRAISEE_ID " + appraiseeId);

MyLogger.getInstance().warning("ELO: APPRAISER_ID " + appraiserId);

client.execute(function);[/code]

When we call the the function module in directly from R/3 with given parameters, everything seems to be ok.

Any ideas? Please help.

Rav

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

It looks like the JCO is trying to convert the passed values before executing the funtion module and it fails. If it's happening only with two users and you are passing userid ( APPRAISAL_ID )as the parameter can you check whether their user id's have any special charactor or Is there any diiference in their user id from other users?

You can verify the values passed before execution either in debug mode or wrting it to the trace files.It's purely because of the data passed by those two users.

Thanks,

Abdul Raheem S

Former Member
0 Kudos

I'm getting a similar error from the XML parser. It looks like the function XMLReaderBase.parse() is raising the error saying the XML is malformed.

But I don't think this is the case. In the trace file and in the debugger, I can see the entire XML string and it looks OK.

I think the problem is that the parser is only getting part of the XML string. It is getting only the first 5652 characters (not bytes).

Is there some buffer or line length limit in the parser?

Any help is appreciated. Thanks.

--

Tim