Sunday, February 15, 2015

Manually generating heapdumps in Websphere

This post explains the steps on generating heapdumps in Websphere on windows 

  1. Navigate to C:\IBM\SDP\runtimes\base_v7\bin
  2. Execute wsadmin.bat
  3. Execute the following in wsadmin prompt
set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]
$AdminControl invoke $jvm generateHeapDump
$AdminControl invoke $jvm dumpThreads

Monday, January 19, 2015

Websphere Commerce Deployed EAR version

From deployed ear file wcbd-deploy-info.properties, we can figure out the current Websphere commerce deployment package installed on the server. 
The location of this file would be under the deployed EAR


This file has a number of other informations related to the deployment

Here is a sample wcbd-deploy-info.properties

#Fri, 16 Jan 2015 05:19:54 +0000

build.label=2015-01-16_03-47-05_17
build.date=2015/01/16
wcbd.version=101129asup
target.env=uat
connector.module.list=
ejb.module.list=Payments-Plugin-PayPal,Payments-Plugin-PayPoint
existing.web.module.list=Stores,LOBTools
new.web.module.list=
context.root.mapping.list=
partial.app.zip.includes=
partial.app.zip.excludes=
was.host.list=SERVER NAME
db.type=db2
db.name=DB SERVER NAME
db.schema.name=DB SCHEMA NAME
run.dataload.sql.common=false
run.dataload.sql.target=false
run.dataload.xml.common=false
run.dataload.xml.target=false
run.dataload.acug.common=false
run.dataload.acug.target=false
run.dataload.acp.common=true
run.dataload.acp.target=true
run.dataload.acpnls.common=false
run.dataload.acpnls.target=false
wsadmin.deploy.script.file=/usr/WebSphere/CommerceServer70/deployments/jenkins/wcbd-deploy-server-2015-01-16_03-47-05_17/scripts/wcbd-wsadmin.py

rollout.update=true

Tuesday, May 20, 2014

Retrieveing Websphere Commerce Merchant Key

Here is a snippet of code to retrieve Merchant key in websphere commerce 7
final com.ibm.commerce.security.keys.WCKey keyName = com.ibm.commerce.security.keys.WCKeyRegistry.getInstance().getKey("MerchantKey");
final String merchantKey = keyName.getValueAsString();
System.out.println("merchantKey= "+merchantKey);

Saturday, January 18, 2014

God's presence at Railway Station

Another distressing incident just got vanished because of the presence of mind of an young guy. 

Friday morning (17-Jan-2014) I board on Kollam-Trivandrum passenger on my way to work at Technopark, Kerala. The train was overly crowded because of late running's of trains these days in Kerala. 

And as usual its a big chaos at Kazhakootam railway station as every one inside the train has to disembark. And then the train took off a sudden in less than 30 seconds.
One lady who was trying to board got trapped and slipped into the rail, a person (I would say its God) who was standing close to her got hold off her hair and pulled her back to the platform. Its the presence of mind of that person had eventually saved the lady from an unfortunate end.

It been quiet a while that people who depend on Kazhakootam railway station demands more train stops during peak hours. The cry for this would have been easily close to 2 decades and still the authorities and politicians are reluctant to act up on.

Dear politicians, do you act only when you see these sought of unfortunate things?
Why do authorities put down this very needed request?

Take a look at the number of institutional bodies operate in Kazhakootam area

  1. Technopark - Employing over 42,500 people
  2. Infosys - Officially just above 5000 folks. Once the new infrastructure is completed, the count will be over 13000 - Source
  3. Vikram Sarabhai Space Center (a.k.a VSSC)
  4. Karyavattam Kerala University Campus
  5. College of Engineering and Technology (CET)
  6. Sainik School
  7. Kinfra Film and Video park
  8. Technopark extension at Kinfra Film and Video park
  9. Technopark Phase 111 campus
  10. Marian Engineering College


Above is just an incomplete list based on limited knowledge. But I am sure there will be more highly populated organizations in and around Kazhakootam technopark area.

Public transportation should be for people benefits, it should not be biased on votes of people around that area.

One unconfirmed report from Railway authorities is that, the revenue in Kazhakootam is not on a scale and is the reason why railway is not allowing more train stops.

The Kazhakootam railway station is undoubtedly the forgotten railway station in South Kerala. Several agitation and campaigns have been conducted but all in vain. 

Here is one such which happened recently



