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.