Saturday, January 25, 2014

Load langs.xml failed

I have faced a problem whenever I start notepadd++, it pops up with an alert saying "Load langs.xml failed!". Although by closing it won't create a functional problem for anyone. People can continue with their work by clicking ok on the alert which pops up but on a long run it would be frustating. I have taken out time to understand the problem and solve it. By the error it says "langs.xml" is a file when reading created a problem, Its clearly communicative enough. So the langs.xml from where notepad++ is loading should be corrected. In windows7 it loads from the path "C:\Users\<<UserName>>\AppData\Roaming\Notepad++".

Resolution :

Replace the file from the notepad++ installable folder to the above mentioned path. Or check manually the contents of the langs.xml in Roaming\Notepad++ folder and correct it.

Thursday, January 16, 2014

Read content from XML File and write into EXCEL

package com.DH.Explorations;

import java.util.Date;

import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import com.eibus.xml.nom.Document;
import com.eibus.xml.nom.Node;
import com.eibus.xml.nom.XMLException;
import com.eibus.xml.xpath.XPath;

public class WriteExcel {

public static void main(String[] args) throws IOException, XMLException {
// TODO Auto-generated method stub
HSSFWorkbook workbook=new HSSFWorkbook();
Document doc = new Document();
int configXML=0;
configXML = doc.load("D:\\bFOIntegrations\\WorkOrderInfo.xml");
System.out.println(Node.writeToString(configXML, true));
HSSFSheet Sheet=workbook.createSheet("WorkOrderRecords") ;
int []workOrderItems = XPath.getMatchingNodes(".//WorkItemRecord", null, configXML);
for(int i=0;i<workOrderItems.length;i++)
Row row = Sheet.createRow(i);
String bFO = Node.getAttribute(XPath.getFirstMatch(".//Keys", null, workOrderItems[i]), "bFO");
String BO = Node.getAttribute(XPath.getFirstMatch(".//Keys", null, workOrderItems[i]), "BO");
String Status = Node.getDataElement(workOrderItems[i], "Status", "");
String statusMsg =Node.getDataElement(workOrderItems[i], "StatusMsg", "");
Cell cell_0 = row.createCell(0);
Cell cell_1 = row.createCell(1);
Cell cell_2 = row.createCell(2);
Cell cell_3 = row.createCell(3);
File fileDirectory;
String FilePath="D:\\temp";
fileDirectory = new File(FilePath);
FilePath=FilePath+"\\"+(new Date().getTime())+".xls";
FileOutputStream out = new FileOutputStream(new File(FilePath));

Wednesday, January 15, 2014

"Close Connection" - WsApp Container - First invocation


In my application I encountered one strange issue with the WsApp container. PFB the scenario:
  • WsApp Container is in running state from past few days. However no request has been sent to it.
  • Today, I executed a webservice to get data from the Database (Oracle 10g - JDBC thin driver)
  • Error thrown by the WsApp container "java.lang.NullPointerException" (Complete logs attached)
  • I again executed the same webservice and it was successful.
I found two statement in the logs interesting: 

[Method - getErrorFromSQLException:- Error happened is identified as Connection failure error Closed Connection]

[Method - executeQueryStatement():-  FAILED SQLException is Closed Connection]

I suspect there is some "idle" time settings in WsApp container after which the connection is closed if no request is process for that particular period. 

But my question is why it is not able to re-establish the connection for the first request??

Please guide me on this if you have encountered this kind of issue.

-- Amit Kumar DH

Cordys caches connections using Connection Pool and reuses them.

While executing a query on database, Cordys takes a connection from connection pool and processes it.

1)If a connection is killed by database, Cordys will be able to recognize the connection failure and reconnects to database and process the request.

2)But if connection is killed by firewall, Cordys will not get any exception when used it from pool so the connection will hang.

Default refresh interval rate for clearing the connections is 3600 sec.

Though firewall killed the connection, Cordys will remove the connection from the connection pool only after 3600 sec.

As the point specifies, "If you are using connection caching or connection pooling, then always set the inactivity timeout value on the connection cache to be shorter than the firewall idle timeout value",

If the firewall idle timeout value is set to 3000 sec, after that time, firewall will remove the connection from the connection pool.

And the default database connection refresh interval set at service container is 3600 sec.

So, in between this time, if any new request comes to service container, and if no connections are available, the service container will be in hanging state, which will not respond to the request.

After 3600 sec only, Cordys will remove the connection from the connection pool.

So by setting Connection Cache refresh interval to less than firewall idle timeout will prevent this situation from occuring.

We have suggested you regarding the inactivity timeout. For other points, you need to go as per Oracle suggests.

-- Cordys Support Team

Unable to publish the Project

Hi All,
      We are getting following error in cordys while publishing the project in Dev server.
Let us know if any one have idea on this issue.