Politicians, authorities please open you eyes

Wednesday, January 1, 2014

ADMA0010E: A Validation error occurred in task Selecting virtual hosts for Web modules

If your come across the following error while deploying a web application to websphere
ADMA0010E: A Validation error occurred in task Selecting virtual hosts for Web modules
Then the issue would be your might be missing the following file in your web archive (war)
ibm-web-bnd.xml
ibm-web-ext.xml 
Ensure that you have those files present in the archive and the redploy the application. 
I have come across this error while deploying a new web module to Websphere commerce server using wcbd scripts.

Here is the complete error I have seen in my wcbd wasadmin target 
wcbd.wsadmin.helper:
   [echoNL] Running wsadmin on localhost with /usr/WebSphere/AppServer70/profiles/wcbd/dist/server/wcbd-deploy-server-RELEASE-Rel1-BUILD-2013-12-31_04-02-20-252/scripts/wcbd-wsadmin.py.
  [wsadmin] profileName=template registry=/usr/WebSphere/AppServer70/properties/profileRegistry.xml
  [wsadmin] profileHome=/usr/WebSphere/AppServer70/profiles/template
  [wsadmin] WASX7209I: Connected to process "dmgr" on node templateCellManager01 using SOAP connector;  The type of process is: DeploymentManager
  [wsadmin] WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: "[WC_template, /usr/WebSphere/AppServer70/profiles/wcbd/dist/server/wcbd-deploy-server-RELEASE-Rel1-BUILD-2013-12-31_04-02-20-252/scripts, /usr/WebSphere/AppServer70/profiles/wcbd/dist/server/wcbd-deploy-server-RELEASE-Rel1-BUILD-2013-12-31_04-02-20-252/working/module,  , TmplGenericPaymentPlugin,WebSphereCommerceServerExtensionsData, WebSphere Commerce DB2 DataSource template, TmplPenguin,  , /usr/WebSphere/AppServer70/profiles/wcbd/dist/server/wcbd-deploy-server-RELEASE-Rel1-BUILD-2013-12-31_04-02-20-252/working/partialapp.zip, false, 300,  , false,  ,  ,  ,  , true, false]"
  [wsadmin] Deploying Web module TmplPenguin.war to WC_template.
  [wsadmin] Started: 2013/12/31 07:07:18
  [wsadmin] WASX7327I: Contents of was.policy file:
  [wsadmin]  //
  [wsadmin] // Template policy file for enterprise application.
  [wsadmin] // Extra permissions can be added if required by the enterprise application.
  [wsadmin] //
  [wsadmin] // NOTE: Syntax errors in the policy files will cause the enterprise application FAIL to start.
  [wsadmin] //       Extreme care should be taken when editing these policy files. It is advised to use
  [wsadmin] //       the policytool provided by the JDK for editing the policy files
  [wsadmin] //       (WAS_HOME/java/jre/bin/policytool). 
  [wsadmin] //
  [wsadmin] 
  [wsadmin] grant codeBase "file:${application}" {
  [wsadmin] };
  [wsadmin] 
  [wsadmin] grant codeBase "file:${jars}" {
  [wsadmin] };
  [wsadmin] 
  [wsadmin] grant codeBase "file:${connectorComponent}" {
  [wsadmin] };
  [wsadmin] 
  [wsadmin] grant codeBase "file:${webComponent}" {
  [wsadmin] };
  [wsadmin] 
  [wsadmin] grant codeBase "file:${ejbComponent}" {
  [wsadmin] };
  [wsadmin] 
  [wsadmin] 
  [wsadmin] WASX7017E: Exception received while running file "/usr/WebSphere/AppServer70/profiles/wcbd/dist/server/wcbd-deploy-server-RELEASE-Rel1-BUILD-2013-12-31_04-02-20-252/scripts/wcbd-wsadmin.py"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7109E: Insufficient data for install task "MapWebModToVH
  [wsadmin] 
  [wsadmin] ADMA0010E: A Validation error occurred in task Selecting virtual hosts for Web modules. A virtual host is not specified for Web module TmplPenguin with URI TmplPenguin.war,WEB-INF/web.xml."
  [wsadmin] 

Monday, December 24, 2012

Unable to access Eclipse's secure store

