Friday, February 28, 2014

setTimeout usage in javascript

Generally window.setTimeout or setTimeout is similar function. They perform call to a custom defined javascript function after specific amount of time.

There are browsers which makes the below line valid

setTimeout(callingAFunction(),400);

Which calls a function called "callingAFunction" after 400 milliseconds. But this function creates a problem in IE8 which gives a script error. Instead use like this,

setTimeout(callingAFunction,400);

Broadcast Laptop's Internet to Mobile Devices

This post is intended to the people who wants to use the internet into other devices from Laptop. All you have to is to run few commands in the machine.

It worked for me and right now my laptop is the acting as Router :)

Pre-requisites :
  • I don't really know if this works for below Windows 7 users, but for sure it works for Windows 7 and above.
  • Make sure your laptop is connected to LAN (Internet should be coming to your laptop)
  • Create a shortcut for cmd.exe on your desktop.
  • Right click this cmd and open in administrative mode. 
  • Now type this command in the command prompt

    netsh wlan show drivers

    It will show something like this

  • In the picture an area is highlight which says "Hosted network supported" for which the value was "Yes". Now this should be "Yes", and if this is represented as "No", then your laptop doesn't support hosted network which means this procedure will not going to help you in broadcasting your laptop's internet to other devices.
  • Now once you are sure that the value is "Yes", then below command is to be run (without any delay :P Just kidding)
    netsh wlan set hostednetwork mode=allow ssid="MySSID" key="Mykey" 

  • MySSID will be the name you want to keep for hosted network and Mykey is the password to be set for your network. Once this is run then a Wireless network will be created.
  • Then next you have to execute the below command
    netsh wlan start hostednetwork
  • Last thing which is pending is to share your internet from your laptop to the wireless network created so that your device (Mobiles, IPADs etc.,) can use the internet. This can be achieved by going into (Control Panel ->Network and Sharing center on the left side there will be "Change adapter settings"). Once you click on that you will have a screen similar to this,


  • Once you can see this screen you should be able to locate "Local Area Connection", right click on that and select properties. On the sharing tab make sure you check both the options and select the wireless network which is created just now (You should be in a position to know which one you have created here). That's it. It should work now.
  • Try connecting to the SSID provided in the command above from any of the mobiles/IPAD by giving the password which is configured. You should be able to locate this newly created wireless point in all of the devices. However it is observed that on increasing the number of devices which are connected, the higher is the rate of getting disconnected from internet.

    Similar approach can be found from the links given below

    http://community.spiceworks.com/how_to/show/897-how-to-set-up-virtual-wifi-in-windows-7
    Courtesy :
    A Knowledge seeker  

Saturday, February 22, 2014

Sample procedure in Oracle

Sample oracle procedure which involves loops and also statements to execute. Exception handling not done perfectly but could use for a start ups.
---------------------------------------------------------------------------------------------------
create or replace 
PROCEDURE MANAGE_MONITOR_RECORDS
IS
EVENT_CAT varchar2(100);
PROCESS_NAME VARCHAR2(100);
COUNT_TOTAL NUMBER;
SQL_STMT VARCHAR2(200);
BEGIN
for x in (select distinct PROCESS_INSTANCE_ID FROM HMT_PROCESS_AUDIT_INFO)
LOOP
DBMS_OUTPUT.PUT_LINE(X.PROCESS_INSTANCE_ID);
SELECT COUNT(*) INTO COUNT_TOTAL FROM GLF_EVENT_LOG WHERE LOG_INSTANCE_ID = x.PROCESS_INSTANCE_ID;
IF (COUNT_TOTAL > 0 ) THEN
  SELECT EVENT_CAT,PROCESS_CODE INTO EVENT_CAT,PROCESS_NAME FROM GLF_EVENT_LOG
          WHERE LOG_INSTANCE_ID=x.PROCESS_INSTANCE_ID AND ROWNUM=1;
  DBMS_OUTPUT.PUT_LINE(EVENT_CAT);
  DBMS_OUTPUT.PUT_LINE(PROCESS_NAME);
  SQL_STMT := 'UPDATE HMT_PROCESS_AUDIT_INFO SET KEYWORD2=:1,KEYWORD3=:2 WHERE PROCESS_INSTANCE_ID=:3';
  EXECUTE IMMEDIATE SQL_STMT USING ''||EVENT_CAT||'',''||PROCESS_NAME||'',''||x.PROCESS_INSTANCE_ID||''; 
  DBMS_OUTPUT.PUT_LINE('Updated the entry in HMT_PROCESS_AUDIT_INFO table');
  EVENT_CAT := NULL;
