tian-zhihui / cordyssapcon

Automatically exported from code.google.com/p/cordyssapcon
Apache License 2.0
0 stars 0 forks source link

SAP Connector not starting - "PCDATA invalid Char value ...." found in LOG #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Start SAP Processor

What is the expected output? 
SAP processor should start

What do you see instead?
Failed to start 

On what BOP version?
BOP 4.1 CU6

On what SAP release?
SAP Connector 2.1.1

Please provide any additional information below.
Original Defect report :
Hi,

I just did more tests. I tried to logon to a IDES system which is configured 
with some German messages.
As to my understanding of the attached log file, the parsing of the response 
from SAP fails because we do apply en_US and the XML response from SAP contains 
German Umlauts. Could you please check this and if possible fix it for the SAP 
Connector 2.1.0 as well.

<log4j:message><![CDATA[Going to use locale en_US to render message with ID 
com.eibus.applicationconnector.sap.exception.SAPConnectorExceptionMessages.Error
ConvertingSapResponseToXml]]></log4j:message>
<log4j:locationInfo class="com.eibus.management.AlertSystem" 
method="issueAlert" file="AlertSystem.java" line="35"/>
</log4j:event>

<log4j:event logger="com.cordys.coe.exception.ServerLocalizableException" 
timestamp="1323033653326" level="DEBUG" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[Going to use locale en_US to render message with ID 
com.eibus.applicationconnector.sap.exception.SAPConnectorExceptionMessages.Error
ConvertingSapResponseToXml]]></log4j:message>
<log4j:locationInfo class="com.eibus.management.AlertSystem" 
method="issueAlert" file="AlertSystem.java" line="35"/>
</log4j:event>

<log4j:event logger="com.eibus.management.AlertSystem" 
timestamp="1323033652956" level="ERROR" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[The SOAP Processor cn=consult SAP IDES 
Connector,cn=conusult SAP R3 SG,cn=soap 
nodes,o=SAPDemo,cn=cordys,cn=bop41,o=vanenburg.com could not be 
started.]]></log4j:message>
<log4j:throwable><![CDATA[java.lang.IllegalStateException: Error starting 
processor
    at com.eibus.applicationconnector.sap.SAPMapper.open(SAPMapper.java:124)
    at com.eibus.soap.Processor.open(Processor.java:755)
    at com.eibus.soap.Processor.startProcessor(Processor.java:1050)
    at com.eibus.soap.ProcessStreamsHandler.startProcessor(ProcessStreamsHandler.java:686)
    at com.eibus.soap.ProcessStreamsHandler$StreamReader.run(ProcessStreamsHandler.java:353)
Caused by: 
com.eibus.applicationconnector.sap.exception.SAPConfigurationException: Error 
converting sap response to xml
    at com.eibus.applicationconnector.sap.config.SAPConfigurationFactory.createSAPConfiguration(SAPConfigurationFactory.java:73)
    at com.eibus.applicationconnector.sap.config.SAPConfigurationFactory.createSAPConfiguration(SAPConfigurationFactory.java:47)
    at com.eibus.applicationconnector.sap.SAPMapper.open(SAPMapper.java:119)
    ... 4 more
Caused by: com.eibus.applicationconnector.sap.exception.SAPConnectorException: 
Error converting sap response to xml
    at com.eibus.applicationconnector.sap.connection.jco.SAPJCoRequestSender.convertSAPResponseToXML(SAPJCoRequestSender.java:806)
    at com.eibus.applicationconnector.sap.connection.jco.SAPJCoRequestSender.sendRFCRequestForInternalPurpose(SAPJCoRequestSender.java:463)
    at com.eibus.applicationconnector.sap.connection.jco.MetadataSAPConnection.getAllRFCs(MetadataSAPConnection.java:297)
    at com.eibus.applicationconnector.sap.metadata.MetadataCache.reloadAllData(MetadataCache.java:265)
    at com.eibus.applicationconnector.sap.metadata.MetadataCache.<init>(MetadataCache.java:126)
    at com.eibus.applicationconnector.sap.metadata.MetadataCacheFactory.createCache(MetadataCacheFactory.java:70)
    at com.eibus.applicationconnector.sap.config.ProcessorConfig.<init>(ProcessorConfig.java:396)
    at com.eibus.applicationconnector.sap.config.SAPConfigurationFactory.createSAPConfiguration(SAPConfigurationFactory.java:69)
    ... 6 more
Caused by: com.eibus.xml.nom.XMLException: PCDATA invalid Char value 26
 at Line: 1; Col 1503374
    at com.eibus.xml.nom.Document.readFromBytes(Native Method)
    at com.eibus.xml.nom.Document.load(Document.java:353)
    at com.eibus.xml.nom.Document.load(Document.java:413)
    at com.eibus.xml.nom.Document.parseString(Document.java:544)
    at com.eibus.xml.nom.Document.parseString(Document.java:508)
    at com.eibus.applicationconnector.sap.connection.jco.SAPJCoRequestSender.convertSAPResponseToXML(SAPJCoRequestSender.java:800)
    ... 13 more
]]></log4j:throwable>

And this is part of the parsed XML response <STEXT>Ermitteln Sachkonto über 
Produktkategorie/Kontierungstyp</STEXT>

From a performance perspective, I do anyway not understand why we retrieve the 
list of RFC functions at start-up of the connector. I am however not that much 
into the jCO API to be able judge if this is mandatory or not.

Regards

Thomas Endt
Senior Solution Architect
tendt@cordys.com
www.cordys.com

T +49 711 61416 1230 • M +49 172 73 94 183

Cordys Deutschland AG, Breitscheidstr. 10, 70174 Stuttgart, Germany
Sitz und Registergericht: Stuttgart • HRB 21337
Vorsitzender des Aufsichtsrats: Wouter van Grootheest, Vorstand: Per Jonsson

CORDYS - Improving Business Operations

Original issue reported on code.google.com by srkrish...@cordys.com on 8 Dec 2011 at 12:02

GoogleCodeExporter commented 8 years ago
This issue is fixed in r51 and will be available in the next release(2.1.2)

Reference: 
http://stackoverflow.com/questions/93655/stripping-invalid-xml-characters-in-jav
a

Original comment by srkrish...@cordys.com on 8 Dec 2011 at 12:08