Unable to access Eclipse's secure store. Please verify your secure store settings. org.eclipse.equinox.security.storage.StorageException: Unable to locate secure storage module (org.eclipse.equinox.security.windows password provider 64bit).
If you come across this error then rename the .eclipse folder inside your home to get it resolved.
This issue happens when you switch between a 32 bit and a 64 bit eclipse usually.

In my case it occurred when I switched between eclipse Indigo vs STS ide.

Thursday, August 23, 2012

List email = reasonsMyBossWillApproveAttending.get("SpringOne2gx")

Today morning I received a News letter email from SpringSource about their springone conference. The email is sensational and its the first time I'm seeing such a beautifully constructed email which is really helpful too. No need to search for words to get an approval from your manager. Just edit the template.
See email in action
 

Thursday, August 16, 2012

No repository found containing: Error while updating ADT

If you come across the following errors while updating Android ADT

No repository found containing: org.eclipse.update.feature,org.eclipse.datatools.enablement.oda.feature,1.10.0.v201201161512-7A7T7CDZRDKHF_HnGjOX



Disable all the update sites except ADT and the go for Check for update one more time. It will work.



Tuesday, May 29, 2012

Adding and Removing Spring initialized beans from Container

Yesterday one of my friend shoot a question on Spring bean management on runtime. His requirement is to remove bean for container and register it back after doing some operation.
The idea is straight, We might run into these situations depending on our business use cases complexities.

Here is a test case code snippet to remove bean and register it again to the spring container

Spring Context XML


        
	
		
			Shinu
		
	


JUnit Test class



package com.shinu.demo;

import javax.servlet.ServletContext;

import junit.framework.TestCase;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.core.io.FileSystemResourceLoader;
import org.springframework.mock.web.MockServletContext;
import org.springframework.web.context.ConfigurableWebApplicationContext;
import org.springframework.web.context.support.XmlWebApplicationContext;

public class SpringWebDynamicCreationTest extends TestCase {

	final static Log logger = LogFactory
			.getLog(SpringWebDynamicCreationTest.class);

	protected static ConfigurableWebApplicationContext context;

	ServletContext mockServletContext;

	@Override
	protected void setUp() throws Exception {
		mockServletContext = new MockServletContext("/WebContent",
				new FileSystemResourceLoader());
		context = new XmlWebApplicationContext();
		context.setConfigLocations(new String[] { "/WEB-INF/config/springContext.xml" });
		context.setServletContext(mockServletContext);
		context.refresh();
		context.registerShutdownHook();
	}

	public void testAddAndRemoveObjects() throws ClassNotFoundException {
		Demo demo = getBean(context);
		assertEquals("Shinu", demo.getName());

		ConfigurableListableBeanFactory configurableListableBeanFactory = context
				.getBeanFactory();

		BeanDefinitionRegistry beanDefinitionRegistry = (BeanDefinitionRegistry) configurableListableBeanFactory;
		// Removing the bean from container
		beanDefinitionRegistry.removeBeanDefinition("demo");
		
		// Trying to obtains bean again from container. This will throw a null		
		demo = getBean(context);
		//demo object will be null here
		assertNull(demo);
		
		// Creating and registering bean to the container		
		BeanDefinition beanDefinition = new RootBeanDefinition(Demo.class);
		beanDefinition.setAttribute("name", "Shinu");

		beanDefinitionRegistry.registerBeanDefinition("demo", beanDefinition);
		context.refresh();
	
		//Obtaining from container again
		demo = getBean(context);
		assertEquals("Shinu", demo.getName());

	}

	private static Demo getBean(ApplicationContext applicationContext) {		
		try{
			return (Demo) applicationContext.getBean("demo");
		}catch(NoSuchBeanDefinitionException e){
			return null;
		}
	}

}


Tuesday, December 27, 2011

Nokia N900 and GPS

After installing Community SSU in my Nokia N900, i found a strange issue that my GPS stopped working. My GPS apps always failed in looking for a GPS fix. 
After a few googling and work around, I finally made it work.

Here is that you need to do if you run across the same issue.

1. Edit the "Location Settings" in Settings and change the "Network Position" server to "supl.google.com" (Looks like supl.nokia.com is not working after SSU update)
2. Install location-gui deb package and start a test to figure out the GPS availability and usage.


Link to download location-gui  

wget http://repository.maemo.org/pool/maemo5.0/non-free/l/location-test-gui/location-test-gui_0.92-1+0m5_armel.deb

dpkg -i location-test-gui_0.92-1+0m5_armel.deb 
 

3. Run location-test and start looking for GPS.