Error details: 
The "UpdateSearchableAttributes" request did not process successfully because of "<update reply="no"><tuple><new><NOTIFICATION_SEARCH_COLRUNNING><SEARCH_TYPE_ID>005056A1-0084-11E1-FD73-9F4E9CB693E9</SEARCH_TYPE_ID><DATATYPE>STRING</DATATYPE><AVAILABLE_COLUMN>1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25</AVAILABLE_COLUMN></NOTIFICATION_SEARCH_COLRUNNING></new><error TYPE="Enumeration"><elem>Error :java.sql.SQLException: ORA-00001: unique constraint (CAPS2NEW.NSCR_PK) violated

at com.cordys.cws.internal.client.SoapClientBase.convertSOAPFaultToException(
at com.cordys.cws.internal.client.SoapClientBase.sendRequest(
at com.cordys.cws.internal.client.SoapClientBase.sendRequest(
at com.cordys.cws.internal.client.SoapClientBase.sendRequest(
at com.cordys.workflow.modeler.WorkflowSoapClient.execute(
at com.cordys.workflow.modeler.DeployBuildWorkFlowDeliveryModelTask.execute(
at com.cordys.cws.tasks.StudioTaskHelper.executeTask(
at com.cordys.cws.tasks.StudioTaskHelper.executeTasks(
at com.cordys.cws.tasks.StudioTaskHelper.executeTasks(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDependencyBox(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDependencyBox(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.internal.deploy.DeployEngine.deployDocument(
at com.cordys.cws.deploy.Deployer.doOperation(
at com.cordys.cws.internal.operation.OperationBase.execute(
at com.cordys.cws.internal.operation.CompositeOperation.doOperation(
at com.cordys.cws.internal.operation.OperationBase.execute(
at com.cordys.cws.internal.operation.runner.OperationRunner$AsynchronousOperationRunner$AsyncBrokerOperation.execute(

-- Harish Munaga DH
Hi All,
     I searched in the cordys db for "NOTIFICATION_SEARCH_COLRUNNING" table and i found out the record. Please check it in below
  Present cordys db details:
I don't know what to do in order to resolve this issue.If any one know this issue let us know ASAP.
-- Harish Munaga DH
Hi Amit,
No we have not changed anything in the cordys Dattabase,
We just republish the project folder by folder and then the complete project.

-- Rajneet Patel

Memory utilization in cordys

Hi All,

We are currently involved in preparing an RCA for a client to explain the saturation of memory on Cordys production server

As I understand, the total memory of the SOAP processor contains the following 

1. Heap memory
2. Non-heap memory
3. NOM memory
4. Native memory

As I have noticed, each SOAP processor consists of Virtual memory and Resident memory. 
I understood from the link below that Virtual memory is the total memory occupied by the SOAP processor and resident memory is the current RAM memory being used up. 

Now, in our case the server RAM usage reached to around 7 GB utilization within a few hours of a server reboot due to a high volume of SOAP requests. However, after the business hours, when the volume declines appreciably the RAM usage does not decrease. As I understand, that Cordys SOAP processors tend to cache additional memory once it has been allocated to them and explains the non-decline in the RAM usage. 

Please share your views on the same. Adding another link explaining the memory.

Janmajay Purohit DH

Rollback an Application in Cordys

Rollback an Application in Cordys

Today, we tried to RollBack an application in Cordys using "Application Registry".
Everything went fine, but when we triggered one of the BPM instances, the instance was executing using the last installed path, and not the path it was suppose to. (i.e. it was taking the version 22 path and not the version 21 path).
Anyone faced the same issue??
I am using BOP4.1CU6.

Conclusion :
It has been identified as a "Product Defect (or rather say Effect :-) )"
Cordys product team will provide a patch for the same.
Courtesy :
Amit Kumar DH

Problem creating client stubs in JAX WS

There will be a problem when you try to consume services using JAX WS if the wsdl is not proper. Here is an explanation of a scenario

If the wsdl has same operation name and the element name then it would not generate client stubs properly.

If you encounter such scenarios then change the element name or the operation name and try to generate services using JAX WS again.

Tuesday, January 7, 2014

Fastest Approach to Generate Excel File

The given jar fastexcel-0.5.1-2010-12-26.jar can write thousands of records into an excel file with in few seconds.

Here is the sample code:
public Static String fastExcelSample() {
File fileObj=new File("testFile.xls");
String contentData[]={"FAST","EXCEL","EXAMPLE","TEST"};
Workbook wb=FastExcel.createWriteableWorkbook(fileObj);;
Sheet sheet=wb.addStreamSheet("SheetA");
addRow() method adds the Row into the sheet.  For multiple rows we can iterate and add multiple rows.
contentData[ ]  can be an object, which holds all the cell values of row and then write it into Excel file.
I have used it, it could able to write 20,000 records(each record 40 columns) in less than 20sec time.
Please find the attached jar file.