Wednesday, February 19, 2014

Abnormal behaviour of DT Container

This topic is about the "Abnormal Behaviour of DataTransformation Container". Most of us will not notice while creating a Data Transformation Container we will select the CoBOC Container which will be generally from system organization. If we stop here and think a bit about why this has to be done then we will know what happens when CoBOC doesn't respond to DT Container.

All the data transformations what we develop as a part of any project will be stored as xslts data maps in cordys database (Platform database). These can be viewed from CoBOC Browser. Sample is shown below



So in this way any DT Container will be connected to CoBOC container. Now in a general practice whenever we generate a Data transformation (transforming the XML from source format to target format) service there are two types of scenarios what every one will expect,
  •   The Service will respond with a proper output mentioned according to the xslt defined in the data transformation : This is a proper success scenario, if the mapping is not according to what you have defined then it will be a problem in the xslt you have written in the data transformation.
  • The service might give a soap fault (due to various reasons) : This is an exception scenario
Now there is a third scenario which we might not generally encountered in a normal scenario (Empty Response for any DT in the entire organization). This is where your application will go for a toss. 

By understanding the DT what a general developer will do is, he/she will trigger the DT service and will not check if it is giving any functional exception (Empty Response without any data) and the process will be progressed further. This will be a very big problem when you deal with third scenario discussed above.

This is a potential issue. This won't be solved by restarting the DT container

Reason :

As told before that a DT will be connected to Coboc to retrieve the xslt template and perform the transformation, now in the third case it will not fetch any data as there is a problem in connecting to COBOC (loss of link between coboc and DT). So one has to restart the COBOC in-order to recreate the link lost. Not sure when this type of scenario occurs.

Resolution :

Restart the COBOC container and then restart the DT to make sure the DT is connected properly with COBOC.

Best Practice :

Whenever a person uses the data transformation service in the application, I would suggest to validate the response once the DT layers responds.

Logs found :

<log4j:event logger="com.eibus.management.ManagedComponent" timestamp="1392701892262" level="INFO" thread="main">
<log4j:message><![CDATA[JMX address: service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/cordys/bfointegrations%23bfo_data_transformation_service_group%23bfo_data_transformation_service-node1]]></log4j:message>
<log4j:MDC><![CDATA[host=QCEWBIP01 processid=8292]]></log4j:MDC>
<log4j:locationInfo class="com.eibus.management.ManagedComponent" method="createJMXProtocolConnectors" file="ManagedComponent.java" line="1260"/>
</log4j:event>

The above error indicates that at time : 1392701892262, the service container group  bfo_data_transformation_service_group got restarted.

<log4j:event logger="com.eibus.applicationconnector.sql.XQYLogger" timestamp="1392701894177" level="ERROR" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[Error occurred while connecting to the database server. java.sql.SQLException: Got minus one from a read call]]></log4j:message>
<log4j:MDC><![CDATA[host=QCEWBIP01 processid=8292]]></log4j:MDC>
<log4j:locationInfo class="com.eibus.applicationconnector.sql.XQYLogger" method="error" file="XQYLogger.java" line="43"/>
</log4j:event>

The above error indicates that after restarting the data transformation container it will try to connect to cordys platform database during which it causes this issue. This won't throw any exception instead logs the exception in the file system. At this step the COBOC container is able to get started but won't be able to connect to database of cordys (for COBOC) which is why in this case all the DT services will give an empty response.

<log4j:event logger="com.eibus.applicationconnector.sql.XQYLogger" timestamp="1392701894200" level="FATAL" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[xqySetDso failed]]></log4j:message>
<log4j:MDC><![CDATA[host=QCEWBIP01 processid=8292]]></log4j:MDC>
<log4j:locationInfo class="com.eibus.applicationconnector.sql.XQYLogger" method="fatal" file="XQYLogger.java" line="31"/>
</log4j:event>

<log4j:event logger="com.eibus.applicationconnector.sql.XQYLogger" timestamp="1392701894200" level="FATAL" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[
<error
TYPE="Enumeration">
<elem>Error occurred while connecting to the database server. java.sql.SQLException: Got minus one from a read call</elem>
</error>
]]></log4j:message>
<log4j:MDC><![CDATA[host=QCEWBIP01 processid=8292]]></log4j:MDC>
<log4j:locationInfo class="com.eibus.applicationconnector.sql.XQYLogger" method="fatal" file="XQYLogger.java" line="35"/>
</log4j:event>

<log4j:event logger="com.cordys.cpc.transformation.TransformationHandler" timestamp="1392701894201" level="FATAL" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[Failed to initialize CacheHandlerFailed to create dso:

<error
TYPE="Enumeration">
<elem>Error occurred while connecting to the database server. java.sql.SQLException: Got minus one from a read call</elem>
<cordys:LocalizableMessage
xmlns:cordys="http://schemas.cordys.com/General/1.0/">
<cordys:MessageCode>Cordys.Database.Native.Messages.dbConnectionError</cordys:MessageCode>
<cordys:Insertion>java.sql.SQLException: Got minus one from a read call</cordys:Insertion>
</cordys:LocalizableMessage>
</error>
(-1)]]></log4j:message>
<log4j:MDC><![CDATA[host=QCEWBIP01 processid=8292]]></log4j:MDC>
<log4j:locationInfo class="com.cordys.cpc.transformation.TransformationHandler" method="&lt;init&gt;" file="TransformationHandler.java" line="43"/>
</log4j:event>

No comments:

Post a Comment