Voila, it worked.

Saturday, November 19, 2011

Friday, November 11, 2011

Beautiful - Malayalam movie

Beautiful - New movie by Anoop Menon
I came to know about this movie from a fb share, one song "Mazhaneer Thullikal" is shared; at the very first watch itself, the song, lyrics and cinematography strikes me. 
A 20 times i heard the song "Mazhaneer thullikal" from this new movie so far. That forces me to blog about this movie a bit.


Song - Mazhaneer Thillikal

Song: Moovanthiyay


The movie is directed by one of the malayalam director veteran V.K Prakash
Story and lyrics by Anoop himself, and music by Ratheesh Vegha; an upcoming music director. He proved his talent in "Cocktail" movie; his first movie as music director 
Singer: Unni Menon
Cast: Jayasurya, Anoop Menon, Meghna Raj, Aparna, Parvathy Nair, Jayan, Nandu, Thesni Khan, Kishore
Here is the official website for more information - http://www.beautifulthemovie.in/

Lastly my friend Lloyd Chandran had a question after seeing the preview. Is this a remake of "The Diving Bell and the Butterfly"
Even if it is like Anoop's last movie "Cocktail" I won't be surprised. He has got talent. I always feel, this guys picks the right talent always.

Wednesday, November 9, 2011

JavaFX 2.0 in Chrome

I was trying out the new Ensemble sample apps of JavaFX 2.0 in my Google chrome browser running on a 64bit windows 7. I soon realized that the app is not loading complaining that i don't have a FX 2.0 runtime. In fact i do have a SDK installed running fine. Then i tried downloading a 64 bit Fx 2.0 runtime from FX Runtime download; even that did'nt.
How ever everything thing seems to be perfect, where in my browser was showing i have the required JRE, and I have installed the FX runtime.
Finally i decided to went for a shot of downloading 32bit FX runtime setup. Voila that did worked, after installation I was able to see the app loading fine.
So folks out there facing issue with 64bit runtime, go ahead and install the 32 bit one which will fix the issue.

Thursday, November 3, 2011

Getting VM name and hostname from JBoss JMX

JBoss JMX exposes all information about the server as MBean's.
Here is a simple way if you need get the JVM name and the host name in your application.
For getting the JVM name 
ServerConfigImplMBean serverConfigMbean = 
MBeanProxyExt.create( ServerConfigImplMBean.class,
“jboss.system:type=ServerConfig”, 
MBeanServerLocator.locateJBoss()); 

serverConfigMbean. getServerName(); 

For getting the Host name 
ServerInfoMBean serverInfoMbean = 
MBeanProxyExt.create( ServerInfoMBean.class, 
“jboss.system:type=ServerInfo”, 
MBeanServerLocator.locateJBoss());  

serverInfoMbean.getHostName(); 

From the JMX Browser we can get the complete list of Server level exposed MBeans under "jboss.system"

Wednesday, April 27, 2011

Engagement Pictures now in Picasa

Finally I uploaded few of my engagement pics to picasaweb.
Here is the slideshow

Thursday, December 9, 2010

Time and Technology

Well; a blog post after almost 9 months. Its a big time isn't it. Several things happened during this eventful 9 month time-frame. Ups and downs and I was trying hard to make up my mind and to adjust to all odds happening around. I think I finally tamed myself on how to tackle these odds around.

"Never give up" - 3 words

Time is going at a pace which is in no way matching with my thoughts, yet I have to abide. That's the rule.
Technology too is going at a pace; not as fast as time though.

Past 9 months, I was silently watching all the happenings and neither get a chance to express any of my thoughts via blogs. I didn't even express or wrote anything about by Linux powered Nokia N900. What a pity. I feel ashamed :(. And I want to come out of this cage.

As the first yet careful step, The first I did is revamped my blog with the new (well - not sure when google added this) template feature. After an hour hard work, I came up with this decent look for my blog.

A few amazing things which I noted down during this cave age period are
More to come on each topics in next few days. Keep visiting.

Friday, March 5, 2010

Last night in Bangalore