ELSE
  DBMS_OUTPUT.PUT_LINE('ELSE BLOCK');
END IF;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
 return;
END;

Thursday, February 20, 2014

How to check where is syntax error in javascript?

By simply looking at a javascript file one cannot say where is the syntax error (if any). And there is no compiler as such during our development which will say that. We simply write DOM methods or functions in the javascript unlike Java (Eclipse is a tool which will validate the source code during development). But this is not available in javascript. However during development of any application in cordys there will be a place where you add events/javascript functions in any XForm. Cordys will be able to tell if the XForm has any errors but it won't tell where exactly the error is (eg., will not tell the line number of the error) which will make difficult for a developer to locate where exactly is the error,

There is an online website which will validate the javascript and will notify the error if there are any,

All you have to do is to copy the javascript and paste in the place provided in the website. A sample screen is shown below


And the website you are looking for is given below

http://www.javascriptlint.com/online_lint.php

On Click of the lint button it will show the errors if there are any in the javascript file.

How Birt is configured?

********Coming soon*********

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>

Saturday, February 15, 2014

How to know how much memory is occupied/free/available from JVM level

import com.eibus.util.logger.CordysLogger;
import com.eibus.util.logger.Severity;

private static Runtime memObj = Runtime.getRuntime();
private static final CordysLogger fileLog = CordysLogger.getCordysLogger(Utilities.class);

fileLog.log(Severity.ERROR, "For the loop "+loop+"--Before firing get Objects: Total Memory : "+getMemory("total")+"--Available Memory: "+getMemory("available")+"--Occupied Memory is "+getMemory("occupied"));

private static long getMemory(String type){
    int mb = 1024*1024;
    long mem = 0;
    if(type.equalsIgnoreCase("total"))
    mem = memObj.totalMemory()/mb;
    else if(type.equalsIgnoreCase("available"))
    mem = memObj.freeMemory()/mb;
    else
    mem = (memObj.totalMemory()-memObj.freeMemory())/mb;
    return mem;
    }

Watch out!!!! Small things might become a mess...(Few things to remember while writing a Java method)

As a developer in a service industry we often learn a lot during a particular phase of project, this post is something similar where in we learnt more apart from writing simple java code. Below shown is one of the process which was developed as a part of Java project,

Pseudo-code of the process is

Step 1: Fetch data from the table
Step 2: Loop through all the records which are fetched
Step 3(While Loop): For each record try to fetch the column information and append to string buffer and perform some replace operations.
Step 4: Write this string buffer into a file after completion of the loop
Step 5: Repeat from Step 1 by changing the cursor size.


Problem with the above process!!!!!
There is a query which is provided by the customer which returns huge data and which has to be written into a file by using the above process. This process is not that difficult but while performing this process the ESB layer is utilizing lot of resources than needed. Below is the history about this process how it has made efficient and made to use less resources.

"Indexes" the Initial Problem :
We have experienced a huge time lag in firing a query probably around 5 mins, if this is the case then obviously it will kill the performance of the process. This is the initial hurdle which has to be passed. We found out that indexes were missing in the major table which was used in the query. Once we had fixed that we could be able to fetch data instantly (prob 2 mins).

