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;
		}
	}

}