After 6 wonderful years in Bangalore, I'm preparing for my last hours now. Tomorrow will be last day here.
I don't know what to blog at this moment. A lot coming to my mind starting from my very first day when I landed in Bangalore.
Just after my college days, couple of sad days in Chennai after that its like a dream when Lloyd called me and told me to come this tech world, I did not have any second thoughts. I came to Bangalore on a Onam vacation. First day to Office (Integer software solutions), I was nervous, obvious; first job :), met 4-5 mallus too the same day :).
After office hours only I came to know that I am going to stay with my company's CEO only, Ha stunned when i heard that, but when I met my CEO - Prince, I am amazed, em brassed, how can a person can be so enthusiastic, down to earth - yes he is like that only. Lloyd told me that we are taking up a project which cant be imagined by a fresher. A switching software which connects to ATM's, POS terminals etc. And my job was to tame Linux for this project development. I struggled initially, but again Prince took an hour session explaining how to be a successful person in life. Fly like a phoenix bird from turmoils. Lloyd provided my the technical support and Prince the mental support, thats more that enough for a person to survive.
ATM project we executed it, we were able to complete the one in no time. Unfortunately Prince was not able to find a client, thats a sad thing, though the experience we gained out of the project is enormous. Some more name I would like to mention here, Sheru, Jubs, Jeru, Gopz, Peeths... Yes it was a good team, no doubt about it.
After Integer, we; the same team except Gopz and Peeths joined Maintec technologies, I don't have any nice things to share in that company. But again we all the same team, the same commitment, another challenge of creating a Banking software. I decided to look out for a different choice for the first time from there. I worked only for three months and joined new company Fidelity on May-06
Fidelity Investments - Lot of things during the stay for 4 years. Ups and downs. I got lot of exposure, met very talented professionals. Gained a lot of professional knowledge from this company. Its was nice working with Fidelity. But there are some negative thoughts also which I did not want to blog it here. Every year was exciting, but I really enjoyed during my last 2 years working with one of the critical teams (I'm not going to mention the name here, hmmm financial sector, no wonder). During this period I visited Boston. It was one of the dream in my life. I enjoyed the period of 45 days during the stay. One of the things I never forget is my visit to Franklin Street (FSF - Free Software Foundation) HQ.
Yesterday I completed my tenure with Fidelity and relived from the job.
I'll be joining the new company Infosys technologies coming Monday (08-Mar-2010). Yes I'm excited about it. New company, new place. Haa I'll be joining at Kerala (God's own country) Trivandrum campus. One main reason about this excitement is that I can be close to my parents. Hmmm let me see how can I take care of them well.
Stay connected for more updates...

Sunday, January 17, 2010

Android experiment with Linux 64

Today I took an initial look into Android in my Linux 64 bit. After some time of initial hiccups with my eclipse IDE (Galileo), I was able to install Android development plug-ins onto eclipse.
Repository to install android is
https://dl-ssl.google.com/android/eclipse/
After installing I tried creating a new Android project, but my Android preference complained me about my ncurses.so.5 (Unfortunately I have not installed i686 binaries of this library).
$ android-sdk-linux_86/tools/adb version
Rpmfind came to my rescue here in finding the rpm for me. Link to download ncurses.so.5 (32 bit) - This is for FC12
Download and try a yum localinstall
yum localinstall ncurses-libs-5.7-3.20090207.fc12.i686.rpm
After installing adb is giving me version
$ android-sdk-linux_86/tools/adb version
Android Debug Bridge version 1.0.25
Here is a snapshot of downloading android SDK through eclipse
After downloading create a new Android project from eclipse.
I created my first Activity like this

import android.app.Activity;

import android.os.Bundle;

import android.widget.TextView;

public class FirstActivity extends Activity 

{

    /** Called when the activity is first created. */

    @Override

    public void onCreate(Bundle savedInstanceState) 

    {

        super.onCreate(savedInstanceState);

        TextView tv = new TextView(this);

        tv.setText("Shinus first Android test");

        setContentView(tv);

    }


After this start your emulator (I tried from console prompt)
./emulator -no-audio -avd Test_Console &
Here -no-audio is required otherwise it didn't started fine for me (Fedora 12 64bit). Please be patient. It took almost 2 minutes to see the android mobile desktop.
And Test_Console (Android Virtual Device) can be created using the following command
./android create avd -n Test_Console -t 1
List of Virtual devices can be listed by issuing this command
android list avd
After this I tried deploying the app I created using eclipse first from console. Here is the command to do that
./adb install /home/shinu/workspace/android-space/FirstAndroid/bin/FirstAndroid.apk
Here is the screenshot of my first android app running in FC12 64bit
Happy Android Coding :)

Saturday, January 16, 2010