"Smart Usage of WsApp properties" :
I have already explained about this topic in the other post please refer this i.e,
http://cordyslearning.blogspot.in/2014/02/smart-usage-of-ws-app-connector.html
Keeping the query cache of wsapp container only for 30 secs resulted in fetching the data from DB layer multiple times even after implementing cursor. Hence this is avoided by making the query cache refresh interval to 300 (5 Mins).

"Out Of Memory"(replacing content of huge String Buffer object):
out.write(sbf.toString().replaceAll("_X005B_", "[").replaceAll("_X005D_", "]"));
out : FileOutputStream
sbf : String buffer which is as huge as enough to crash a container
AS mentioned sbf was a huge string and as we have did operations on this crashed the container since there was no sufficient memory available to do this operation.

As we have got an out of memory exception, we have added a JRE property to increase the NOM memory
-Dbus.xml.vm.maxsize=1072M
But no LUCK :(
We had tried logging memory occupied at various stages and we had observed few things
-- The total memory allocated for the container is increasing exponentially. We felt like the memory was not being released, on analyzing we found out that the memory leak was at query.getObjects() line, we also created a busObject which will be having the iterator.nextElement() as the value. As these are platform level objects normally the Java layer would release soon after the execution of the method. But as we are still in the method for a longer time, hence its not being released. So there was a need to delete them manually which can be done as below

if(Node.isValidNode(bObj._getObjectData()))
Node.delete(bObj._getObjectData()); //This step is added while reading each row of the iterator element.

As expected this worked. The reason being Java layer would delete platform level objects after completion of the method and not in between.

Lessons Learnt :

  • While using a query inside Java which returns huge data, make sure you have indexes available in order for faster retrieval.
  • Make sure you implement cursor in such cases @ Java layer.
  • Since this service is used as a web service make sure you provide sufficient timeout for this service in BPM activity.
  • Make necessary changes to the container so that it will be beneficiary in this scenario.
  • And Last but not least with the help of JConsole make sure you avoid memory leaks even if you have to delete platform level variables like query.getObjects(), itr.nextElement() etc.,.


Thursday, February 13, 2014

BSF.getXMLDocument() vs NomDocumentPool.lendDocument()

import com.eibus.xml.nom.internal.NOMDocumentPool;
--Import statement used in the java

private static NOMDocumentPool nomDocPool = NOMDocumentPool.getInstance();
-- The above is a class level variable

Document doc = nomDocPool.lendDocument(); // Change
-- Creating doc


Explanation yet to come based on our analysis of the code.

Tuesday, February 11, 2014

How do I know which process is using which port

Recently I have encountered with a weird problem (Website is not being started) and there is an application error which is totally unclear to me. Just like any other person I have googled the error :P The interesting thing I have noticed is "Your website is not being started as there is some other application which is using port 80 (which is my website's port). ".

The explanation seems very clear but that won't solve my problem right :D
Now the task in my hand is " I have to find out the process which uses the port 80, which is very new to me." Finally I am able to achieve it and below was my approach.

Finding out which application is using port 80, One can find out using the command prompt what is the application's PID which is using port 80. A sample one is shown below





The results will show what is/are the application(s) which are using this port. In my example I searched the application which is using port "1521" and the screen shot shows the result. The command used to fetch the result is shown below

netstat -na|find "1521"

Give your port number instead of 1521. Now from the results you can figure out certain things, the third column will give the thing which you need. One of the result from the above is 

 TCP    192.168.10.127:1521    192.168.10.127:53710   ESTABLISHED

The highlighted column will convey everything, here in this case it is 192.168.10.127:53710

This 53710 is the PID of the process which is using this port.

From this I could able to find out the PID of the application which is using the port "80". Now I have to find out the process which is using this PID, this can be achieved by using task manager


From this I could understand that the application PID which I am searching is used by some other application which is "Skype", which is when I have realized that "Yes this problem occurred when I have installed skype". Normally I did not get any hint of how come skype will be the reason for this problem. What I did was just killed the skype application and then started the IIS. 

No wonder IT WORKED.










----------------------------------------------------------------------------------------------------
[Updated from here on 19th Nov 2014]
There is a software "ProcessExplorer" which is a freeware and which identifies the process with a specific PID. After you identifying the PID using the above process, run the procexp.exe and locate the process bearing this PID which you have recorded.



Now my next task is to try and identify what is the process which is bearing the PID : 4340 and from the above image I could see that it is a java.exe and I know that each cordys soap container will create a new java.exe and so I try to debug by looking into CMC (Cordys Management Console) which is an application which shows the container status and information about each container. Now try and locate the container which has the same PID as the one which you wanted (4340).

  
Its found out to be as LDAP. By this one could understand that LDAP is the java.exe which is running on a port which you are checking.

----------------------------------------------------------------------------------------------------------
Dated : 08-07-2015

You can find the PID directly from a port using below command,

netstat -ano|find "1521"

I wanted to kill this process and I could not find it in task manager. I killed it from command prompt using below command, 

taskkill/f /PID /7076

---------------------------------------------------------------------------------------------------------

Monday, February 10, 2014

Configure Email Container in any environment

Configure E-Mail Connector

This is one of the basic connector which has to be configured for any client requirement and I found it tedious to remember all the configuration settings. Hence I wanted it to be kept in the internet.



Above is the configuration screen to be configured while creating an E-Mail connector.

Two points to be noted :

  1. Make sure you are connected to internet if you are configuring for gmail.
  2. We have to add jvm properties in JRE configurations also, please find the properties which are to be added as jvm properties.
-Dmail.pop3.socketFactory.class=javax.net.ssl.SSLSocketFactory
-Dmail.pop3.socketFactory.fallback=false
-Dmail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
-Dmail.smtp.socketFactory.fallback=false

I tried understanding what are these, I could just find out when we enable SSL while configuring the container we need to add those class files to the jvm then only it can detect.

As always : Correct me If I am wrong anywhere.
-------------------------------------------------------------------------------------------------------
I have tried with the above settings and What I found was a configuration error while starting the container. The error is shown below,

Connection to the mail server failed -' javax.mail.MessagingException: Connect failed; nested exception is: java.io.IOException: Unexpected response: * OK Gimap ready for requests from 115.119.152.140 jz7if19298575pbc.133 ' is not supported.com.eibus.applicationconnector.email.MailConnector.open(MailConnector.java:230)com.eibus.soap.Processor.open(Processor.java:755)com.eibus.soap.Processor.startProcessor(Processor.java:1050)com.eibus.soap.ProcessStreamsHandler.startProcessor(ProcessStreamsHandler.java:686)com.eibus.soap.ProcessStreamsHandler$StreamReader.run(ProcessStreamsHandler.java:353)

This error is resolved by making the property value of the property "mail.pop3.socketFactory.port" from 993 to 995, As I have seen that this is the default port where gmail will be listening to. These properties will be set by default when you check set SSL checkbox. Now I had to modify manually this value from 993 to 995. Restarted the container worked. I don't know why is this strange behaviour in two different environment.

One Problem of having CWS and ISVP in a single Environment

Scenario:

 This post is about the problem I have faced by having the CWS content and ISVP content only in one single environment. I have one project's CWS content and ISVP content in my local environment. Now what I did was, I have uninstalled the isvp from my local machine. The UnInstallation was successful but however both the CWS content and ISVP content in the same environment will be sharing common cordys database, while uninstalling the ISVP it removed certain content from the cordys database (Assumable its xsd related content). The process of uninstallation was successful. But now I am facing a problem from my development content. When i publish any of the newly created web service it doesn't succeed throwing the exception which is shown below,

<![CDATA[ApplicationTransaction 'com.cordys.cap.applicationconnector.Transaction' threw an exception during abort.]]></log4j:message>
<log4j:NDC><![CDATA[Running Publishing document(s)
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI/GetDistintOrgsFromConfiguration
 Publishing HealthMonitoringTool/Web Services/HealthMonitor/ESB-App/Composite/HealthMonitor.ESBApp.Composite.ESBAppCompositeWS/ESBAppCompositeWSI/GetDistintOrgsFromConfiguration/GetDistintOrgsFromConfigurationRealization
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/COMM_JOBRUN_WORKITEM_DETAILS.xsd
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/COMM_JOBRUN_WORKITEM_DETAILS.xsd/Reference_to_00505687-00BD-11E3-E8EE-2679912CB788
 Publishing HealthMonitoringTool/Ws-App Packages/HealthMonitor/HealthMonitorAppR1/XMLSchema_Binary_Reference_WSAppServerSchema.xsd
]]

I have understood that I created a mess first by having both cws and ISVP content in one single environment and second by unInstalling isvp. I have installed the isvp again in the environment and tried publishing the newly created web service. But NO LUCK :( still I have the same issue. This issue got resolved when I restarted the cordys monitor and then tried publishing the service. 

The situation is same for any newly created web service in this scenario. Whenever I create a new web service in my local development server, in order to publish it successfully I have to restart cordys monitor and then try publishing.

Note : I could able to find the resolution, but I wasn't able to understand what exactly went wrong. People can put their thoughts on this and let me know if they have found the reason behind this by giving a clear explanation.

Friday, February 7, 2014

Smart usage of Ws-App Connector properties

Scenario :

So here is the scenario, one of our client has a requirement which demanded huge amounts of data to be read from database and transform the data into a proper XML format. All the data for a particular scenario together will form an XML structure (A complete XML Structure will be formed by reading all the rows of the query response) which has to be read completely and formed into one XML file and then this file has to be transformed to some other format.

So, In order to perform this task the team has implemented cursor which reads the data from the database chunk wise. Additionally the query whatever is used to read the content from database is unfortunately 4500 lines which is written by the client and hence is close to "alien" language to the team. Hence the team has blindly executed the query from WsApp Layer. This query of the client runs for more than 5 mins to fetch the data. 

As the situation demands cursor implementation there is a "query.getObjects()" triggered multiple times based on the cursor. But fortunately/Unfortunately the java code to read the data from DB and write into XML File is taking loads of time which raises the flags on performance. So 5 loops means 5 times query.getObjects() is triggered and its taking close to 5 * (Time to fetch the results of the query). which is a performance threat to the client. Hence to overcome this performance threat the team has followed below points,


  • The code has been reviewed and necessary steps are taken at java level.
  • It has been observed that the indexes are missing @DB level which were present in quality environment and were missing in development environment. Reduced 5 mins to around 2 mins to read a chunk of data.
  • Another major point that I personally came to know here is the usage of "Refresh Interval" of "Cursor cache" in Ws-App container.

    • The Refresh Interval of the container was kept by default which is 30 secs (By this means the cache of the cursor will be present only for 30 secs and next query will be a hit to DB directly).


    • As the setting was 30 secs and the query in the above scenario will retrieve data almost 3 mins and there is no use of implementing query in this case as the next fetch will be done from the DB directly instead of taking from the cursor as the time has elapsed (30 secs). Hence by changing the setting of the container helped the problem of performance to vanish. We had kept a refresh interval of 5 mins by which the data would be retrieved in the first loop and will be using the cache of the cursor from the next loops again. Hence by this we could able to bring down the time to perform the operations drastically.

Unable to reload "Database Metadata"

An error during reloading database metadata which says 

Error : Could not retrieve metadata. (Could not retrieve metadata.)

Additionally the error came with couple of free gifts,

  • Has written a log of more than 300 MB
  • Collaborative workspace has been crashed. (May be this is the reason the above log has stopped until 300 MB :P)
Reason and Resolution :

The database I am trying to connect is oracle and there are by default some of the system tables which are in recycle bin. Hence we need to clear that recycle bin which is possible by running a command in database. The command is as follows

PURGE RECYCLEBIN;

Once the recyclebin is purged the reload database metadata works fine.
----------------------------------------------------------------------------------------------------------

The other scenario where this problem can be encountered is that "when a developer adds a column and wants that column to be reflected in the database metadata in order to use in the java layer". Lets say the table has many columns and you have added one more, when you try to incorporate this column into your database metadata you generally would reload it. In this situation one might get problem of timeout, to avoid this you need to increase the time out in this case this can be done by adding a property in config properties of cws.

<<CordysInstanceDir>>/defaultInst/components/cws/config file and then you add the property below

debug.soap.timeout=<<CustomTimeOut>>
debug.soap.timeout=900000 

Restart CWS Container and try the reloading again. If you face this error again then it means that this timeout is also not sufficient to go ahead, hence this must be increased further.

Note : Important thing which one has to remember is, once you have enabled this property and are done with your work please revert the setting to before as this is a common config file for all the organizations.

Wednesday, February 5, 2014

Downgrade IE11 from Windows 7

I have faced problem in uninstalling ie11 from my laptop.

The topic is well explained in the below site

http://www.wikihow.com/Uninstall-Internet-Explorer-11-for-Windows-7

Error while starting eclipse. An error has occurred. See the log file.

An error occurred while starting the eclipse,

sample error message is shown below

"An error has occurred.  See the log file
d:\Kiran\Softwares DH\eclipse-jee-juno-SR1-win32-x86_64\eclipse\configuration\1391667331474.log"




The contents of the log file are



The class "org.eclipse.core.runtime.adaptor.EclipseStarter" is defined in the jar "org.eclipse.osgi_3.8.1.v20130124-134944.jar" which will be configured in a configuration file called "config.ini" of eclipse,

Sample config file is 



Based on the config file the jar has to be present in plugins folder of eclipse directory but when I have observed as expected the jar was not present, hence the problem 

Resolution :

The content of eclipse I have taken is invalid (Do not have necessary content) or the software used to install is not valid. Hence the software or the dump has to be changed.

Unable to start CARS Error 1067



When we try to restart cars we faced the error "Unable to start CARS ERROR 1067"


Reason :

Cars DB (berkely DB) is corrupted and hence has to be rolled back.

Resolution :

As a resolution to the above problem we have to recover the database of cars. Unfortunately there is no GUI to do this operation and one has to do it from command prompt,

The following command has to be executed,
db_recover -v -h "c:\Cordys\AdminRepositoryServer\CU17\bdb"

Note : This command has to be executed from the path "c:\Cordys\AdminRepositoryServer\CU17\bin"

above command can also be executed to a particular timestamp by using the parameter -t yyyyMMddHHmmSS (the modified time of the bdb folder).
db_recover -v -h "<<bdbFolder>>" -t "yyyyMMddHHmmSS"

A Sample error from event viewer captured in my case was given below,

Faulting application name: slapd.exe, version: 0.0.0.0, time stamp: 0x4c87499e
Faulting module name: MSVCR80.dll, version: 8.0.50727.4940, time stamp: 0x4ca2b4dd
Exception code: 0xc000000d
Fault offset: 0x0000000000056460
Faulting process id: 0x1378
Faulting application start time: 0x01cf2251bc1c2e2d
Faulting application path: D:\Program Files\Cordys\bop41cu6\bin\slapd.exe
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_88df89932faf0bf6\MSVCR80.dll

Report Id: fa9850c0-8e44-11e3-9814-005056c00008


--------------------------------------------------------------------------------------------------------
[Update : 06 Sept 2019] 

Before attempting db recovery, try to remove alock file which will be present in bdb folder and restart once. Even if the problem persists, then go for db recovery.

-- Credits @Mahipal Reddy