<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3662509960113735055</id><updated>2026-07-23T23:05:02.850-07:00</updated><category term="x10"/><category term="ubuntu"/><category term="gwt"/><category term="linux"/><category term="snaplogic"/><category term="virtualbox"/><category term="book"/><category term="eclipse"/><category term="java"/><category term="android"/><category term="bash"/><category term="engineering"/><category term="gardening"/><category term="hardware"/><category term="networking"/><category term="performance"/><category term="postgresql"/><category term="review"/><category term="semanticweb"/><category term="transactions"/><category term="tuxedo"/><category term="weeds"/><category term="wiki"/><title type='text'>Laird OnTechnology</title><subtitle type='html'>A feed containing a semi-random set of postings on technology topics. When I read a tech book, or figure out a solution to a weird problem, I will post an entry to help others along their tech journeys.&#xa;&#xa;My primary blog is &lt;a href=&quot;http://peterlaird.blogspot.com&quot;&gt;Laird On Demand&lt;/a&gt;.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1801462118388874363</id><published>2014-06-04T12:42:00.003-07:00</published><updated>2014-06-04T13:07:26.840-07:00</updated><title type='text'>Spring Data Infinite Loop in HashMap in PreferredConstructor and CustomConversions</title><content type='html'>&lt;h4&gt;
Spring Data Infinite Loops in Production&lt;/h4&gt;
This blog post is related to an issue we have started seeing in production at the company where I work. I am trying to figure out where to take this next. I have posted this report to the Spring Data forum here:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://forum.spring.io/forum/spring-projects/data/750072-spring-data-infinite-loop-in-hashmap-in-preferredconstructor-and-customconversions&quot;&gt;http://forum.spring.io/forum/spring-projects/data/750072-spring-data-infinite-loop-in-hashmap-in-preferredconstructor-and-customconversions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
It started happening a few weeks ago. We would see a box CPU suddenly go to 100% indefinitely until the app was redeployed. Fortunately, we did take thread dumps, and in one case a heap dump. We were able to see that there is a recurring infinite loop in two places in Spring Data.&lt;br /&gt;
&lt;br /&gt;
This has happened a total of 3 times now. Given the number of nodes we run in PROD, INT and QA (some number &amp;gt; 30), and the length of time we have been in production on this stack, we would characterize it as a rare occurrence. But it worries us.&lt;br /&gt;
&lt;br /&gt;
One could ask &quot;what changed in the application to make this start happening?&quot;. Ack. We are in our busy season right now, so a lot of commits went into our application for the weeks prior to the first occurrence. And given the rare nature of the problem, it would be difficult to really identify even the time range of commits that we would need to evaluate.&lt;br /&gt;
&lt;h4&gt;
Root Cause&lt;/h4&gt;
In all 3 cases, the infinite loop is coming from concurrent updates to the thread-unsafe HashMap class. We see it happening within two Spring Data classes:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;org.springframework.data.mapping.PreferredConstructor&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;org.springframework.data.mongodb.core.convert.CustomConversions&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;I could explain why HashMap is getting stuck in infinite loops, but several others have already done a great job doing it, so I refer you there:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;http://mailinator.blogspot.dk/2009/06/beautiful-race-condition.html&quot;&gt;http://mailinator.blogspot.dk/2009/06/beautiful-race-condition.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;a href=&quot;https://code.google.com/p/javasimon/issues/detail?id=115&quot;&gt;https://code.google.com/p/javasimon/issues/detail?id=115&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
Why us, not everyone else using Spring Data?&lt;/h4&gt;
&lt;div&gt;
Looking at the PreferredConstructor and&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;CustomConversions source code reveals that indeed they are indeed using raw HashMap instead of &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Helvetica, arial, verdana; font-size: 15px; line-height: 22.5px;&quot;&gt;ConcurrentHashMap. Does that mean those classes do not expect to be accessed by more than one thread?&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22.5px;&quot;&gt;But why are we the first to see this? I see no other complaints about for this issue with respect to Spring Data on the web. Three possibilities:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 22.5px;&quot;&gt;We are using Spring Data incorrectly&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana; font-size: 15px; line-height: 22.5px;&quot;&gt;This a problem in Spring Data, and&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana; font-size: 15px; line-height: 22.5px;&quot;&gt;Other people have hit this, but no one has traced it to Spring Data yet&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 22.5px;&quot;&gt;We are very unlucky to be the first/only people to have hit it&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22.5px;&quot;&gt;As for point one, we have reviewed our application and Spring Data docs. We have looked and looked, and cannot see anything amiss in our implementation.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22.5px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22.5px;&quot;&gt;More Often, Occurs Soon After a Deployment&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: Helvetica, arial, verdana;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22.5px;&quot;&gt;In 2 cases out of 3, this problem happened soon after a redeploy of the application. That suggests that this problem happens during initialization/first run of a code path. But we can&#39;t explain the 3rd outage though.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4&gt;
Stack Trace Snippet for PreferredConstructor&lt;/h4&gt;
&lt;div&gt;
This stack trace was taken from a thread dump during one event. A more complete thread dump can be found here:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://pastebin.com/c5erB5XF&quot;&gt;http://pastebin.com/c5erB5XF&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&quot;http-bio-8080-exec-235&quot; daemon prio=10 tid=0x00007fb19c0a9800 nid=0x5337 runnable [0x00007fb228953000]&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;java.lang.Thread.State: RUNNABLE&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at java.util.HashMap.getEntry(HashMap.java:469)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at java.util.HashMap.get(HashMap.java:421)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mapping.PreferredConstructor.isConstructorParameter(PreferredConstructor.java:120)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mapping.model.BasicPersistentEntity.isConstructorArgument(BasicPersistentEntity.java:98)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:252)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:249)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:249)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:223)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.repository.support.SpringDataMongodbQuery$1.apply(SpringDataMongodbQuery.java:55)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.repository.support.SpringDataMongodbQuery$1.apply(SpringDataMongodbQuery.java:53)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:270)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:114)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at sun.reflect.GeneratedMethodAccessor356.invoke(Unknown Source)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at java.lang.reflect.Method.invoke(Method.java:606)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.sun.proxy.$Proxy161.findAll(Unknown Source)&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;at com.silverchalice.scamp.bizniz.v3.media.MediaServiceImpl.findByFilter(MediaServiceImpl.java:293)&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
Stack Trace Snippet for&amp;nbsp;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;CustomConversions&lt;/span&gt;&lt;/h4&gt;
This stack trace was taken from a thread dump during one event. A more complete thread dump can be found here:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://pastebin.com/gYMGPEkL&quot;&gt;http://pastebin.com/gYMGPEkL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;white-space: pre-wrap; word-wrap: break-word;&quot;&gt;
&quot;http-bio-8080-exec-75&quot; daemon prio=10 tid=0x00007f3688018000 nid=0x6c2e runnable [0x00007f376e9ef000]&lt;br /&gt;
java.lang.Thread.State: RUNNABLE&lt;br /&gt;
at java.util.HashMap.getEntry(HashMap.java:469)&lt;br /&gt;
at java.util.HashMap.get(HashMap.java:421)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.CustomConversions.getCustomReadTarget(CustomConversions.java:317)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.CustomConversions.hasCustomReadTarget(CustomConversions.java:281)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:200)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readCollectionOrArray(MappingMongoConverter.java:791)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1048)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:77)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:999)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:755)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:256)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:223)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1050)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:77)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:999)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:755)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:256)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:223)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readCollectionOrArray(MappingMongoConverter.java:791)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1048)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:77)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:999)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:755)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:256)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:257)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:249)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:223)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:183)&lt;br /&gt;
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:77)&lt;br /&gt;
at org.springframework.data.mongodb.repository.support.SpringDataMongodbQuery$1.apply(SpringDataMongodbQuery.java:55)&lt;br /&gt;
at org.springframework.data.mongodb.repository.support.SpringDataMongodbQuery$1.apply(SpringDataMongodbQuery.java:53)&lt;br /&gt;
at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:270)&lt;br /&gt;
at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:114)&lt;br /&gt;
at sun.reflect.GeneratedMethodAccessor470.invoke(Unknown Source)&lt;br /&gt;
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br /&gt;
at java.lang.reflect.Method.invoke(Method.java:606)&lt;br /&gt;
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)&lt;br /&gt;
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329)&lt;br /&gt;
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)&lt;br /&gt;
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)&lt;br /&gt;
at com.sun.proxy.$Proxy124.findAll(Unknown Source)&lt;br /&gt;
at com.silverchalice.scamp.bizniz.v3.events.EventServiceImpl.findByLiveStatsAssetId(EventServiceImpl.java:141)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h4&gt;
Application Details&lt;/h4&gt;
Here is a bullet list of details about our application:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Web application&lt;/li&gt;
&lt;li&gt;We have ~40 Repository definitions (PagingAndSortingRepository)&lt;/li&gt;
&lt;li&gt;We use Spring Java Config&lt;/li&gt;
&lt;li&gt;We use QueryDSL for querying in almost all cases&lt;/li&gt;
&lt;li&gt;Our app is very read heavy, something like 99.9% reads&lt;/li&gt;
&lt;li&gt;Our app ranges from 100 to 10,000 requests per minute on a box. These events took place during times of not-so-high load (say, a few hundred requests per minute)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
Stack Details&lt;/h4&gt;
&lt;div&gt;
Here is a bullet list of details about our environment:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Java webapp hosted as an Amazon EC2 Elasticbeanstalk app&lt;/li&gt;
&lt;li&gt;JVM: java version “1.7.0_51&quot; &amp;nbsp; Java(TM) SE Runtime Environment (build 1.7.0_51-b13) &amp;nbsp; Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)&lt;/li&gt;
&lt;li&gt;OS: &amp;nbsp;Amazon Linux&lt;span class=&quot;s1&quot;&gt;&amp;nbsp;&lt;/span&gt;3.2.12-3.2.4.amzn1.x86_64&lt;/li&gt;
&lt;li&gt;MongoDB: &amp;nbsp;2.4.6 (hosted on another box)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
POM&lt;/h4&gt;
&lt;/div&gt;
&lt;div&gt;
Here are some of the managed dependencies from our POM:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;beanstalk .plugin.version=&quot;&quot;&gt;0.2.8&lt;/beanstalk&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;com .fasterxml.jackson.version=&quot;&quot;&gt;2.2.2&lt;/com&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;com .google.guava.version=&quot;&quot;&gt;14.0.1&lt;/com&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;commons .codec.version=&quot;&quot;&gt;1.8&lt;/commons&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;commons .collections.version=&quot;&quot;&gt;3.2.1&lt;/commons&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;commons .jexl.version=&quot;&quot;&gt;1.1&lt;/commons&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;java .version=&quot;&quot;&gt;1.7&lt;/java&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;joda-time .version=&quot;&quot;&gt;2.1&lt;/joda-time&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;querydsl .version=&quot;&quot;&gt;3.2.4&lt;/querydsl&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .apache.httpcomponents.version=&quot;&quot;&gt;4.2.5&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .aspectj.version=&quot;&quot;&gt;1.7.1&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .codehaus.mojo.jaxb.plugin.version=&quot;&quot;&gt;1.5&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .slf4j.version=&quot;&quot;&gt;1.7.2&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .springframework.version=&quot;&quot;&gt;3.2.3.RELEASE&lt;/org&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;org .springframework.data.commons.version=&quot;&quot;&gt;1.6.2.RELEASE&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .springframework.data.jpa.version=&quot;&quot;&gt;1.4.2.RELEASE&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .springframework.data.mongodb.version=&quot;&quot;&gt;1.3.2.RELEASE&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;org .springframework.security.version=&quot;&quot;&gt;3.1.4.RELEASE&lt;/org&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;mongo .java.driver.version=&quot;&quot;&gt;2.11.3&lt;/mongo&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;logback .version=&quot;&quot;&gt;1.0.13&lt;/logback&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1801462118388874363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2014/06/spring-data-infinite-loop-in-hashmap-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1801462118388874363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1801462118388874363'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2014/06/spring-data-infinite-loop-in-hashmap-in.html' title='Spring Data Infinite Loop in HashMap in PreferredConstructor and CustomConversions'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-8768220726901520176</id><published>2013-04-10T16:09:00.003-07:00</published><updated>2013-04-10T20:44:01.973-07:00</updated><title type='text'>How to Replace Volvo XC70 H11 Headlight Bulb 2004 2005 2006 2007 2008 SOLVED</title><content type='html'>Welcome, you are about to embark on a difficult journey. &amp;nbsp; :)&lt;br /&gt;
&lt;br /&gt;
You probably just got the indicator on your XC70 dash that says you have a burned out headlight. &quot;No problem, I&#39;ll just pop a new one in&quot; you say to yourself, as I did when just faced with this. This is where it gets weird.&lt;br /&gt;
&lt;br /&gt;
Believe it or not, Volvo engineers didn&#39;t really provide space for this when they designed the engine compartment layout. Depending on your year of Volvo XC70, you will perhaps find yourself cursing when you open the hood to size up what should be an easy repair.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSx34QBXeiZQy1txX_LuyYlQQaRJvodv7tlqeOYqvj3NZmJz5YR9arTQ2so6snDQsIjQwyEUGssDDE6spT4mkebh-4psSDKSxTGoF7Qal3IkFbjA0e9txmIw01cIRGt673LDteku3Gq-qR/s1600/volvo_headlight_engineer.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSx34QBXeiZQy1txX_LuyYlQQaRJvodv7tlqeOYqvj3NZmJz5YR9arTQ2so6snDQsIjQwyEUGssDDE6spT4mkebh-4psSDKSxTGoF7Qal3IkFbjA0e9txmIw01cIRGt673LDteku3Gq-qR/s1600/volvo_headlight_engineer.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Volvo Headlight Engineer&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&quot;What? I have to get my hands in &lt;b&gt;there&lt;/b&gt;?&quot; Since you landed on this page, I assume you have just uttered that quote and then ran to Google to help you figure out what to do next. This blog post will hopefully help you on the next part of journey.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
My Story - a 2006 Volvo XC70 with H11 Lights&lt;/h4&gt;
First: my story.&lt;br /&gt;
&lt;br /&gt;
I owned a 2002 Volvo XC70 until a few weeks ago when someone totaled it by ramming me in a parking lot. Sad. No worries, I just bought a replacement 2006 XC70. &lt;br /&gt;
&lt;br /&gt;
During the first week in my 2006 the driver side low beam went out, but I wasn&#39;t worried. Changing the bulbs (H7 type) in my 2002 was not a big deal and I expected the same for my 2006. But then I uttered the quote above. After Googling around to find the easy way to replace the bulb, and finding none, I gave up on the driver side low beam. I took it to my neighborhood shop and watched the technician there replace it.&lt;br /&gt;
&lt;br /&gt;
A few days later when the passenger low beam went out, I decided to replace it myself. The notes below relate to that project as I figured out how to do this myself.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
The Main Issues with XC70 Headlight Bulb Replacement&lt;/h4&gt;
&lt;b&gt;First issue:&lt;/b&gt; you have probably already discovered that access to the headlights is very much obstructed by other auto parts. I can&#39;t tell you which model years are affected - I just know that my 2006 is definitely this way, while my old 2002 was not.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Second issue:&lt;/b&gt; because of issue #1 you can&#39;t look into the headlight ports from inside the engine compartment. Which means you can&#39;t visually see how to take out the old bulb. Your hand will have to operate blindly.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Third issue:&lt;/b&gt;&amp;nbsp;What type of bulb do you have? Hard to know due to issue #2. You may have already read about some posts where people are talking about Bi-Xenon headlights. Do you have those, the H11 standard halogens, or the older H7 halogens? Bi-Xenon costs about $130 per bulb, apparently. H11&#39;s and H7&#39;s around $15. Its a big deal. I was afraid I just bought into a $130 repair. Fortunately I later learned that I am a H11 (also a Virgo, but that&#39;s irrelevant).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fourth issue: &lt;/b&gt;once you determine your bulb type, how do you blindly extract the old bulb?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Fifth issue: &lt;/b&gt;once the old bulb is out, how to you put the new one back in? Blindly.&lt;br /&gt;
&lt;br /&gt;
I could stop writing here, but then I would be a jerk. I have just told you all the problems, but none of the answers. OK, we are now getting to the good part. The answers.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Issue 1 : Obstructed Access&lt;/h4&gt;
The first issue is you cannot easily access the headlight ports from inside the engine compartment. The driver side is worse (although some posters say that passenger side is worse, I don&#39;t get that). It may depend on your model year, or options. Dunno.&lt;br /&gt;
&lt;br /&gt;
As you Google around, some folks recommend pulling out the &lt;a href=&quot;http://www.justanswer.com/volvo/4q9c2-volvo-xc70-suggestions-replacing-low-beam-headlight.html&quot;&gt;air filter assembly&lt;/a&gt; (driver side) or ECU (passenger side). I didn&#39;t see a super easy way to do that. The factory instructions apparently tell the technician to &lt;a href=&quot;http://www.volvoxc.com/forums/showthread.php?19304-2007-xc-low-beam-replace-are-you-kidding&quot;&gt;remove the front bumper&lt;/a&gt; (!) to get access to the headlights. Don&#39;t do that.&lt;br /&gt;
&lt;br /&gt;
My answer to the obstruction issue is &quot;just deal with it&quot;. For the driver side, I saw the technician do it at the shop by working his skinny arms around the obstructions. I did the passenger side without removing the ECU box. Though I did take the cover off the ECU to make myself feel like I tried; it didn&#39;t actually help me at all.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Issue 2 : Can&#39;t See Into the Headlight to Know How to Take out the Bulb&lt;/h4&gt;
The rest of this blog post will help you deal with this issue. I will tell you how to do this without being able to see into the headlight.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Issue 3: What Type of Bulb Do You Have? H11? Bi-Xenon?&lt;/h4&gt;
I am not an expert on this at all. I tried searching Google Images to help me sort out what I had. You may need to do the auto shop the first time to figure this out. That&#39;s how I resolved the question. If it helps, this is my H11 headlight picture below:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDNxlPUkIZD2aGKglwK4iwpSDxeNdLcG2TlJc3N8lvrB-LIjXMDb_cT8PzgqXgoPb-rerB35PETsB_5Bs5tWQBBRrwWZZnywXrO10HLTUZj7BEAmuAaAVm1AxkrRP0VM1ZoJiMrmeRPhIZ/s1600/headlight_front.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDNxlPUkIZD2aGKglwK4iwpSDxeNdLcG2TlJc3N8lvrB-LIjXMDb_cT8PzgqXgoPb-rerB35PETsB_5Bs5tWQBBRrwWZZnywXrO10HLTUZj7BEAmuAaAVm1AxkrRP0VM1ZoJiMrmeRPhIZ/s400/headlight_front.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Volvo XC70 H11 Headlight&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
My H11 has a shroud around it with a gray cap cylinder. There is also a small light bulb (parking light?) several inches away from the main bulb.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Issue 4: How to Remove the Old H11 Bulb?&lt;/h4&gt;
From here on out, my instructions are specific to H11 bulbs. Maybe it is of some use to Bi-Xenon folks, but maybe not that much.&lt;br /&gt;
&lt;br /&gt;
You need to remove the rubber cover (about 5&quot; diameter) that covers the low beam port inside the engine compartment. This is the easiest part of the whole ordeal. If you struggle with this, please slowly back away from the car, reach for those car keys, and drive your helpless soul to the nearest auto shop. The rest is much harder.&lt;br /&gt;
&lt;br /&gt;
The next step is to somehow reach your hand into the headlight port (easier said than done!). Its going to be a tight fit, especially on the driver side. If you can&#39;t do it, see references above to removing the air filter or ECU to make this easier. If you have big arms, that&#39;s probably your only option.&lt;br /&gt;
&lt;br /&gt;
The next step was really hard for me because I didn&#39;t know what to do with my hand once I got it into the port. The answer is actually pretty easy. You need to twist the old H11 bulb in the socket so that the tabs around the metal base unlock from the socket. See here:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidT5XuO20x5iVh532b77awYoziXdCJheaY-kdpXoxeAaY-Sn1x6lP4UZ2yjuqvDZDc42TEWBechyphenhyphenlLTSkz_cFr6wzzhVF8sr3vJPkt8M5VT2B9oD7iMGFjSmMHDAC-E6gf00DzWyD1mcAc/s1600/h11_withtabsshown.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidT5XuO20x5iVh532b77awYoziXdCJheaY-kdpXoxeAaY-Sn1x6lP4UZ2yjuqvDZDc42TEWBechyphenhyphenlLTSkz_cFr6wzzhVF8sr3vJPkt8M5VT2B9oD7iMGFjSmMHDAC-E6gf00DzWyD1mcAc/s1600/h11_withtabsshown.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
See those three tabs sticking out of the base? They are what locks the bulb into the socket. When you turn the bulb, it will somewhat easily unlock and you can pull the bulb out of the headlight port.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Wait!&lt;/b&gt; Its even easier than that. If you look into the headlight from the front (in front of the car, like a deer would) while you are twisting it you can actually see the tabs turning in the socket so you can see when they are disengaged. I don&#39;t remember if you turn clockwise or counter, but it shouldn&#39;t be too hard because you can watch them turn.&lt;br /&gt;
&lt;br /&gt;
At this point, you should have pulled the bulb assembly out of the port. The wire harness is still attached at this point.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiTHz7iabC49whOj0lKmsY0giz6m0Ir8lEBoAwSeHPTFkRawmO_p5HMuWgr-NyR9H1wZqSG9QeI0Er88AwTXHjfoXh7oj_qjAH0Qj9ZeiMmgo89_rV9x7GVjSlgTVoO9-3vvwn9CexbWS7/s1600/pulled_bulb_on_harness.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiTHz7iabC49whOj0lKmsY0giz6m0Ir8lEBoAwSeHPTFkRawmO_p5HMuWgr-NyR9H1wZqSG9QeI0Er88AwTXHjfoXh7oj_qjAH0Qj9ZeiMmgo89_rV9x7GVjSlgTVoO9-3vvwn9CexbWS7/s320/pulled_bulb_on_harness.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To unlock the old bulb from the harness, you just need to disengage the plastic tabs on either side of the H11 bulb connection. It sounds hard, but once you are in there it is obvious. Use a flat head screwdriver to gently pry open the tabs if you must. After that, you should have a dangling wire harness and one old H11 bulb in the trash can.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpjOefJIrJIIpJQoY0CT-Esb8jfTgPwzaPpoBnwf7dOq3tyLXS4-HAzmGVee4AUTQU9aU2-DnQPofxw4TFNjJYkLEV9T_ZBpFjQq5M0m78S_R9Zygd60h3ZK73Dh3pnFU9YNRO2xfSjC3R/s1600/wire_harness.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpjOefJIrJIIpJQoY0CT-Esb8jfTgPwzaPpoBnwf7dOq3tyLXS4-HAzmGVee4AUTQU9aU2-DnQPofxw4TFNjJYkLEV9T_ZBpFjQq5M0m78S_R9Zygd60h3ZK73Dh3pnFU9YNRO2xfSjC3R/s320/wire_harness.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4&gt;
Issue 5: Putting in the New Bulb&lt;/h4&gt;
This is more or less self explanatory, now that you know how the thing is supposed to fit together. The first wrinkle I will mention specifically is you need to have a glove on, preferably something thin like a latex. The reason is you don&#39;t want to soil the new bulb with your skin grease. When you are putting in the new bulb, you likely get your hands on the glass bulb, which apparently is not a good thing.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgClGRX5uHt2sPrmI7-PccfKAIgWdQMWhOLhCstGFIoZ7r-1qAUW_s3dUtE2njK-oUKuNopfLeF4xwg7avGVNl5JUBy7ZNe-0Fc-GvnTpxPEHPkgk2UuIUtniS-3xdurS7f5hkanLEWH1U8/s1600/new_bulb_h11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgClGRX5uHt2sPrmI7-PccfKAIgWdQMWhOLhCstGFIoZ7r-1qAUW_s3dUtE2njK-oUKuNopfLeF4xwg7avGVNl5JUBy7ZNe-0Fc-GvnTpxPEHPkgk2UuIUtniS-3xdurS7f5hkanLEWH1U8/s320/new_bulb_h11.jpg&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I am tempted to write &quot;and the rest is left as an exercise for the reader&quot;. Once you pull the old bulb out, you should have a really good idea on how to reverse the process. But I do need to tell you about two more things:&lt;br /&gt;
&lt;br /&gt;
You need to be looking into the headlight (like a deer, remember) to make sure the new bulb finds itself inside that gray shroud thing inside the headlight. The first time I did it, I had the bulb in cockeyed and the bulb was outside the shroud.&lt;br /&gt;
&lt;br /&gt;
Second, look into the headlight to help you engage the tabs and make sure you are turning it correctly. You want to double check that the tabs are engaged.&lt;br /&gt;
&lt;br /&gt;
Finally, don&#39;t forget to replace the rubber cover over the headlight port inside the engine compartment.&lt;br /&gt;
&lt;br /&gt;
DONE!&lt;br /&gt;
&lt;br /&gt;
If you found this post useful (or to the contrary) please add a comment below. Thanks! Please include your model year so we can track what models are difficult.</content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/8768220726901520176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2013/04/how-to-replace-volvo-xc70-h11-headlight.html#comment-form' title='30 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8768220726901520176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8768220726901520176'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2013/04/how-to-replace-volvo-xc70-h11-headlight.html' title='How to Replace Volvo XC70 H11 Headlight Bulb 2004 2005 2006 2007 2008 SOLVED'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSx34QBXeiZQy1txX_LuyYlQQaRJvodv7tlqeOYqvj3NZmJz5YR9arTQ2so6snDQsIjQwyEUGssDDE6spT4mkebh-4psSDKSxTGoF7Qal3IkFbjA0e9txmIw01cIRGt673LDteku3Gq-qR/s72-c/volvo_headlight_engineer.jpg" height="72" width="72"/><thr:total>30</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-559168589840258568</id><published>2011-02-14T12:44:00.001-08:00</published><updated>2011-02-14T13:00:42.905-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 – Noise and Phase Coupling Issues – Part 7</title><content type='html'>&lt;p&gt;This is part 7 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Parts 1 through 6 of this series has documented my initial installation and configuration of my X10 system and devices. I have been covering these topics and issues in the order in which I have encountered them. For anyone wishing to follow this same path in their own implementation, this order is important.&lt;/p&gt;  &lt;h4&gt;First, the Good News&lt;/h4&gt;  &lt;p&gt;In the order of events, at this point you should have a working system with a couple of modules if your experience is like mine. This is good.&lt;/p&gt;  &lt;h4&gt;Now, the Bad News&lt;/h4&gt;  &lt;p&gt;Likewise, if your experience is like mine, now is about the time you need to build an awareness of two systemic issues with X10 systems. Since I am still learning myself, I cannot say for certain that I have been afflicted by them. But the evidence is strong.&lt;/p&gt;  &lt;p&gt;First, try to understand the issues at a high level:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href=&quot;http://kbase.x10.com/wiki/Phase_Coupling&quot;&gt;Phase Coupling&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://kbase.x10.com/wiki/Noise_Filters_and_Automatic_Gain_Control&quot;&gt;Noise&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In a nutshell, both contribute to signal strength issues. When in play, both will unpredictably affect how well your modules can hear the controller signals. Either it will be an utter failure (which, I would prefer), or will cause random (and frustrating) failures. &lt;/p&gt;  &lt;h4&gt;Wimp out for now&lt;/h4&gt;  &lt;p&gt;Now that you have a high level awareness under your belt, I would recommend strategies to avoid them until we progress (you and me both!) further in our implementation before we eventually diagnose and implement solutions for them.&lt;/p&gt;  &lt;p&gt;Strategies I am currently using to keep things simple:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Pay attention to what household appliances are operating while you test. Vacuum cleaner? Dryer? Try to test during “quiet” electrical periods.&lt;/li&gt;    &lt;li&gt;Locate your module under test in the same room as your controller while testing. I know this isn’t realistic for actual deployment, but its good to eliminate noise as much as possible. &lt;/li&gt;    &lt;li&gt;Rinse and repeat. When something works, try it several more times before declaring success. Wait for 15 minutes, and then try again. &lt;/li&gt;    &lt;li&gt;Be anal in your methodology. Its no fun to waste minutes pointlessly clicking buttons in ActiveHomePro only to find out a light bulb is burned out. Test your device prior to integrating with a module.&lt;/li&gt;    &lt;li&gt;Steer clear of advanced use cases, such as CFL or 220V appliances. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Trouble&lt;/h4&gt;  &lt;p&gt;So that we can compare notes, here are the issues I have hit. I haven’t done a full troubleshooting exercise yet, so these are unconfirmed diagnosis.&lt;/p&gt;  &lt;p&gt;As a basis of understanding, my “test room” is my home office in my basement. My controller, ActiveHomePro computer, and modules are first deployed here and tested. I have no issues currently getting any module to work inside the room. Outside of the room…. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Phase Coupling Issue? &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;When I moved a SocketRocket to an upstairs lamp, it stopped responding completely.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Noise Issue?&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;When I moved the SocketRocket to a light socket outside of the test room in the basement, it sometimes works, sometimes not.&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:478d123a-da53-4099-a36f-70f9f4e1b3d1&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/x10&quot; rel=&quot;tag&quot;&gt;x10&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/559168589840258568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-noise-and-phase-coupling-issues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/559168589840258568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/559168589840258568'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-noise-and-phase-coupling-issues.html' title='X10 – Noise and Phase Coupling Issues – Part 7'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-5460933022415748974</id><published>2011-02-14T10:23:00.001-08:00</published><updated>2011-02-14T13:31:29.813-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 – Compact Fluorescents (CFLs) Support and X10 Modules – Part 6</title><content type='html'>&lt;p&gt;This is part 6 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I have already covered a couple of lighting topics in my X10 series. In &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-programming-socketrocket-using.html&quot;&gt;my last post&lt;/a&gt;, I talked through the steps of setting up an X10 SocketRocket using ActiveHomePro. In &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-installing-my-first-device-part-3.html&quot;&gt;another previous post&lt;/a&gt;, I discussed how to setup up a Lamp Module. But I haven’t yet specifically talked about CFLs and X10, and how they play together (and don’t).&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd2JjBo_2qVkhMFGqvR_qZs5BnmqCiSDk9Z3uan3xRANX6X1zaJ69LMTnOgHx6uDR-A2RueOtdxmVmEvMa8rXXBai57ZAvUWGy4L1ltigDaQBMYjMKpHxDidJB9bSO3-dhyphenhyphennIM-pTH2Lx6/s1600-h/x10_socketrocket_cfl%5B3%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;X10 SocketRocket with CFL&quot; border=&quot;0&quot; alt=&quot;X10 SocketRocket with CFL&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3w_I-iCk8g4qiJtO0VKy0QmtAUnthVXZn_yxbSTCC-H7FgDIBLGYfAgf1PZx0LDuQwJEePgK56xcLPp9dpDmyl0oIZsvoYf1F7P6dE0bncUt2_etOByuPKd2AoLsaO1aKCoBcbEKCePnZ/?imgmax=800&quot; width=&quot;454&quot; height=&quot;343&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The key thing is that X10 supports CFLs if you have the right gear. For me, its been a bit of a research project to figure out what I need, and also what I might be able to get away with.&lt;/p&gt;  &lt;h4&gt;Why CFLs are Important for X10 Applications&lt;/h4&gt;  &lt;p&gt;As I started to think about what lights I wanted to automate with my X10 system, I quickly realized that the lights needing automation were these types of lights:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Security/outdoor lights that need to be on at night &lt;/li&gt;    &lt;li&gt;Indoor hallway lights that I want to conveniently turn off with one button press before going to bed &lt;/li&gt;    &lt;li&gt;Indoor basement lights that I want to turn off proactively in case someone left them on&amp;#160;&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In all cases, these are lights that will be on for extended periods of time. As such, they are ideal candidates for CFLs to save energy. And I think my use cases are common, so CFL support is critical to X10.&lt;/p&gt;  &lt;h4&gt;Support for CFLs with X10 Modules&lt;/h4&gt;  &lt;p&gt;At this point in my journey, I do not have definitive answers about this topic. There is the official guidance and official support statements, and then user forum postings that sometimes claim something different. I apologize for not having definitive answers, but I wanted to post this to record this as an important topic in the learning process. I hope to follow up later with more information if it differs from what is below.&lt;/p&gt;  &lt;p&gt;In general, I assume a module does not support CFL unless explicitly stated otherwise. In fact, modules will explicitly deny support for CFLs unless they do, which is helpful.&lt;/p&gt;  &lt;p&gt;For example, modules that explicitly &lt;strong&gt;do not support&lt;/strong&gt; &lt;strong&gt;CFL&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Lamp Module LM465      &lt;ul&gt;       &lt;li&gt;Label disclaimer: &lt;em&gt;“For indoor incandescent lamps only&lt;/em&gt; &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Light switches WS467 and WS12A      &lt;ul&gt;       &lt;li&gt;&lt;a href=&quot;http://kbase.x10.com/wiki/Fluorescent_Lights&quot;&gt;X10 Wiki&lt;/a&gt;: “(WS467 and WS12A) should NOT be used” &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;SocketRocket LM15a      &lt;ul&gt;       &lt;li&gt;Printed instructions disclaimer: &lt;em&gt;“Do NOT use with fluorescent lamps!”&lt;/em&gt; &lt;/li&gt;        &lt;li&gt;But, my own quick test indicates it works with my brand of CFL (Bright Effects L13T6) &lt;/li&gt;        &lt;li&gt;But, forums claiming they work:          &lt;ul&gt;           &lt;li&gt;&lt;a href=&quot;http://forums.x10.com/index.php?topic=10998.0&quot;&gt;Topic: How Can I Control CFL Bulbs (Inexpensively!)?&lt;/a&gt; &lt;/li&gt;            &lt;li&gt;&lt;a href=&quot;http://forums.parallax.com/archive/index.php/t-118118.html&quot;&gt;X10 -- Socket Rocket w/ CFL&lt;/a&gt; &lt;/li&gt;         &lt;/ul&gt;       &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;And then there are those that explicitly &lt;strong&gt;support CFL&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Appliance Module AM466      &lt;ul&gt;       &lt;li&gt;&lt;a href=&quot;http://www.x10.com/promotions/am466_ed_twenty_0426.html&quot;&gt;X10.com Adware&lt;/a&gt;: &lt;em&gt;“This simple plug-n-play module lets you control normal lamps, CFL lamps, fans, radios, coffee pots…”&lt;/em&gt; &lt;/li&gt;        &lt;li&gt;Use instead of LM465 &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Light switches WS13a and XPS3      &lt;ul&gt;       &lt;li&gt;&lt;a href=&quot;http://kbase.x10.com/wiki/Fluorescent_Lights&quot;&gt;X10 Wiki&lt;/a&gt;: “To control fluorescent fixtures use the X10 Non-dimming Decorator Wall Switch (WS13A) or X10 Pro Non-dimming Wall Switch (XPS3)” &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Socket module      &lt;ul&gt;       &lt;li&gt;There does not appear to be an inline-socket solution, probably due to the 2 wire nature of a socket (see next section) &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Engineering Explanation&lt;/h4&gt;  &lt;p&gt;The &lt;a href=&quot;http://kbase.x10.com/wiki/Fluorescent_Lights&quot;&gt;X10 wiki&lt;/a&gt; provides a good explanation of the reason why CFL support with X10 is an issue:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“The main reason why standard X10 wall switch modules cannot be used to control a fluorescent fixture is because it is a two-wire device and is therefore wired in series with the load. The control signals which are transmitted onto your house wiring have to pass through the incandescent lamp (load). However, a fluorescent light contains a ballast which acts as a block to the X10 signals and makes it impossible to control the switch remotely. Also, this ballast is an inductive load (a coil), and controlling such a load could permanently damage the wall switch module. This is why the standard X10 wall switches (WS467 and WS12A) should NOT be used to control any kind of appliance (such as a ceiling fan).”&lt;/p&gt; &lt;/blockquote&gt;  &lt;h4&gt;Conclusion&lt;/h4&gt;  &lt;p&gt;The bottom line is that CFLs can cause issues with any two wire module, but may not always. I suppose it is up to the homeowner to decide whether to use the two wire modules and see what happens.&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:93dd793c-88d1-43c7-99cd-4ea625610003&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/x10&quot; rel=&quot;tag&quot;&gt;x10&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/5460933022415748974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-compact-fluorescents-cfls-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5460933022415748974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5460933022415748974'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-compact-fluorescents-cfls-support.html' title='X10 – Compact Fluorescents (CFLs) Support and X10 Modules – Part 6'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3w_I-iCk8g4qiJtO0VKy0QmtAUnthVXZn_yxbSTCC-H7FgDIBLGYfAgf1PZx0LDuQwJEePgK56xcLPp9dpDmyl0oIZsvoYf1F7P6dE0bncUt2_etOByuPKd2AoLsaO1aKCoBcbEKCePnZ/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-8672035294601174608</id><published>2011-02-14T09:04:00.001-08:00</published><updated>2011-02-14T13:20:54.022-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 Programming a SocketRocket using ActiveHomePro and Controller CM15a Remote Chime – Part 5</title><content type='html'>&lt;p&gt;This is part 5 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-do-not-plug-appliance-into-lamp.html&quot;&gt;previous entry&lt;/a&gt;, I explained how I blew up an old radio by using a Lamp Module instead of an Appliance Module (oops). In this entry, I will explain how to easily program a SocketRocket. The details unfortunately were not forthcoming in its documentation.&lt;/p&gt;  &lt;h4&gt;The Theory&lt;/h4&gt;  &lt;p&gt;This is how the SocketRocket picks up new programming:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Find a lamp that you wish to control over X10 &lt;/li&gt;    &lt;li&gt;Switch it on so that the lightbulb is lit, just to test it works &lt;/li&gt;    &lt;li&gt;Switch off the light &lt;/li&gt;    &lt;li&gt;Unscrew the lightbulb &lt;/li&gt;    &lt;li&gt;Screw in the SocketRocket, and then the lightbulb into the SR &lt;/li&gt;    &lt;li&gt;Switch on the lamp. The lightbulb will probably not be lit &lt;/li&gt;    &lt;li&gt;For the next 30 seconds the SocketRocket is waiting for its signal to program itself &lt;/li&gt;    &lt;li&gt;After 30 seconds, the SR will either be programmed or left in this unknown state &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Item 7 is the key part. What is the SR waiting for? It is waiting to see the same X10 command 3 times in a row. If it sees that, it will assume it is targeted at the SocketRocket and will persist that address. That address will persist even if there is a power failure.&lt;/p&gt;  &lt;h4&gt;The Practice – How to do it with Controller CM15a and ActiveHomePro&lt;/h4&gt;  &lt;p&gt;The printed instructions didn’t explain how to program the device with the CM15a. I had to google it to &lt;a href=&quot;http://forums.x10.com/index.php?topic=18803.0&quot;&gt;find the best way&lt;/a&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open ActiveHomePro &lt;/li&gt;    &lt;li&gt;Click the Other link in the left pane &lt;/li&gt;    &lt;li&gt;Drag a “Remote Chime” to whatever room you want &lt;/li&gt;    &lt;li&gt;Set the address of the Chime to be whatever you wish the lamp to listen on (e.g. A14) &lt;/li&gt;    &lt;li&gt;Power on the lamp with SocketRocket &lt;/li&gt;    &lt;li&gt;In the next 30 seconds, hit the Remote Chime control 3 times in ActiveHomePro &lt;/li&gt;    &lt;li&gt;The lightbulb should now be lit &lt;/li&gt;    &lt;li&gt;Now add a SocketRocket Module to the same room. &lt;/li&gt;    &lt;li&gt;Change the new SR module address to match the Remote Chime &lt;/li&gt;    &lt;li&gt;Delete the Remote Chime &lt;/li&gt;    &lt;li&gt;Manually power off the lamp with the SocketRocket, wait 10 seconds &lt;/li&gt;    &lt;li&gt;Manually power on the lamp &lt;/li&gt;    &lt;li&gt;Test again to make sure the settings stuck &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKpCzj7ItieM-9BSuNsT8B-fVyS2_n0X7P9XvfBA8HzUwlt7MFtkWDL0nIahn2HSuj7PC54d9u9rOLDgfiBYqFb3ypkIhlo9qEvv5j4PQgOp74irSqAjEnc7jDF78uXhspYkLOAYFdK1Xp/s1600-h/activehomepro_remotechime%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;activehomepro_remotechime&quot; border=&quot;0&quot; alt=&quot;activehomepro_remotechime&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNNd5qggUvjhLOW7Rp0n2X19PnWY7A55b-1i7EvGuqCu7QjIvlwo0v0RHdtzb7-AngSjmX3zgs_3We3jPaN9cfRRYNeb1T4qmzaZViEnbyjjF1XpfhjtjTdejBbUYt5_AiRVJqWjOEIBL1/?imgmax=800&quot; width=&quot;454&quot; height=&quot;428&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;As with any X10 device, this procedure may fail if there are connectivity issues between the controller and module. Follow my advice &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-noise-and-phase-coupling-issues.html&quot;&gt;in this future post&lt;/a&gt; if you are at this point and cannot get your gear working.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:0cb1a6a5-21b0-479f-8611-4c88ba76d937&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/x10&quot; rel=&quot;tag&quot;&gt;x10&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/8672035294601174608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-programming-socketrocket-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8672035294601174608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8672035294601174608'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-programming-socketrocket-using.html' title='X10 Programming a SocketRocket using ActiveHomePro and Controller CM15a Remote Chime – Part 5'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNNd5qggUvjhLOW7Rp0n2X19PnWY7A55b-1i7EvGuqCu7QjIvlwo0v0RHdtzb7-AngSjmX3zgs_3We3jPaN9cfRRYNeb1T4qmzaZViEnbyjjF1XpfhjtjTdejBbUYt5_AiRVJqWjOEIBL1/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-8652990430116071096</id><published>2011-02-14T06:19:00.001-08:00</published><updated>2011-02-14T13:22:47.070-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 Do Not Plug an Appliance into a Lamp Module – Part 4</title><content type='html'>&lt;p&gt;This is part 4 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is an immediate follow up to my previous post about getting my first X10 up and running: &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-installing-my-first-device-part-3.html&quot;&gt;X10 Installing My First Device – Part 3&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;My Radio as a Lamp&lt;/h4&gt;  &lt;p&gt;At the end of that post, I proudly declared success in getting a device wired up via X10 so that I could do home automation. I plugged an old radio of mine into a Lamp Module (LM465) and was happy to see it work. Not that I am not planning to actually automate my old radio, I just needed a device that could be used for testing.&lt;/p&gt;  &lt;p&gt;And it is probably fortunate that I did, because I learned a very important lesson.&lt;/p&gt;  &lt;p&gt;On the bottom of the Lamp Module, it says clearly:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Lamps Only! No Appliances!!!&lt;/strong&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Like all engineers, I tend to ignore those types of warnings if I think I understand the core issue behind it and feel like it does not apply. I thought it was worried about power draw. I figured it was making sure someone wouldn’t plug in a 1500W heater into this small 300W relay.&lt;/p&gt;  &lt;p&gt;My 12W radio, no problem.&lt;/p&gt;  &lt;h4&gt;The Radio is dead. I repeat, the Radio is Dead.&lt;/h4&gt;  &lt;p&gt;I don’t think its just about the power. About 10 minutes after plugging in my 15 year old trusty radio and hearing it play music, it made a quick dying gasp and then went silent. I can’t revive it by any means, even now an hour after the event. Its dead, dead. Trash bin dead.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbX1KoEAJKWc2uNQbhvlItU5IVA6tb5DZHldv8aGYrfeBh1MzJyBO_2skGu-EMgcTxv_lm3RnhwbONY0a6GeK4T6hPjsWHWO-22C8PHqXNgKOLJldx3mJuH8E0o9KT7LmhIsE93xM8y2AD/s1600-h/radio_in_trash_bin%5B4%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;radio_in_trash_bin&quot; border=&quot;0&quot; alt=&quot;radio_in_trash_bin&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy2jBZwdm13gKY0qgJoKZB_NU6_SBt6vkACvnDzboxKZ25-on2zGWXjHOlLiz2Ki4siub9_V9wqnG8v9t0RR9fajN16Uex_AJBTJrh1wVGt3VTFAm37w25xG-XU_YROjNOnS5BLaXqRprp/?imgmax=800&quot; width=&quot;454&quot; height=&quot;343&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;OK, maybe that warning is something I should have paid attention to. Perhaps its not JUST about the power. After playing with the Lamp Module some more with actual lamps (genius!) I think there may be something else behind that warning.&lt;/p&gt;  &lt;p&gt;The Lamp Module LM 465 has a dimmer function on it. I wonder if something in that circuitry caused the radio to freak out. I don’t know why it would after 10 minutes (on startup, ok), but what else could it be? It could be just some crazy coincidence that the radio died now, but after 15 years of solid service its hard to believe.&lt;/p&gt;  &lt;h4&gt;Cheap Lesson Learned&lt;/h4&gt;  &lt;p&gt;The old radio was worth about $2 if I tried to sell at garage sale. Not a loss. But now I think I will adhere to the Lamps Only warning sticker before I try plugging in something of more value. I will stick to the Appliance Modules AM466 for now on.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/8652990430116071096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-do-not-plug-appliance-into-lamp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8652990430116071096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8652990430116071096'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-do-not-plug-appliance-into-lamp.html' title='X10 Do Not Plug an Appliance into a Lamp Module – Part 4'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy2jBZwdm13gKY0qgJoKZB_NU6_SBt6vkACvnDzboxKZ25-on2zGWXjHOlLiz2Ki4siub9_V9wqnG8v9t0RR9fajN16Uex_AJBTJrh1wVGt3VTFAm37w25xG-XU_YROjNOnS5BLaXqRprp/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1555130454143916441</id><published>2011-02-14T05:54:00.001-08:00</published><updated>2011-02-14T13:29:31.996-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 Installing My First Device – Part 3</title><content type='html'>&lt;p&gt;This is part 3 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-installing-activehomepro-on-ubuntu.html&quot;&gt;Part 2&lt;/a&gt;, I talked about installing ActiveHomePro and the CM15a controller. In this part, I will talk about getting my first device running over X10.&lt;/p&gt;  &lt;h4&gt;Step 1: Pick an X10 Lamp Module LM465&lt;/h4&gt;  &lt;p&gt;For your first device you could choose any of your modules, but the Lamp Module seems to be the obvious choice. Even ActiveHomePro (AHP) guides you to pick the LM465 as the first one to try.&lt;/p&gt;  &lt;h4&gt;Step 2: Find a Guinea Pig LM465 Device&lt;/h4&gt;  &lt;p&gt;The next step in testing out your X10 system is to find a good guinea pig device. It should have the following characteristics:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Two prong power form factor &lt;/li&gt;    &lt;li&gt;300W max consumption &lt;/li&gt;    &lt;li&gt;Visually obvious if it turns on/off &lt;/li&gt;    &lt;li&gt;Probably should be a lamp (&lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-do-not-plug-appliance-into-lamp.html&quot;&gt;see later post why!&lt;/a&gt;) &lt;/li&gt;    &lt;li&gt;If it is a lamp, must not have a CFL bulb in it (see later post) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I observed the first three, and ignored the fourth (to my detriment). For my purposes, an old radio was the easiest thing to muster and so I pressed it into service.&lt;/p&gt;  &lt;h4&gt;Step 3: Find a Suitable Test Outlet&lt;/h4&gt;  &lt;p&gt;Not only do you need a device, you also need an outlet;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Plugged into an outlet in same room as you and CM15a &lt;/li&gt;    &lt;li&gt;Is powered on      &lt;ul&gt;       &lt;li&gt;Circuit breaker is not tripped &lt;/li&gt;        &lt;li&gt;If wall switched, switch is on &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Step 4: Make sure device is Switched On and outlet is Powered On&lt;/h4&gt;  &lt;p&gt;Once you have your device, make sure it is &lt;strong&gt;switched on&lt;/strong&gt; by plugging it directly into the chosen outlet. This is obvious, but I can imagine someone spending time wrestling with X10 only to find that the device is &lt;strong&gt;switched off &lt;/strong&gt;or the outlet is &lt;strong&gt;powered off&lt;/strong&gt;.&lt;/p&gt;  &lt;h4&gt;Step 5: Plug device into Lamp Module LM465&lt;/h4&gt;  &lt;p&gt;Now, plug the LM465 into the wall, and the device into the LM465. The device is likely &lt;strong&gt;powered off&lt;/strong&gt; at this moment. Also, the LM465 should be set to A1 on its dials.&lt;/p&gt;  &lt;h4&gt;Step 6: Try to Power Device On/Off via ActiveHomePro&lt;/h4&gt;  &lt;p&gt;Go back to AHP. By default, there is a room called &lt;em&gt;My Room&lt;/em&gt; and it has a lamp named &lt;em&gt;My Lamp&lt;/em&gt; configured as &lt;strong&gt;A1&lt;/strong&gt;. You should now be able to power the lamp on and off by clicking on the switch in AHP. Did it work? It did for me.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_jd042vUYOjV6khzEMnAxuQVgoKHa-zNc3GWRMKgUoD6Uf7kUrT2fbTDdULb92E-rVg24wvjuhI2tl-AvMu0mrCZA7pmT0gYplbsZW1cnAFhM6NzfL9af_TAWauGzV03a0RRPzkbpQV7Y/s1600-h/x10_activehomepro_firstmodule%5B3%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;X10 first module installation&quot; border=&quot;0&quot; alt=&quot;X10 first module installation&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEbjOgG3jywCIb-U-T_RMZm5mt1C3w20bNSLMbZXs9AledJW_PZVHKVUEWM1aa4muW7l03MJw9ADKRhMlVafIeVT7lEXh8n8eZj2jnkj_mQMBejP8GP9wcmXek6IlcbSJNcDemUZuGyXel/?imgmax=800&quot; width=&quot;343&quot; height=&quot;454&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h4&gt;Step 7: Enjoy Success (or not)&lt;/h4&gt;  &lt;p&gt;While I have done this task a million times with ZigBee gear, this was my first X10 device. Glad to see it actually work!&lt;/p&gt;  &lt;p&gt;Not working for you? Follow my advice &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-noise-and-phase-coupling-issues.html&quot;&gt;in this future post&lt;/a&gt; for some ideas on how to simplify your environment to get some success early.&lt;/p&gt;  &lt;h4&gt;Footnote: Switched vs. Powered&lt;/h4&gt;  &lt;p&gt;In my notes above, you will notice I used two words to talk about the state of the device.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Switched on/off&lt;/strong&gt; – means how the device was configured to operate using the device’s controls. For a lamp, this is the switch located on the lamp. For an outlet attached to a wall switch, it means that the wall switch is on/off. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Powered on/off&lt;/strong&gt; – means whether the device was receiving power. When plugged directly into an active outlet, it is always powered on. When plugged into an X10 module, it is powered on when the module has been commanded to turn the device on. &lt;/li&gt; &lt;/ul&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1555130454143916441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-installing-my-first-device-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1555130454143916441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1555130454143916441'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-installing-my-first-device-part-3.html' title='X10 Installing My First Device – Part 3'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEbjOgG3jywCIb-U-T_RMZm5mt1C3w20bNSLMbZXs9AledJW_PZVHKVUEWM1aa4muW7l03MJw9ADKRhMlVafIeVT7lEXh8n8eZj2jnkj_mQMBejP8GP9wcmXek6IlcbSJNcDemUZuGyXel/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-6352708508320631963</id><published>2011-02-14T05:10:00.001-08:00</published><updated>2011-02-14T13:24:51.561-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 Installing ActiveHomePro on Ubuntu Linux – Part 2</title><content type='html'>&lt;p&gt;This is part 2 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/x10-order-has-arrived-part-1.html&quot;&gt;Part 1&lt;/a&gt;, I talked about the X10 kit I purchased. In this part, I will talk about getting the software up and running.&lt;/p&gt;  &lt;h4&gt;Windows VirtualBox Virtual Machine&lt;/h4&gt;  &lt;p&gt;The title is a teaser if you are a Linux user. No, I didn’t actually try to use Wine to run ActiveHomePro natively on Linux. I can’t tell you if that works (it probably does?). I have a Windows VM for VirtualBox that I use for all Windows stuff, as I did for ActiveHomePro.&lt;/p&gt;  &lt;h4&gt;Installation&lt;/h4&gt;  &lt;p&gt;After you purchase your kit, they send you a link for the software download and the license key. Use the link to download the software to Windows, and use the license key at startup to register your wares. &lt;/p&gt;  &lt;p&gt;You do need to have your CM15a plugged in via USB (and plugged into the wall) during installation. Apparently it guides the installer to lay down the right device driver. I didn’t test without it, and maybe it just works anyway? &lt;/p&gt;  &lt;p&gt;Note: for VirtualBox users, make sure you allow the VM to access the X10 USB device:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Devices –&amp;gt; USB –&amp;gt; X10 USB Interface &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Installation Trouble&lt;/h4&gt;  &lt;p&gt;I hit my first hiccup after getting into the ActiveHomePro (AHP) UI. Everything seemed ok, but I tried the Intro Wizard:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Help –&amp;gt; Run Intro Wizard… &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;and it told me that it could not communicate with the CM15a. I opened the System Device Manager&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Windows Start –&amp;gt; Control Panel –&amp;gt; System –&amp;gt; Hardware &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;and noticed there was an exclamation point next to the USB device. I tried updating the driver with the one installed here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;C:\Program Files\Common Files\X10\DriverInstall\Wireless Transceivers &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;but that didn’t do anything. I noticed VirtualBox’s USB support was in a weird state (USB submenu wouldn’t render anymore) so did a full reboot of the Windows VM and CM15a. &lt;/p&gt;  &lt;p&gt;Just my luck, everything came up ok. So I am off and running.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhojOnGygmiMdiSFaJ9gIQvyRl4BFjCnoT48jfwlJ-DydGDfcWw6JJR66fy-ntUIVe75sNEeRygbwWJwzhOFWXF0xUvn3U7fWdsllTWOgH_39MYxZ3pEVF0-9vJ9E19w4rkt5e3TF6r-8x/s1600-h/activehomepro_talkingtocontroller%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;activehomepro_talkingtocontroller&quot; border=&quot;0&quot; alt=&quot;activehomepro_talkingtocontroller&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lh0eX2Hz7CZkk4geC0zxWsYIsewzUrFiBfxTTSCElWFjnA6Wk96r0HJ-7-RFsI7_QwkzTDdxd3za4_FGhyphenhyphen5clCY6OrmJO3KOnOfjDxW22BEbsBv-W4dUAymGv7-Qsgx8Rz9W2-JrJTaF/?imgmax=800&quot; width=&quot;454&quot; height=&quot;441&quot; /&gt;&lt;/a&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/6352708508320631963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-installing-activehomepro-on-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/6352708508320631963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/6352708508320631963'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-installing-activehomepro-on-ubuntu.html' title='X10 Installing ActiveHomePro on Ubuntu Linux – Part 2'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_lh0eX2Hz7CZkk4geC0zxWsYIsewzUrFiBfxTTSCElWFjnA6Wk96r0HJ-7-RFsI7_QwkzTDdxd3za4_FGhyphenhyphen5clCY6OrmJO3KOnOfjDxW22BEbsBv-W4dUAymGv7-Qsgx8Rz9W2-JrJTaF/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1152853503902481551</id><published>2011-02-14T04:55:00.001-08:00</published><updated>2011-02-14T13:16:45.375-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>X10 Order has Arrived – Part 1</title><content type='html'>&lt;p&gt;This is part 1 of my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html&quot;&gt;X10 blog series&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;My X10 order arrived without issue. I hated their website, and had trouble weeding through the garbage to compare the different kits they had available. It looks like they just did a &lt;a href=&quot;http://x10.com/homepage.htm&quot;&gt;full redesign&lt;/a&gt; of their site, so perhaps future visits won’t be as painful.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVuOrIostcq7JeP_jzaUf2yp_vFaIOmt3v9n3tqmZzSOGIvD_fV_ablASCLqJGjmsYaD90ETEHmlCetBIeubahOzU3PkIkrHJSG_lKyZNLkxRhHRei74rdh8uhT4nfpCKGmCxVEjPWhB8d/s1600-h/x10_kit_99dollars_cm15a%5B4%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;X10 Kit with CM15a, AM466, KR19a, LM15A, LM465, SS13A&quot; border=&quot;0&quot; alt=&quot;X10 Kit with CM15a, AM466, KR19a, LM15A, LM465, SS13A&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQhpnfT5i8rph5peswZ2IP5QCaj1onKZN5jUf57qwVye-IfJ7H_pY3i7PHxWnPy1ji-HZW47ttwi_HZmyDkk2SPlqZ7r6A5vTKAZqsyNLYKG1KAXt_liS-iRuaVGt7ODMDzE-wA0poDndr/?imgmax=800&quot; width=&quot;454&quot; height=&quot;343&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I finally decided on the following package for $99:&lt;/p&gt;  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;400&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Part&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Qty&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;AM466&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;         &lt;p&gt;3-pin Appliance Module&lt;/p&gt;       &lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;CM15a&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ActiveHome Pro Computer Interface and USB cable&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;1&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;KR19a&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;SlimFire Pocket Remote&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;1&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;LM15A&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;Screw-in Lamp Module&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;LM465&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;Lamp Module&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;2&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;SS13A&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;Slimline Switch Decorator White&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;2&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The key piece is the CM15a. It is the brains behind the system. The rest just seemed like bare minimum for useful pieces to have in the kit. You can go with less.&lt;/p&gt;  &lt;p&gt;The order arrived swiftly and had the right stuff. My only complaint about the order process is that it opens your email account to a barrage of marketing emails. The count is 14 emails in less than a month. I just opted out, so I expect that solves it. Who would want that crap? &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1152853503902481551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-order-has-arrived-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1152853503902481551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1152853503902481551'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/x10-order-has-arrived-part-1.html' title='X10 Order has Arrived – Part 1'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQhpnfT5i8rph5peswZ2IP5QCaj1onKZN5jUf57qwVye-IfJ7H_pY3i7PHxWnPy1ji-HZW47ttwi_HZmyDkk2SPlqZ7r6A5vTKAZqsyNLYKG1KAXt_liS-iRuaVGt7ODMDzE-wA0poDndr/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-2483139715981800563</id><published>2011-02-14T04:39:00.001-08:00</published><updated>2011-02-14T04:56:15.272-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="x10"/><title type='text'>Adventures with X10 – the Start</title><content type='html'>&lt;p&gt;This is the first blog post about my installation and use of X10 home automation technology. I am hoping to discover interesting things about both X10 as a technology and home automation in general.&lt;/p&gt;  &lt;h4&gt;my background&lt;/h4&gt;  &lt;p&gt;I actually work for a company (Tendril) that engineers and sells home automation technology. However, you would never hear us call it that because the phrase &lt;em&gt;home automation&lt;/em&gt; is normally used by vendors who focus on coordination of home devices for the purpose of comfort, convenience, and safety. Technologies such as X10 and Insteon are common in this arena.&lt;/p&gt;  &lt;p&gt;Tendril’s home automation is instead focused on energy efficiency and energy grid optimization. Meaning, we build gear that helps consumers monitor and moderate their energy use. Also, in cases where consumers have opted into a program, utilities can make use of this automation to curtail demand during periods of critical grid load. This isn’t a blog for my employer, so I will end my explanation here - more details are on &lt;a href=&quot;http://www.tendrilinc.com&quot;&gt;our website&lt;/a&gt; if you are interested.&lt;/p&gt;  &lt;p&gt;The reason my employment is relevant is that we use a wireless technology called ZigBee to coordinate the activities of home devices. ZigBee is used heavily in the energy space, so it is the natural choice for our purposes. But from time to time other technologies are discussed, from wireless (e.g. Z-wave, wifi) to wireline (e.g. HomePlug). The firmware engineers at Tendril are well versed in these technologies, but me as an enterprise software platform engineer have been so far left out of that party.&lt;/p&gt;  &lt;h4&gt;The Journey&lt;/h4&gt;  &lt;p&gt;I decided to start trying other home automation technologies just to see how things go. Additionally, I wanted to play with traditional &lt;em&gt;home automation&lt;/em&gt; outside of the energy space to see what I have been missing. &lt;/p&gt;  &lt;p&gt;Which, long winded, arrives at the point of this blog post. I am embarking on such a journey with X10 equipment. I have purchased my gear, and will start posting notes as I make progress (or lack thereof). No surprises if you see a lack of activity with this hobby. I fully expect to pick this up in waves, just like everything else in my busy household.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/2483139715981800563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2483139715981800563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2483139715981800563'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2011/02/adventures-with-x10.html' title='Adventures with X10 – the Start'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1254494882946136995</id><published>2010-05-31T21:31:00.001-07:00</published><updated>2010-05-31T21:31:50.555-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="engineering"/><title type='text'>My $1 Plastic Toy Car has a Metal Flywheel and a Plastic Gearbox</title><content type='html'>&lt;p&gt;One of the greatest things about being a parent is the ability to relive your own childhood – often vicariously as you watch your own children experience life with fresh eyes. But with toys, we get to experience childhood again firsthand. I believe the electric train and R/C car toy markets exist principally to cater to the fathers rather than the children. I know my dad spent much more time setting up and working the electric train table than us kids. But this is hardly the point of this blog post.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyCGZrRaRNiH7A9gXfzqf4l4e8kfQOCvH9HMhDvyQxxTMajgyBOHVhCajl2YLxtM1hk-FQMCtUbEfwf7FgywcB0pLqn-emT-fe1twPbOE_UtrvxEFOuzkek-hvqbu-zc1TVP2xSiFQ0Nvu/s1600-h/tractor_withtop%5B2%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;tractor_withtop&quot; border=&quot;0&quot; alt=&quot;tractor_withtop&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtlAAFTT6c8CuHvPSx6CyA7Fl6g_19nK_kNBo2y34t0_4LtLytCgcf3e8n1pt9gWTvBVtYjktXH2NiJS2szi0j6rq53VTWHeu5w2TUZt8y_1gPUyNyEQ3bJI5qytMBgJCIYzeL81_aZhh/?imgmax=800&quot; width=&quot;244&quot; height=&quot;184&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Rather, I glimpsed inside a broken toy tonight, and was intrigued by what I could see. I was interested enough to break it open and see exactly how it was put together. It turns out there is some good mechanical engineering principles at work within even the cheapest of toys. &lt;/p&gt;  &lt;h2&gt;Yellow Tractor from the $1 Bin&lt;/h2&gt;  &lt;p&gt;In this case, it is a yellow tractor purchased at Target last year for $1. It is the kind of vehicle that you can “rev” up by running it across the table with your hand, and then release and let it move under its own power. My daughter had dismantled pieces from the top, which allowed me to peek inside.&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:6fe54269-24e0-44ef-bf04-e03be0ce861f&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;&lt;div id=&quot;88964c1f-ddef-4e2c-ae86-0f850b3d2a6d&quot; style=&quot;margin: 0px; padding: 0px; display: inline;&quot;&gt;&lt;div&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=o7QlRLmeQQw&quot; target=&quot;_new&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGo4gJ0b_z7b8cE5r6BXPiGMmNf3pJP32WN8BhNbI5TdKE_J3qlVv8a13jIszzP_laKW5MckpPA8-1akplzqX_WQlQLzKn4WpnpmSCG1ik-FNLGnD7R1O3QrBXLaTOViqu3kFBTN7k9QXh/?imgmax=800&quot; style=&quot;border-style: none&quot; galleryimg=&quot;no&quot; onload=&quot;var downlevelDiv = document.getElementById(&#39;88964c1f-ddef-4e2c-ae86-0f850b3d2a6d&#39;); downlevelDiv.innerHTML = &amp;quot;&amp;lt;div&amp;gt;&amp;lt;object width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;param name=\&amp;quot;movie\&amp;quot; value=\&amp;quot;http://www.youtube.com/v/o7QlRLmeQQw&amp;amp;hl=en\&amp;quot;&amp;gt;&amp;lt;\/param&amp;gt;&amp;lt;embed src=\&amp;quot;http://www.youtube.com/v/o7QlRLmeQQw&amp;amp;hl=en\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; width=\&amp;quot;425\&amp;quot; height=\&amp;quot;355\&amp;quot;&amp;gt;&amp;lt;\/embed&amp;gt;&amp;lt;\/object&amp;gt;&amp;lt;\/div&amp;gt;&amp;quot;;&quot; alt=&quot;&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;I will provide the model number (Ankyo234041829F16819779-08/09) just in case it is a rare toy that is now worth a million dollars. How about giving me $200,000 for a busted one? As you would expect, you also find &lt;em&gt;Made in China&lt;/em&gt; stamped to the bottom.&lt;/p&gt;  &lt;p&gt;Inside the toy are the following components:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Plastic frame; holes in the plastic serve as bearings for the axles&lt;/li&gt;    &lt;li&gt;4 plastic wheels (inside of the fake outer tracks) &lt;/li&gt;    &lt;li&gt;Metal axles for the wheels, with a spline in the middle to drive the first cog in the drivetrain&lt;/li&gt;    &lt;li&gt;A gearbox of 3 cogs; the middle cog is actually 2 cogs mated together (small and big). Metal shafts hold the cogs in place.&lt;/li&gt;    &lt;li&gt;A big metal flywheel (probably lead, to provide for better inertia)&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I was surprised at how much mechanical advantage was provided by the gearbox. Moving the wheels just a fraction of a turn spun the big flywheel all the way around. Nice job, &lt;em&gt;Made in China&lt;/em&gt; guys!&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9B5EnMSgfq4BCM4gQyMJ_BYgggAWMkf1F2Uo4TfwrnG6a8kzcVNel4J7BzZ0OlDBKYxevxRQl2ptDuwZuV6DSe2af8R1hXfy-hcwFmqwoBBBjnufbtMQbJhoOeByCFrqyMNID9Tb-3YFh/s1600-h/tractor_gearbox_flywheel%5B4%5D.jpg&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;tractor_gearbox_flywheel&quot; border=&quot;0&quot; alt=&quot;tractor_gearbox_flywheel&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgptNufJlC0x_lKQ2cRhmtQ3CfdbIc3xFT5CU1_hXjajrt7YYa0lQgTaGPd3X_8iSMk7wm8NOUHQaRWtvEQJPAKg6ZDU0-un7TBn7Lijt9bF2wPw3I2B3tAJsJ0SpJJHhVMDYqxPduFpDh-/?imgmax=800&quot; width=&quot;504&quot; height=&quot;382&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Note: that little green plastic tab is only there to make noise. It rests on top of the flywheel input cog, and gives the gearbox a little clickity click sound as it rakes over the teeth.&lt;/p&gt;  &lt;h2&gt;The Gearbox&lt;/h2&gt;  &lt;p&gt;I have time boxed this blog post to less than 45 minutes, because, well, this isn’t something I should be spending a lot of time on. But I did want to understand how much mechanical advantage was being provided by the gearbox. I decided that counting teeth on each wheel was going to take too long, so I am just making some estimates here. Also, I am not rechecking my high school physics text book, so I could be doing this all wrong. Like it matters.&lt;/p&gt;  &lt;p&gt;But I estimate the advantage to be 125:1. Meaning, every rotation of the wheel will result in 125 rotations of the flywheel. Imagine what happens when you rapidly move the car across, say 2 feet, of table top. Assuming the wheel circumference is 2 inches, that means the the wheels will spin 12 times, causing the flywheel to spin 1500 times. Holy shrapnel-if-it-disintegrates!&lt;/p&gt;  &lt;p&gt;Once again, I am timeboxed. So this diagram is the best I can come up with to illustrate the gearbox design:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIfB0MiwGlkpoi_BgFY6KAITfqExNK8npoWe2xdbcGwCna4uE7XzgVenWmVCTps2DmhnpMBVKQ16eZlHNli5IT4_n9VZ8CIHtgnsalwk0jDZUD7pcd5ZwMn_IAvTB96fgq3zKI5Q9zfQc4/s1600-h/tractor_sequence%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;tractor_sequence&quot; border=&quot;0&quot; alt=&quot;tractor_sequence&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik9tW-ehot2485SBx7YlAXKQa1armEu5wG6vSXhDituSwWysrt1aFJ9u8M2jZD7pDNoK97a2CwTY0nitt7EfwEMfeQWZQlLByR-Ec3O6I2z5iJ4cvqXQl8SH6sLoy2wYfPL1G7DQqvcA57/?imgmax=800&quot; width=&quot;504&quot; height=&quot;184&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;I came up with my 125:1 figure by estimating three places of mechanical advantage of 5:1. If my physics are right, we multiply those together to get 125. Sorry for wasting 3 minutes of your life if that isn’t right, hey we are all doing the best we can.&lt;/p&gt;  &lt;h2&gt;Conclusion&lt;/h2&gt;  &lt;p&gt;Is there one? &lt;/p&gt;  &lt;p&gt;Perhaps this is interesting stuff to you, as it was to me. I didn’t think a toy from the $1 bin at Target would reveal a lesson in mechanical advantage interesting enough for me to write about. I was wrong. Sorry, &lt;em&gt;Made in China&lt;/em&gt; guys, for underestimating you.&lt;/p&gt;  &lt;p&gt;(elapsed time in researching and writing this post – 51 minutes)&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7a63f5e4-d1f1-4d58-abe8-d44d0cb98f28&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/toy&quot; rel=&quot;tag&quot;&gt;toy&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/car&quot; rel=&quot;tag&quot;&gt;car&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/flywheel&quot; rel=&quot;tag&quot;&gt;flywheel&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/timewaster&quot; rel=&quot;tag&quot;&gt;timewaster&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1254494882946136995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/my-1-plastic-toy-car-has-metal-flywheel.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1254494882946136995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1254494882946136995'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/my-1-plastic-toy-car-has-metal-flywheel.html' title='My $1 Plastic Toy Car has a Metal Flywheel and a Plastic Gearbox'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigtlAAFTT6c8CuHvPSx6CyA7Fl6g_19nK_kNBo2y34t0_4LtLytCgcf3e8n1pt9gWTvBVtYjktXH2NiJS2szi0j6rq53VTWHeu5w2TUZt8y_1gPUyNyEQ3bJI5qytMBgJCIYzeL81_aZhh/s72-c?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-929104494625173899</id><published>2010-05-16T22:21:00.001-07:00</published><updated>2010-05-16T22:21:09.395-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="snaplogic"/><title type='text'>Browsing your SnapLogic SQLite Configuration Database</title><content type='html'>&lt;p&gt;This blog post explains how to browse the configuration database of your SnapLogic server. I found this helpful when I was modifying some SnapLogic server code, and messed something up. I thought I had corrupted something in the database (I hadn’t), so wanted to open it up and take a look. I thought I’d share what I learned.&lt;/p&gt;  &lt;p&gt;It turns out the SnapLogic configuration repository is really simple. There is only one table you really care about, and it has but a few columns. &lt;/p&gt;  &lt;h2&gt;Setting Up Your SQLite Browser&lt;/h2&gt;  &lt;p&gt;The configuration database for SnapLogic is a standard SQLite database. There are various tools you could use to browse it, but I like the Firefox &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/5817/&quot;&gt;SQLite Manager&lt;/a&gt; plugin. It installs into a tool you probably already use (Firefox) and does everything you need.&lt;/p&gt;  &lt;p&gt;Steps to get running:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Install &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/5817/&quot;&gt;the SQLite Manager plugin&lt;/a&gt; and restart Firefox&lt;/li&gt;    &lt;li&gt;Navigate to &lt;strong&gt;Tools-&amp;gt;SQLite Manager&lt;/strong&gt; in the Firefox menu&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;A new window will popup with the manager in view&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Navigate to &lt;strong&gt;Database-&amp;gt;Connect Database&lt;/strong&gt; in the menu&lt;/li&gt;    &lt;li&gt;When the file browser pops up, choose your SnapLogic repository DB&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Choose &lt;em&gt;[SNAPLOGIC_HOME]/repository/repository.db&lt;/em&gt;&lt;/li&gt;      &lt;li&gt;You will have to disable file extension filtering; make sure “All Files” is selected&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;You should now have the SnapLogic database open for browsing.&lt;/p&gt;  &lt;h2&gt;Inside the Resource Table&lt;/h2&gt;  &lt;p&gt;The table of interest is the resource table. It contains the definitions of all of your resources, including component instances and pipelines. Almost everything you do in the SnapLogic Designer UI is stored in this table.&lt;/p&gt;  &lt;p&gt;The table has the following structure:&lt;/p&gt;  &lt;table border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;400&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;Column&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;uri&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;The logical URI given to the resource in the Designer. As in: /SnapLogic/Tutorial/Exercise_5/Resources/SortProspects&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;guid&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;A nice globally unique id for the instance. For migration/backups, this is very nice to have.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;gen_id&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;A version number. Incremented each time you click Save on the resource in the Designer.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;object&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;The actual definition of the resource. This is a large field, and is written in a readable format (JSON?).&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;&lt;strong&gt;validated&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;200&quot;&gt;Has this resource been validated? 0 for false, 1 for true. See caveat below.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Overall, it is pretty self explanatory as far as I can tell. Perhaps there are hidden nuances, but none that I have detected.&lt;/p&gt;  &lt;p&gt;The only surprise was the use of the validated column. I thought that would be updated when you hit the “Validate…” button in the Designer. Not so, at least in SnapLogic 2.1.0 (beta). This column seems to be updated upon a successful run of a Preview operation.&lt;/p&gt;  &lt;p&gt;I hope this blog post helps you in your SnapLogic development. Post a comment if so!&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:238536c4-c591-4d06-9777-9b792db45f1c&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/snaplogic&quot; rel=&quot;tag&quot;&gt;snaplogic&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/sqlite&quot; rel=&quot;tag&quot;&gt;sqlite&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/929104494625173899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/browsing-your-snaplogic-sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/929104494625173899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/929104494625173899'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/browsing-your-snaplogic-sqlite.html' title='Browsing your SnapLogic SQLite Configuration Database'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-2170996275423422395</id><published>2010-05-14T15:07:00.001-07:00</published><updated>2010-05-14T15:07:47.245-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="postgresql"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Upgrade to Ubuntu 10.04 broke my Postgres – “Could not Connect to Server” in Pgadmin</title><content type='html'>&lt;p&gt;I upgraded last week to Ubuntu 10.04, and just noticed today that my development environment was broken (yeah yeah, it took a week to notice, give me a hard time about not spending enough time coding). I looked into it, and found a weird problem caused by the upgrade – perhaps if you are reading this you have that problem too. My Postgres database was apparently not operating.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Postgres 8.4 Upgrade&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I did notice that the Ubuntu 10.04 upgrade was taking me from Postgresql 8.3 to 8.4. I figured that should be fine. And it is, but it caused some downstream problems.&lt;/p&gt;  &lt;p&gt;First off, put away any notion that the upgrade does an automatic migration of your databases from 8.3 to 8.4. Ubuntu is good, but not that good. You will have to manually migrate your databases yourself. I imagine you should dump all your databases before you do your upgrade, as the upgrade does remove 8.3 from /usr/lib/postgresql. Since I could rebuild my databases, I didn’t have to worry about migration – but do some research ahead of time if you do.&lt;/p&gt;  &lt;p&gt;This was one issue – my dev databases were not migrated into 8.4. I needed to rebuild them, and recreate our dev user in 8.4. But before I could do that…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Pgadmin Could Not Connect&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A major roadblock was that I could not connect to Postgres using Pgadmin, even as the ‘postgres’ user. In fact, I couldn’t seem to get network connectivity to Postgres at all. What is going on? &lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;Server doesn&#39;t listen     &lt;br /&gt;The server doesn&#39;t accept connections: the connection library reports could not connect to server: Connection refused Is the server running on host &amp;quot;127.0.0.1&amp;quot; and accepting TCP/IP connections on port 5432?&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;To troubleshoot this, I made sure that the processes were running:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo /etc/init.d/postgresql-8.4 restart&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;and then made sure it stayed started:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;ps –ef | grep postgres&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;and also checked the logs:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;/var/log/postgresql$ cat postgresql-8.4-main.log&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;But everything seemed to be kosher. I was also able to use psql from the command line. What is going on, I still can’t connect from Pgadmin? An invocation of netstat is what solved it:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;netstat -ln | grep 5432&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;That should have returned some lines like:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;tcp&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0 127.0.0.1:5432&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0.0.0.0:*&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; LISTEN&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;tcp6&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 0 ::1:5432&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; :::*&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; LISTEN&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;unix&amp;#160; 2&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; [ ACC ]&amp;#160;&amp;#160;&amp;#160;&amp;#160; STREAM&amp;#160;&amp;#160;&amp;#160;&amp;#160; LISTENING&amp;#160;&amp;#160;&amp;#160;&amp;#160; 5623&amp;#160;&amp;#160;&amp;#160;&amp;#160; /var/run/postgresql/.s.PGSQL.5432&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;but it returned nothing. Eh? 5432 is the default port for postgresql, and the port I use in my Pgadmin connections. It should be there. &lt;/p&gt;  &lt;p&gt;I then looked at the postgres server configuration in&amp;#160; &lt;em&gt;/etc/postgresql/8.4/main/postgresql.conf&lt;/em&gt; and found the problem:&lt;/p&gt;  &lt;p&gt;port = 5433&lt;/p&gt;  &lt;p&gt;For some reason the upgrader installed 8.4 on port 5433 instead of 5432. During the upgrade it perhaps needs to run 8.3 and 8.4 at the same time, and therefore puts them on different ports. But after upgrade, shouldn’t it switch 8.4 back to the default port?&lt;/p&gt;  &lt;p&gt;Its an easy fix:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo gedit postgresql.conf &lt;/font&gt;&amp;#160; (change 5433 to 5432)&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo /etc/init.d/postgresql-8.4 stop&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo /etc/init.d/postgresql-8.4 start&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Note that I first tried just restart, but found that the port change did not take effect. I had to do a stop and start explicitly.&lt;/p&gt;  &lt;p&gt;I am now back up and running again with Postgres 8.4. Joy.&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2c0ff791-a66b-4940-82ec-fc2822e19223&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/ubuntu&quot; rel=&quot;tag&quot;&gt;ubuntu&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/postgresql&quot; rel=&quot;tag&quot;&gt;postgresql&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/2170996275423422395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/upgrade-to-ubuntu-1004-broke-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2170996275423422395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2170996275423422395'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/upgrade-to-ubuntu-1004-broke-my.html' title='Upgrade to Ubuntu 10.04 broke my Postgres – “Could not Connect to Server” in Pgadmin'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-8043381718315674642</id><published>2010-05-13T16:33:00.001-07:00</published><updated>2010-05-13T16:33:49.900-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="snaplogic"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualbox"/><title type='text'>Installing SnapLogic Community Edition 2.1.0 on Ubuntu 8.10 in 5 minutes</title><content type='html'>&lt;p&gt;If you read &lt;a href=&quot;http://peterlairdtech.blogspot.com/2010/05/building-and-installing-snaplogic-22.html&quot;&gt;my last post&lt;/a&gt;, you would know that I hit a snag running the community edition of SnapLogic 2.2. There appears to be a hard dependency on a license check (see &lt;a href=&quot;https://www.snaplogic.org/trac/ticket/2449&quot;&gt;ticket 2449&lt;/a&gt;). Since I have no idea how long that will take to resolve, I decided to find a way around the problem.&lt;/p&gt;  &lt;p&gt;I chose to roll back to version 2.1.0. But in doing so, I had some struggles. SnapLogic 2.1.0 is based on Python 2.5.x and related components. My Ubuntu 10.04 install uses Python 2.6.x, and the 2.5.x stuff has been removed from the Ubuntu repositories.&lt;/p&gt;  &lt;p&gt;After trying some minor hackery to get P2.5.x on U10.04 (building stuff from source), I gave up at trying to get the dependencies resolved. Instead, I just plopped down a new Ubuntu 8.10 VM on my machine, and got things going pretty quickly. &lt;/p&gt;  &lt;p&gt;These are my notes. By the way, the 5 minutes I reference in the title is just for the SnapLogic install. Installing and updating Ubuntu takes about an hour, depending on network speeds.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Install 8.10&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Download a VDI and install into VirtualBox, or&lt;/li&gt;      &lt;li&gt;Do a bare metal install (e.g. dual boot)&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Update your OS&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;368 updates and counting as of today&lt;/li&gt;      &lt;li&gt;Make sure not to upgrade Python beyond 2.5.x&lt;/li&gt;      &lt;li&gt;Reboot&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Download SnapLogic 2.1.0&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href=&quot;http://sourceforge.net/projects/snaplogic/files/&quot;&gt;http://sourceforge.net/projects/snaplogic/files/&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;You want the linux .bin of course&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Launch the SnapLogic installer&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;chmod u+x [blahblah.bin]&lt;/li&gt;      &lt;li&gt;It will inform you what is missing from prereqs&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Install the missing prereqs&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Launch Synaptic Package Manager, and install: &lt;/li&gt;      &lt;li&gt;python2.5-dev&lt;/li&gt;      &lt;li&gt;libmysqlclient15-dev&lt;/li&gt;      &lt;li&gt;libxml2-dev&lt;/li&gt;      &lt;li&gt;libxslt1-dev&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Rerun SnapLogic installer&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Accept all defaults&lt;/li&gt;      &lt;li&gt;Password is password&lt;/li&gt;      &lt;li&gt;Elect to start up the servers at the end&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Install Flash Plugin for Firefox&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Navigate to &lt;a href=&quot;http://get.adobe.com/flashplayer/&quot;&gt;http://get.adobe.com/flashplayer/&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Navigate to the Designer UI&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;a href=&quot;http://[hostname]:8081/&quot;&gt;http://[hostname]:8081/&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;Open the &lt;em&gt;Leads_to_Prospects&lt;/em&gt; Pipeline&lt;/li&gt;      &lt;li&gt;Select the Run tab&lt;/li&gt;      &lt;li&gt;Run the pipeline (this is where SL 2.2 fails for me)&lt;/li&gt;      &lt;li&gt;Success!&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLQBmhWWIE9_BXiL-HhCwfB7WAPUcEjxRDtBZ2NgsxeJAGchtzWh45KZKEGsub8jmJ3Ov8vAARMZ1zPtB9rFV5zM6m9A1yzgVDdxYzykXnKZOKx4rbc9ILzq762dZXh9kIlyLuSTSF8gOU/s1600-h/SLDesigner%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;SLDesigner&quot; border=&quot;0&quot; alt=&quot;SLDesigner&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0A1c8PwI8o_3pQg6_eJH-j_k15etGlixYm40Zjg_tR4uOuK-TacInuxvyZWzZUc_pC94kVoDzBaMYDcrD9zpxSOMDLCiW_b-LbRr3l0yofWIROht61X_TGUSoLgu6bYnqMqZLMkZwfi5R/?imgmax=800&quot; width=&quot;504&quot; height=&quot;383&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:77f9d297-6e03-4855-bcba-16d1b5ce079e&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/snaplogic&quot; rel=&quot;tag&quot;&gt;snaplogic&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/ubuntu&quot; rel=&quot;tag&quot;&gt;ubuntu&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/virtualbox&quot; rel=&quot;tag&quot;&gt;virtualbox&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/8043381718315674642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/installing-snaplogic-community-edition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8043381718315674642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8043381718315674642'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/installing-snaplogic-community-edition.html' title='Installing SnapLogic Community Edition 2.1.0 on Ubuntu 8.10 in 5 minutes'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0A1c8PwI8o_3pQg6_eJH-j_k15etGlixYm40Zjg_tR4uOuK-TacInuxvyZWzZUc_pC94kVoDzBaMYDcrD9zpxSOMDLCiW_b-LbRr3l0yofWIROht61X_TGUSoLgu6bYnqMqZLMkZwfi5R/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-532903663926306013</id><published>2010-05-13T02:00:00.001-07:00</published><updated>2010-05-13T16:45:32.115-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="snaplogic"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Building and Installing SnapLogic 2.2 from Source on Ubuntu 10.04</title><content type='html'>&lt;p&gt;This blog post walks you through building and installing SnapLogic 2.2 on a Ubuntu 10.04 box. These instructions will lead you through building the product from source. There is also a handy installer available, but that is only for the Pro version. The Pro version has a 14 day trial, and then you’ll have to fork over money. Since I plan to work on my prototype over a longer period of time, I have decided to build the community version from source. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; there is currently a blocking issue that prevents this from working. Be sure to read through to the bottom of this page for details before proceeding on this yourself.&lt;/p&gt;  &lt;p&gt;The official build and installation instructions &lt;a href=&quot;https://www.snaplogic.org/trac/wiki/SourceInstall&quot;&gt;live on the SnapLogic wiki&lt;/a&gt;, but I am posting here so I can provide more details as I go. Also, there are a couple of changes from the official instructions presumably due to 10.04. Since it seems only Ubuntu 9.x &lt;a href=&quot;https://www.snaplogic.org/trac/ticket/2074&quot;&gt;is supported&lt;/a&gt; for SnapLogic 2.2, updating the official wiki would probably not be welcome. Items marked with &lt;strong&gt;DELTA&lt;/strong&gt; below are different relative to the official docs.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Caveat:&lt;/strong&gt; I am running 10.04, but my laptop has been a Ubuntu machine since 9.04. I did an in place upgrade to 9.10 and then 10.04, and have installed a lot of things along the way. Your mileage may therefore vary with these instructions.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1: Install Prerequisite Packages (DELTA)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Execute the following command in a terminal window:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo apt-get install python-mysqldb python-pysqlite2 python-cherrypy3 python-feedparser python-simplejson python-lxml python-beautifulsoup python-paste python-genshi&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;make sure to specificy &lt;em&gt;python-cherrypy3&lt;/em&gt;, otherwise you get 2.3.0-3, which will not work with SnapLogic 2.2.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2: Download the Source&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Go to the &lt;a href=&quot;https://www.snaplogic.org/downloads/&quot;&gt;community site&lt;/a&gt; and download the source for both the server and the designer:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href=&quot;https://www.snaplogic.org/downloads/snaplogic-src-2.2.0.zip&quot;&gt;SnapLogic Server&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;https://www.snaplogic.org/downloads/snaplogic-designer-2.2.0.zip&quot;&gt;SnapLogic Designer&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Step 3: Extract the Source into a Directory&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;cd ~/dev      &lt;br /&gt;mkdir snaplogic       &lt;br /&gt;cd snaplogic/       &lt;br /&gt;unzip /home/plaird/Desktop/downloads/snaplogic-src-2.2.0.zip&lt;/font&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 4: Create a Runtime Directory&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;cd ~/dev/snaplogic/      &lt;br /&gt;mkdir runtime&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 5: Setup your Shell&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Ultimately, you want to define these in ~/.bashrc, but we will do it inline for now.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;export SnapPackageDir=/home/plaird/dev/snaplogic      &lt;br /&gt;export SnapRuntimeDir=/home/plaird/dev/snaplogic/runtime       &lt;br /&gt;export PYTHONPATH=$PYTHONPATH:${SnapPackageDir}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 6: Build out your Runtime Directories&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;mkdir ${SnapRuntimeDir}      &lt;br /&gt;mkdir ${SnapRuntimeDir}/bin       &lt;br /&gt;mkdir ${SnapRuntimeDir}/repository       &lt;br /&gt;mkdir ${SnapRuntimeDir}/designer       &lt;br /&gt;mkdir ${SnapRuntimeDir}/cache_dir       &lt;br /&gt;mkdir ${SnapRuntimeDir}/compute       &lt;br /&gt;mkdir ${SnapRuntimeDir}/static       &lt;br /&gt;mkdir ${SnapRuntimeDir}/logs       &lt;br /&gt;mkdir ${SnapRuntimeDir}/config&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 7: Copy in Runtime Files (DELTA)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The official instructions inform you that you need to install icon files at this point. That no longer seems necessary, as the Designer installation in a later step now takes care of that.&lt;/p&gt;  &lt;p&gt;However, I found that you do need to install the components and tutorial into the runtime directory.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;cd ${SnapRuntimeDir}      &lt;br /&gt;cp -r ../snaplogic/components/ .       &lt;br /&gt;cp –r ../snaplogic/example/tutorial .       &lt;br /&gt;cd tutorial       &lt;br /&gt;mkdir data       &lt;br /&gt;mv *.csv data&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 8: Launch SnapAdmin&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;cd ${SnapRuntimeDir}      &lt;br /&gt;python ${SnapPackageDir}/snaplogic/tools/snapadmin.py&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 9: Create your Repository in the Runtime Directory&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;repository create -t sqlite /home/plaird/dev/snaplogic/runtime/repository/repository.db&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 10: Create a Server Configuration File&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Download the template configuration file from the website (link is on &lt;a href=&quot;https://www.snaplogic.org/trac/wiki/SourceInstall&quot;&gt;this page&lt;/a&gt;) and copy it into your ${SnapRuntimeDir}/config directory. Make the following modifications:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;Replace ${SnapRuntimeDir} with absolute path&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;Change YOURHOST.EXAMPLE.COM to the fully qualified domain name of your host (three locations)&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;Optionally change the ports from 8088, 8081 and 8089&lt;/font&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Step 11: Install the Authentication Files&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;These files give you a starting solution for authentication:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;cp ${SnapPackageDir}/snaplogic/server/auth/simple_snapaccess.conf ${SnapRuntimeDir}/config/      &lt;br /&gt;cp ${SnapPackageDir}/snaplogic/server/auth/simple_passwords ${SnapRuntimeDir}/config/&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 12: Install the Designer GUI&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;cd ${SnapRuntimeDir}unzip /home/plaird/Desktop/downloads/snaplogic-designer-2.2.0.zip &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 13: Create the Server Start Script (DELTA)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The default control script is not included in the community edition. Create a file called startServers.sh in your runtime directory. Its contents should be as follows (replacing localhost:8088 with your server URL):&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;echo &amp;quot;Starting data server&amp;quot;      &lt;br /&gt;python ${SnapPackageDir}/snaplogic/server/server.py&amp;#160; --config=${SnapRuntimeDir}/config/snaplogic_server.conf &amp;amp;       &lt;br /&gt;echo &amp;quot;Starting management server&amp;quot;       &lt;br /&gt;python ${SnapPackageDir}/snaplogic/mgmtserver/mgmt_server.py --config=${SnapRuntimeDir}/config/snaplogic_server.conf &amp;amp;       &lt;br /&gt;echo &amp;quot;Starting component server&amp;quot;       &lt;br /&gt;python ${SnapPackageDir}/snaplogic/cc/component_container.py --name=cc1 --server=&lt;/font&gt;&lt;a href=&quot;http://localhost:8088&quot;&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;http://localhost:8088&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt; &amp;amp;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 14: Correct the Bad Import on Ubuntu 10.04 (DELTA)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you are running with Ubuntu 10.04, you probably have package python-simplejson at version 2.0.9-1build1. SnapLogic 2.2 was certified against version 1.7.1. You will need to remove an import statement from a SnapLogic file:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;gedit /home/plaird/dev/snaplogic/snaplogic/rp/streaming_json_rp.py&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Edit out this line:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;from simplejson.decoder import JSONScanner&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 15: Start the Servers and View the UI (DELTA)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;chmod u+x startServers.sh      &lt;br /&gt;./startServers.sh       &lt;br /&gt;firefox &lt;/font&gt;&lt;a href=&quot;http://&amp;lt;your_machine_name&quot;&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;http://&amp;lt;your_machine_name&lt;/font&gt;&lt;/a&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;gt;:8081 &amp;amp;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 16: Walk through Tutorial&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can at this point start with the tutorials.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 17: ROAD BLOCK&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Sadly, at this point I have hit a road block. The community edition of the product apparently has a bug in that it depends on an license file for a commercial version of the product (pro or core). I have filed &lt;a href=&quot;https://www.snaplogic.org/trac/ticket/2449#preview&quot;&gt;defect 2449&lt;/a&gt; – hope to get a fix shortly! &lt;/p&gt;  &lt;p&gt;In the meantime, see my &lt;a href=&quot;http://peterlairdtech.blogspot.com/2010/05/installing-snaplogic-community-edition.html&quot;&gt;follow on post&lt;/a&gt; on how to install SnapLogic 2.1.0 instead. While it is an earlier version, the upside is the 2.1.0 version has a community installer.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1cffcd0e-c05f-4a6d-8fff-d4a821e9baff&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/snaplogic&quot; rel=&quot;tag&quot;&gt;snaplogic&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/ubuntu&quot; rel=&quot;tag&quot;&gt;ubuntu&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/rest&quot; rel=&quot;tag&quot;&gt;rest&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/532903663926306013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/building-and-installing-snaplogic-22.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/532903663926306013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/532903663926306013'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/building-and-installing-snaplogic-22.html' title='Building and Installing SnapLogic 2.2 from Source on Ubuntu 10.04'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-8573166520014072907</id><published>2010-05-06T00:08:00.001-07:00</published><updated>2010-05-06T00:08:38.082-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Example Linux startup service for Python, Java, Ruby, Perl, or Script as a daemon process in init.d</title><content type='html'>&lt;p&gt;This blog post provides sample Bash code for converting a Python, Java, Ruby, Perl, C++, script, or any other program as a Linux service that will start running at system startup. It is a script that is deployed in &lt;em&gt;/etc/init.d&lt;/em&gt; like many other common service programs.&lt;/p&gt;  &lt;p&gt;Note that there may be language specific ways of doing what you want. For example, there is an evolving &lt;a href=&quot;http://pypi.python.org/pypi/python-daemon/&quot;&gt;Python package&lt;/a&gt; that is supposed to do this for you. At this writing, that package seems to be still in progress. &lt;/p&gt;  &lt;p&gt;This solution has three components:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The actual program that needs to run as a service. In this example, it is a python (.py) program. But it really can be anything, including Java, Ruby, C++, or whatever&lt;/li&gt;    &lt;li&gt;A wrapper Bash script that simply invokes the actual program. The only value add is that it writes the process identifier of the actual program to a file. You could possibly folder this functionality into the daemon itself, but I haven’t bothered to do that.&lt;/li&gt;    &lt;li&gt;The daemon script. It is what is located in /etc/init.d and ultimately is responsible for starting and stopping the service.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Actual Program – echoHW.py&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For this example, it does nothing real. It just spins the process:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;import time &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;while 1 &amp;lt; 2:      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; time.sleep(10)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Wrapper Script – echoHW.sh&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This script simply invokes the actual program. It does also write out the process identifier to the file.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Execute the actual python script     &lt;br /&gt;# The &amp;quot;$@&amp;quot; passes in any parameters into the python exectuable      &lt;br /&gt;# The &#39;&amp;amp;&#39; puts the process into background (as a daemon)      &lt;br /&gt;# The &#39;echo $! &amp;gt; mydaemon.pid&#39;&amp;#160; write the process id to a file &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;python echoHW.py &amp;quot;$@&amp;quot; &amp;amp;      &lt;br /&gt;echo $! &amp;gt; mydaemon.pid&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Daemon Script – mydaemon&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This file must be copied into /etc/init.d.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;#!/bin/bash     &lt;br /&gt;#      &lt;br /&gt;# mydaemon&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Start/Stop any shell script      &lt;br /&gt;#      &lt;br /&gt;# chkconfig: 345 95 65      &lt;br /&gt;# description: mydaemon&amp;#160; &lt;br /&gt;# processname: mydaemond      &lt;br /&gt;# &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# ENVIRONMENT     &lt;br /&gt;# Edit these for your configuration &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Name for the service, used in logging     &lt;br /&gt;NAME=mydaemon &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Name of the user to be used to execute the service     &lt;br /&gt;SCRIPT_USER=plaird &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Example of how to pass paramters into the command     &lt;br /&gt;PARAM2=whatever &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# In which directory is the shell script that this service will execute     &lt;br /&gt;MYDAEMON_SCRIPTS_DIR=/home/plaird/dev/linux &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Construct the command the will cd into the right directory, and invoke the script     &lt;br /&gt;MYDAEMON_COMMAND=&amp;quot;cd $MYDAEMON_SCRIPTS_DIR; ./echoHW.sh &#39;param1&#39; $PARAM2&amp;quot; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# How can the script be identified if it appears in a &#39;ps&#39; command via grep?     &lt;br /&gt;#&amp;#160; Examples to use are &#39;java&#39;, &#39;python&#39; etc.       &lt;br /&gt;MYDAEMON_PROCESS_TYPE=python &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Where to write the log file?     &lt;br /&gt;MYDAEMON_SVC_LOG_FILE=$MYDAEMON_SCRIPTS_DIR/mydaemon.log &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Where to write the process identifier - this is used to track if the service is already running     &lt;br /&gt;# Note: the script noted in the COMMAND must actually write this file       &lt;br /&gt;PID_FILE=$MYDAEMON_SCRIPTS_DIR/mydaemon.pid &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Load system specific optional arguments     &lt;br /&gt;# Create and populate this file with machine specific settings      &lt;br /&gt;if [ -f /etc/sysconfig/mydaemond ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; . /etc/sysconfig/mydaemond      &lt;br /&gt;fi &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Is the service already running? If so, capture the process id     &lt;br /&gt;if [ -f $PID_FILE ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; PID=`cat $PID_FILE`      &lt;br /&gt;else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; PID=&amp;quot;&amp;quot;      &lt;br /&gt;fi &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# SERVICE ENTRY POINTS (START/STOP) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;# Start Command     &lt;br /&gt;start() {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if [ &amp;quot;${PID}&amp;quot; != &amp;quot;&amp;quot; ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # Check to see if the /proc dir for this process exists      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if [ -a /proc/${PID} ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # check to make sure this is likely the running service      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ps aux | grep ${PID} | grep $MYDAEMON_PROCESS_TYPE &amp;gt;&amp;gt; /dev/null      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # If it is a process of the right type assume that it is mydaemon and just exit      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # otherwise remove the subsys lock file and start mydaemon      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if [ &amp;quot;$?&amp;quot; = &amp;quot;0&amp;quot; ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; exit 1      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo &amp;quot;mydaemon lock file still exists, removing...&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rm /var/lock/mydaemond      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # The process running as pid $PID is not a process of the right type, remove subsys      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # lock and start mydaemon      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo &amp;quot;mydaemon lock file still exists, removing...&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rm /var/lock/mydaemond      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; fi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; echo -n &amp;quot;Starting mydaemon: &amp;quot;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; su - $SCRIPT_USER -c &amp;quot;/bin/sh -c \&amp;quot;$MYDAEMON_COMMAND &amp;gt; $MYDAEMON_SVC_LOG_FILE 2&amp;gt;&amp;amp;1\&amp;quot;&amp;quot; &amp;amp; RETVAL=$?      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; sleep 3      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; touch /var/lock/mydaemond      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; exit 0      &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;stop() { &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160;&amp;#160;&amp;#160; echo -n $&amp;quot;Stopping mydaemon: &amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if [ &amp;quot;${PID}&amp;quot; != &amp;quot;&amp;quot; ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo -n &amp;quot;killing &amp;quot; $PID       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; kill ${PID}      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; for i in {1..30}      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; do      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if [ -n &amp;quot;`ps aux | grep $MYDAEMON_PROCESS_TYPE | grep mydaemon `&amp;quot; ]; then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sleep 1 # Still running, wait a second.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo -n .      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; # stopped      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rm -f /var/lock/mydaemond      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; rm -f $PID_FILE      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; exit 0      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; fi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; done      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; else      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; echo &amp;quot;$NAME is not running&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; exit 1      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; fi      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; echo &amp;quot;Failed to stop in 30 seconds.&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; kill -QUIT ${PID} # Request a thread dump so we can diagnose a hung shutdown      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; exit 1      &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;case &amp;quot;$1&amp;quot; in     &lt;br /&gt;&amp;#160; start)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; start      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;;      &lt;br /&gt;&amp;#160; stop)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; stop      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; ;;      &lt;br /&gt;&amp;#160; *)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; echo $&amp;quot;Usage: $0 {start|stop}&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; exit 1      &lt;br /&gt;esac&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;1. Start by copying the actual program and wrapper script somewhere on your machine in a permanent location. &lt;/p&gt;  &lt;p&gt;2. Next, edit the mydaemon script to reflect the location where the program was installed. You may want to rename the file, and update the name of mydaemon inside the file.&lt;/p&gt;  &lt;p&gt;3. Copy the mydameon script to /etc/init.d. As in:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo cp mydaemon /etc/init.d&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;4. Install the service. Installation will vary depending on your flavor of Linux. If you have chkconfig installed, it will be:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo chkconfig –-add mydaemon&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;If you are on a distro like Ubuntu, use update-rc.d, as in:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo update-rc.d mydaemon defaults&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Service Usage&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The service should now start on startup the computer. But you can invoke it manually as root:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo service mydaemon start&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;or:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;sudo service mydaemon stop&lt;/font&gt;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:22fa260d-9181-491a-8ec8-b97c0ea704c0&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/bash&quot; rel=&quot;tag&quot;&gt;bash&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/init.d&quot; rel=&quot;tag&quot;&gt;init.d&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/8573166520014072907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/example-linux-startup-service-for.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8573166520014072907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/8573166520014072907'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/05/example-linux-startup-service-for.html' title='Example Linux startup service for Python, Java, Ruby, Perl, or Script as a daemon process in init.d'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-934738703384872595</id><published>2010-04-30T09:30:00.001-07:00</published><updated>2010-04-30T09:30:27.583-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Sample code for a GWT  Popup Anchor that links to an External URL</title><content type='html'>&lt;p&gt;Do you need to have an anchor on your GWT page that pops up a window that navigates to an external/arbitrary URL? I’m your guy.&lt;/p&gt;  &lt;p&gt;I have an easy solution that involves adding a ClickHandler to your anchor. The image below shows the result. After clicking the &lt;em&gt;Redeem Now&lt;/em&gt; button (uses my ImageAnchor widget from &lt;a href=&quot;http://peterlairdtech.blogspot.com/2010/04/imageanchor-sample-code-gwt-anchor.html&quot;&gt;the previous post&lt;/a&gt;), a window pops up and navigates to an external URL.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidEk-40Nrk4mTXCQQOl4UFmSgb4HcIdZ2U1J0iTkBuTfP3v16hHvEpMyAS-iSmBoZS2yRMRYVP2v8EOhUO6JtHC4eVpkEW4p-dsSsiiQIXJ_nggVMtz7GmgfkyeDwdXvmUOApXYSK4K0xT/s1600-h/gwt_popup_external%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;gwt_popup_external&quot; border=&quot;0&quot; alt=&quot;gwt_popup_external&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE8U6gTplcTMYFDQFxrz5F427RCUv1BfE5KaxneIGuZcP-ng7FgFNzLM4IwqDikRIbsGLwg2f1Amnr35tVZTwocwulYXC0x7pS81kqpCPrkLM0NnejjLkAQ5LjdpPzwdjlukKVMzM0shPC/?imgmax=800&quot; width=&quot;404&quot; height=&quot;242&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;View.java Sample Code&lt;/h2&gt;  &lt;p&gt;In your view file, declare your anchor. I use UiBinder so I have the UiField annotation, but you don’t need it if you aren’t using UiBinder.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;@UiField     &lt;br /&gt;Anchor redeemButton;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Define a JavaScript function in your view:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;public static native void popupAnchor(String url) /*-{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; window.open(url, &#39;Redeem Rewards&#39;, &#39;width=1024,height=900,scrollbars=yes&#39;);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return false;      &lt;br /&gt;}-*/;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Create a method that attaches a ClickHandler to your anchor:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;private HandlerRegistration updateAnchorClickHandler(Anchor anchor, HandlerRegistration existingClickHandler, final String rewardsURL) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // We will be updating the URL from time to time from a Timer      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; // Make sure we aren&#39;t adding multiple handlers to the same anchor      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (existingClickHandler != null) {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; existingClickHandler.removeHandler();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; HandlerRegistration newHandler = anchor.addClickHandler(new ClickHandler() {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; public void onClick(ClickEvent event) {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; popupAnchor(rewardsURL);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; });      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; return newHandler;      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Declare a handler registration as a class member variable. This holds on to the ClickHandler’s registration to the anchor. This allows us to remove it in case the popup url needs to be updated.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;private HandlerRegistration redeemHandlerRegistration = null;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Finally, whenever you want to assign a new/updated popup URL for the anchor, simply call your method:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;String rewardsURL = whatever you want&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;redeemHandlerRegistration = updateAnchorClickHandler(redeemButton, redeemHandlerRegistration, rewardsURL);&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e6eab5e7-6e94-494b-9c03-7546b1a19fa3&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/gwt&quot; rel=&quot;tag&quot;&gt;gwt&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/popups&quot; rel=&quot;tag&quot;&gt;popups&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/934738703384872595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/sample-code-for-gwt-popup-anchor-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/934738703384872595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/934738703384872595'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/sample-code-for-gwt-popup-anchor-that.html' title='Sample code for a GWT  Popup Anchor that links to an External URL'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE8U6gTplcTMYFDQFxrz5F427RCUv1BfE5KaxneIGuZcP-ng7FgFNzLM4IwqDikRIbsGLwg2f1Amnr35tVZTwocwulYXC0x7pS81kqpCPrkLM0NnejjLkAQ5LjdpPzwdjlukKVMzM0shPC/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1550731585318431592</id><published>2010-04-30T09:19:00.001-07:00</published><updated>2010-04-30T09:38:29.005-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>ImageAnchor Sample Code: a GWT Anchor Widget that displays an Image</title><content type='html'>&lt;p&gt;I needed to create an anchor to an external site in GWT, but display an image in that anchor instead of text. I was surprised this widget wasn’t included in standard set offered by GWT. But it turned out to be an easy thing to implement.&lt;/p&gt;  &lt;p&gt;Here’s what it is, as shown in Firebug. It is an anchor that surrounds an image:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiaH0uz8jSimSmqJaZzV2_fpwAatgPTUMXO-WFqVMDiyddVa5hii7lfNl4sTOYfN84hmD6dIVldti-b2VNjpNdSwtgBsI_V369DyT7faFZf2SP0NGZQbeNaDZdy5njFfsRDYoLs6jxPzTi/s1600-h/gwt_imageanchor%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;gwt_imageanchor&quot; border=&quot;0&quot; alt=&quot;gwt_imageanchor&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVT1g2G-X6tyylNxrv4WbGm-vzvt9KXzZZmD_LNKxqwZVCV8FTwtsOWp5QxmTTJGNV6V0vIFu1wTtzjVVrNtbIrs8vm0LyF9Uk3lupLwETR5US1jEIu532ITAlcjUxd7rTGYoALOGrtqzw/?imgmax=800&quot; width=&quot;454&quot; height=&quot;310&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Sample Code&lt;/h2&gt;  &lt;p&gt;&lt;strong&gt;ImageAnchor.java&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This class is the implementation of the actual widget. It needs to be in some spot in your project. Note that this implementation assumes you are using the ImageResource facility. You could also provide the image via URL, by adding a setUrl() method to ImageAnchor, and changing the Image() constructor to take a String url.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;package com.tendril.ui.components.reward.client.view; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;import com.google.gwt.user.client.ui.Image;      &lt;br /&gt;import com.google.gwt.resources.client.ImageResource;       &lt;br /&gt;import com.google.gwt.user.client.ui.Anchor;       &lt;br /&gt;import com.google.gwt.user.client.DOM; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;public class ImageAnchor extends Anchor { &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160;&amp;#160;&amp;#160; public ImageAnchor() {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160;&amp;#160;&amp;#160; public void setResource(ImageResource imageResource) {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Image img = new Image(imageResource);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; img.setStyleName(&amp;quot;navbarimg&amp;quot;);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DOM.insertBefore(getElement(), img.getElement(), DOM       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; .getFirstChild(getElement()));       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UiBinder XML&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You don’t have to use UiBinder templating for this. It is optional. But if you are using UiBinder, this is how it goes:&lt;/p&gt;  &lt;p&gt;Add the package to your namespaces at the top of the document. I use the rw namespace in my case:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;ui:UiBinder xmlns:ui=&amp;quot;urn:ui:com.google.gwt.uibinder&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:g=&amp;quot;urn:import:com.google.gwt.user.client.ui&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:rw=&amp;quot;urn:import:com.tendril.ui.components.reward.client.view&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Then you can use your widget. For example:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;g:HTMLPanel addStyleNames=&#39;{resources.style.redeem_button_div}&#39;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;rw:ImageAnchor resource=&amp;quot;{resources.redeem_button}&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ui:field=&amp;quot;redeemButton&amp;quot; /&amp;gt;       &lt;br /&gt;&amp;lt;/g:HTMLPanel&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;View&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can interact with the widget in your view just like any other Anchor. If fact, for my purposes, I declare it as an Anchor supertype. &lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;@UiField      &lt;br /&gt;Anchor redeemButton;&lt;/font&gt;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f76e94d0-d05a-4235-92e3-71aa4a4be2b6&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/gwt&quot; rel=&quot;tag&quot;&gt;gwt&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1550731585318431592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/imageanchor-sample-code-gwt-anchor.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1550731585318431592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1550731585318431592'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/imageanchor-sample-code-gwt-anchor.html' title='ImageAnchor Sample Code: a GWT Anchor Widget that displays an Image'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVT1g2G-X6tyylNxrv4WbGm-vzvt9KXzZZmD_LNKxqwZVCV8FTwtsOWp5QxmTTJGNV6V0vIFu1wTtzjVVrNtbIrs8vm0LyF9Uk3lupLwETR5US1jEIu532ITAlcjUxd7rTGYoALOGrtqzw/s72-c?imgmax=800" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-5581813895025935680</id><published>2010-04-19T20:11:00.001-07:00</published><updated>2010-04-19T20:11:55.332-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Eclipse hangs in m2eclipse DefaultWagonManager.getRemoteFile</title><content type='html'>&lt;p&gt;This isn’t a constructive post – I am going to vent about yet another reason I feel the combination of Maven-Subversion-Eclipse-AspectJ is the Bermuda triangle (er, make that square) of Java development.&lt;/p&gt;  &lt;p&gt;I hit a hang tonight in Eclipse that comes from m2eclipse. I have seen this before, am irritated and I just want to vent about it.&lt;/p&gt;  &lt;p&gt;Our toolset:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Eclipse 3.5&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;AspectJ Dev Tools 2.0.2&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;m2eclipse .10.0.2010&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Subclipse 1.6.10&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We have many modules. When I work against trunk, I almost always set Maven to offline mode after doing a full build. I don’t need to be on the tip for what I do.&lt;/p&gt;  &lt;p&gt;The reason I evoke Bermuda when referring to this combination is the general unreliability I have when working. Eclipse arbitrarily rebuilds entire projects with a single line of Java changed. AspectJ fails to weave. Eclipse hangs for minutes at a time. On and on. This post is about one cause of the hang issue.&lt;/p&gt;  &lt;h2&gt;Annoying Hangs in Eclipse&lt;/h2&gt;  &lt;p&gt;I sporadically get hung up on calls to the Maven repo or Subversion. Eclipse will hang for minutes. I have started to monitor the stack traces, and they are so far they are m2eclipse or subclipse related. &lt;/p&gt;  &lt;p&gt;As a good open source citizen, I should really stop what I am doing for half a day when this happens to try and figure out what is going wrong. Better yet, see if anyone else has had the problem and already reported it.&lt;/p&gt;  &lt;p&gt;After tonight’s 5 minute hang, I did a search. I found &lt;a href=&quot;http://www.mail-archive.com/user@m2eclipse.codehaus.org/msg03527.html&quot;&gt;other people with the problem (from 2008)&lt;/a&gt;, yet no answer. &lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;quot;Worker-9&amp;quot; prio=10 tid=0x0ab96000 nid=0xdf7 in Object.wait() [0x5eacd000]     &lt;br /&gt;&amp;#160;&amp;#160; java.lang.Thread.State: WAITING (on object monitor)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at java.lang.Object.wait(Native Method)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; - waiting on &amp;lt;0xaffea3e8&amp;gt; (a org.apache.maven.wagon.providers.http.JettyClientHttpWagon$WagonExchange)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at java.lang.Object.wait(Object.java:485)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jetty.client.HttpExchange.waitForDone(HttpExchange.java:134)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; - locked &amp;lt;0xaffea3e8&amp;gt; (a org.apache.maven.wagon.providers.http.JettyClientHttpWagon$WagonExchange)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.sendAndWait(JettyClientHttpWagon.java:245)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.getIfNewer(JettyClientHttpWagon.java:347)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.wagon.providers.http.JettyClientHttpWagon.getIfNewer(JettyClientHttpWagon.java:302)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.repository.legacy.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:292)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:99)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:247)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:507)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.repository.legacy.LegacyRepositorySystem.resolve(LegacyRepositorySystem.java:325)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.project.RepositoryModelResolver.resolveModel(RepositoryModelResolver.java:171)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:582)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:449)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:182)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:117)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:117)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:81)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.maven.ide.eclipse.internal.embedder.MavenImpl.readProject(MavenImpl.java:418)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl$Refresher.phaseOne(MavenProjectManagerImpl.java:448)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.refresh(MavenProjectManagerImpl.java:368)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.maven.ide.eclipse.internal.project.MavenProjectManagerRefreshJob.run(MavenProjectManagerRefreshJob.java:93)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)&lt;/font&gt;&lt;/p&gt;  &lt;h2&gt;What am I going to do about it?&lt;/h2&gt;  &lt;p&gt;I know what I should do. Every time I hit an annoying problem, I should drop what I am doing and try and debug it. &lt;/p&gt;  &lt;p&gt;I tried debugging the AspectJ issue, and gave up after a lot of problems getting a working debug environment with matching source files for everything. So I would like to help debug this one, but I just don’t have the desire to fight that again.&lt;/p&gt;  &lt;p&gt;There is an easy workaround. I was not on my corporate VPN when this happened. I have only seen this problem when off the VPN. Therefore, I can just log into VPN all the time and the problem is avoided.&lt;/p&gt;  &lt;p&gt;But I shouldn’t have to do that. My Maven settings clearly indicate an offline build. &lt;/p&gt;  &lt;p&gt;If you are on this page, you must be having this same problem (I don’t have subscribers to this blog). Let me know with a comment. If others are annoyed maybe I will devote some time to debugging.&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:37ed0e1b-0424-4e0c-b498-9b74fc5ae8f1&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/eclipse&quot; rel=&quot;tag&quot;&gt;eclipse&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/maven&quot; rel=&quot;tag&quot;&gt;maven&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/5581813895025935680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/eclipse-hangs-in-m2eclipse.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5581813895025935680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5581813895025935680'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/eclipse-hangs-in-m2eclipse.html' title='Eclipse hangs in m2eclipse DefaultWagonManager.getRemoteFile'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-5614661004719364442</id><published>2010-04-16T14:31:00.001-07:00</published><updated>2010-04-16T14:31:05.585-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Creating a GWT Popup Window – Sample Code Example for PopupPanel and UiBinder</title><content type='html'>&lt;p&gt;This post is an easy tutorial for creating a popup window in GWT using the PopupPanel component included in the panel. Its really quite simple, so hopefully it will get you going in just a few minutes.&lt;/p&gt;  &lt;p&gt;This screenshot shows what is accomplished in this tutorial:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT_kqfahES_1qqcE6XfFM1oZFZb91JsEpdRdGh_0BeqPaPhbmP2jOwLKHI058ubz3YPAQTuT8mlWc3xUT23vTBcl1Dc7Gjduv8c3kIq7UD_03psmd0ZgN692OVidA1hYXSmO1LMKb61h8E/s1600-h/gwt_popup%5B7%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;gwt_popup&quot; border=&quot;0&quot; alt=&quot;gwt_popup&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmPH1hRS1Jdaiz1tuX8AOx8dnwVbk6778OOXGKShRvKSk_MPrNrFT7hWNLUw4YZY7Rz6qASAnJANLYhzVmghefnQxiboohb727OvZg4rnqMSEPbQ_wqbG3lCaI47tzz2K3ZKgxDPj9q8rI/?imgmax=800&quot; width=&quot;554&quot; height=&quot;344&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This example was built using GWT SDK 2.0.3. It employs the UiBinder templating facility to define the contents of the popup, but you can easily do without UiBinder as well.&lt;/p&gt;  &lt;h2&gt;Sample Code&lt;/h2&gt;  &lt;p&gt;Because I am lazy, I am splatting in my code “as is”. This means you need to understand that my popup window is called &lt;strong&gt;&lt;em&gt;EEGraphPopup &lt;/em&gt;&lt;/strong&gt;and my main application window is the &lt;strong&gt;&lt;em&gt;RewardsView&lt;/em&gt;&lt;/strong&gt;. Otherwise, it should all be self explanatory.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;EEGraphPopup.java&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Create a new Java file in your client directory. This file holds the code behind your popup panel. Notice it directly extends PopupPanel.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;package com.tendril.ui.components.reward.client; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;import com.google.gwt.core.client.GWT;     &lt;br /&gt;import com.google.gwt.uibinder.client.UiBinder;      &lt;br /&gt;import com.google.gwt.uibinder.client.UiTemplate;      &lt;br /&gt;import com.google.gwt.user.client.ui.PopupPanel;      &lt;br /&gt;import com.google.gwt.user.client.ui.Widget; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;/**     &lt;br /&gt; * A simple popup that displays a EEGraph&#39;s information.      &lt;br /&gt; */      &lt;br /&gt;public class EEGraphPopup extends PopupPanel { &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160;&amp;#160;&amp;#160; @UiTemplate(&amp;quot;EEGraphPopup.ui.xml&amp;quot;)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; interface Binder extends UiBinder&amp;lt;Widget, EEGraphPopup&amp;gt; { }      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; private static final Binder binder = GWT.create(Binder.class);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; public EEGraphPopup() {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // The popup&#39;s constructor&#39;s argument is a boolean specifying that it      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; // auto-close itself when the user clicks outside of it.      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; super(true);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; add(binder.createAndBindUi(this));      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }      &lt;br /&gt;} &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;EEGraphPopup.ui.xml&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you are using UiBinder to define your popup view, create this file in your client directory.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;ui:UiBinder     &lt;br /&gt;&amp;#160; xmlns:ui=&#39;urn:ui:com.google.gwt.uibinder&#39;      &lt;br /&gt;&amp;#160; xmlns:g=&#39;urn:import:com.google.gwt.user.client.ui&#39;      &lt;br /&gt;&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160; &amp;lt;ui:image field=&#39;ee_graph&#39; src=&#39;consumer_ee_graph.png&#39;/&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160; &amp;lt;ui:style&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160; @sprite .ee_graph {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; gwt-image: &#39;ee_graph&#39;;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; display: block;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; margin-left: auto;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; margin-right: auto;      &lt;br /&gt;&amp;#160; } &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160; &amp;lt;/ui:style&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;#160; &amp;lt;g:HTMLPanel styleName=&#39;ee_graph_popup&#39;&amp;gt;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;span&amp;gt;Baseline Energy Usage&amp;lt;/span&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;div class=&#39;{style.ee_graph}&#39;/&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;/g:HTMLPanel&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;/ui:UiBinder&amp;gt;&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;rewards.css &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Put this stuff in your application’s CSS file.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;.ee_graph_popup {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; background: #dfefc8;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; border: 1px solid #808080;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; padding: 0.5em;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; width: 650px;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; height: 400px;      &lt;br /&gt;}&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;RewardsView.java&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This code belongs in the view that triggers the popup. I trigger mine via a button ClickHandler. Notice how the line that centers your popup. Also, setGlassEnabled dims the rest of the screen – a very nice feature!&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;public void onClick(ClickEvent event) {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; EEGraphPopup popup = new EEGraphPopup();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; popup.setGlassEnabled(true);      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; popup.center();      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; popup.show();      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;References&lt;/p&gt;  &lt;p&gt;This post was made possible by a couple other blog posts. Check in with these too:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href=&quot;http://examples.roughian.com/index.htm#Widgets~PopupPanel&quot;&gt;Roughian Popup Example&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/2261982/centre-object-on-screen-using-css-only-in-gwt2-0-layout-uibinder-world&quot;&gt;Centering your popup&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:4b2ca260-f264-4d52-b7de-9deb442fe166&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/gwt&quot; rel=&quot;tag&quot;&gt;gwt&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/popups&quot; rel=&quot;tag&quot;&gt;popups&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/5614661004719364442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/creating-gwt-popup-window-sample-code.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5614661004719364442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5614661004719364442'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/creating-gwt-popup-window-sample-code.html' title='Creating a GWT Popup Window – Sample Code Example for PopupPanel and UiBinder'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmPH1hRS1Jdaiz1tuX8AOx8dnwVbk6778OOXGKShRvKSk_MPrNrFT7hWNLUw4YZY7Rz6qASAnJANLYhzVmghefnQxiboohb727OvZg4rnqMSEPbQ_wqbG3lCaI47tzz2K3ZKgxDPj9q8rI/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-5687441640560360248</id><published>2010-04-15T15:13:00.001-07:00</published><updated>2010-04-16T14:36:58.169-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Sample code for GWT TabLayoutPanel - overriding the default CSS styles</title><content type='html'>&lt;p&gt;If you are lucky like me, you have a designer who creates your screen mockups for you. This is great, because I suck at creating roundy-border type stuff that actually looks good on a web page. Its all great, until you have to figure out how to build the stuff they design.&lt;/p&gt;  &lt;p&gt;This post is about styling a GWT TabLayoutPanel in a way that will make your designer friend happy. Well, as much as one of those guys can ever&amp;#160; be happy. &lt;/p&gt;  &lt;p&gt;Here is what I have built. Notice how the tabs are styled – much better than the default styles you get out of the box.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0kZw_fgrLllrfS_lYIqvXEhGzhBPk__rZxbJ5jYH70dtQLtwB6Y2dp9Bs1ouXnOEwv9vVQi6fPAZcVIhlv5nuYgRRJor4hQ90W32XySz_vC2Z9oTWou_nde4y5KCMN_ZWoM5hKMi6dwhq/s1600-h/gwt_tabcontrol_css_styled%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;gwt_tabcontrol_css_styled&quot; border=&quot;0&quot; alt=&quot;gwt_tabcontrol_css_styled&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHilYg01EQ3IhydFsk1IfzP8QJpmSEG052CB3C8uP9ptC3_eVrvywMNbcI8XVm3mA8wBLq4JuxLACHgzurnDoP1cvGHyAlxpdT-yzKRAaA-8ORnqzeJeEA9zRzoRfUIvWPIFMJhwSOKpeM/?imgmax=800&quot; width=&quot;504&quot; height=&quot;184&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This sample uses the GWT SDK 2.03. It employs UiBinder, but this technique can be used without it as well.&lt;/p&gt;  &lt;h2&gt;Approach – Build a Custom Theme&lt;/h2&gt;  &lt;p&gt;There are references out there that indicate that you may be override the default GWT styles in your own custom CSS stylesheet. They seem to indicate that this will take precedence over the styles defined by the CSS in the standard theme.&lt;/p&gt;  &lt;p&gt;I never got that to work, as I could see in Firebug that the theme CSS files were loading later than my custom CSS file. No matter how I rearranged in the includes in my HTML file.&lt;/p&gt;  &lt;p&gt;So I took a different tack – I created a custom theme based off of a standard theme. Upon creating the custom theme, I changed the default styles for tab controls. This approach was both easy and effective. Note that it won’t work well for cases in which you have multiple tab controls in your project and need to style them differently. You will need to something with adding styles – details for which I don’t have.&lt;/p&gt;  &lt;p&gt;For reference, you can find some links out there on creating custom themes. I used the official GWT docs for this, and they were good:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href=&quot;http://code.google.com/webtoolkit/doc/latest/DevGuideUiCss.html&quot;&gt;GWT Developer’s Guide – CSS Style&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Sample Code&lt;/h2&gt;  &lt;p&gt;The code below shows the different snippets required to make this happen.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Theme CSS&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I will not include everything you need here, as you will use a standard theme CSS as your base for working. Do a search in the SDK to find the base theme you want – &lt;em&gt;standard.css&lt;/em&gt;, &lt;em&gt;dark.css&lt;/em&gt;, or &lt;em&gt;chrome.css&lt;/em&gt;. For Eclipse users, the SDK is found in a location such as:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;eclipse/plugins/com.google.gwt.eclipse.sdkbundle.2.0.3/gwt-2.0.3&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Once you find your base CSS, copy it into your war directory in your project. Open the file, and search for the Tab styles. Beyond this, it is an exercise in CSS and Firebug to get your tabs looking exactly how you need. For me, mine are defined like this:&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;&lt;font size=&quot;1&quot;&gt;.gwt-TabLayoutPanel        &lt;br /&gt;{         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; height: 300px;         &lt;br /&gt;}&lt;/font&gt;       &lt;br /&gt;&lt;/font&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;.gwt-TabLayoutPanel .gwt-TabLayoutPanelTabs {      &lt;br /&gt;}       &lt;br /&gt;.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {       &lt;br /&gt;&amp;#160; border-color: #e6e7e8;       &lt;br /&gt;&amp;#160; border-style: solid;       &lt;br /&gt;&amp;#160; border-width: 3px 2px 2px;       &lt;br /&gt;&amp;#160; overflow: hidden;       &lt;br /&gt;&amp;#160; padding: 6px;       &lt;br /&gt;&amp;#160; background: #FFFFFF;&amp;#160; &lt;br /&gt;}       &lt;br /&gt;.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab {       &lt;br /&gt;&amp;#160; margin-left: 6px;       &lt;br /&gt;&amp;#160; padding: 3px 8px 3px 8px;       &lt;br /&gt;&amp;#160; cursor: pointer;       &lt;br /&gt;&amp;#160; cursor: hand;       &lt;br /&gt;&amp;#160; color: black;       &lt;br /&gt;&amp;#160; font-size: 1.2em;       &lt;br /&gt;&amp;#160; color: #8bc53d;       &lt;br /&gt;&amp;#160; text-align: center;       &lt;br /&gt;&amp;#160; background: #458818;       &lt;br /&gt;}       &lt;br /&gt;.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected {       &lt;br /&gt;&amp;#160; cursor: default;       &lt;br /&gt;&amp;#160; background: #8bc53d;       &lt;br /&gt;&amp;#160; font-size: 1.2em;       &lt;br /&gt;&amp;#160; color: #FFFFFF;       &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Configure Theme in Rewards.gwt.xml File&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Find your *.gwt.xml file, usually in the top level directory of your packages. In here, you will need to disable any standard theme you are using, and inherit the basic CSS style objects into your project. Check the reference in the GWT docs listed above for more info.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;!--&amp;#160; &amp;lt;inherits name=&#39;com.google.gwt.user.theme.standard.Standard&#39;/&amp;gt;--&amp;gt;      &lt;br /&gt;&amp;lt;!--&amp;#160; &amp;lt;inherits name=&#39;com.google.gwt.user.theme.chrome.Chrome&#39;/&amp;gt; --&amp;gt;       &lt;br /&gt;&amp;lt;!--&amp;#160; &amp;lt;inherits name=&#39;com.google.gwt.user.theme.dark.Dark&#39;/&amp;gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; --&amp;gt;       &lt;br /&gt;&amp;lt;inherits name=&#39;com.google.gwt.user.theme.standard.StandardResources&#39;/&amp;gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Include Custom Theme in Rewards.html&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Next, add in your theme’s css file into your UI by including it in the host page. Your html file will be in your war directory. Update it to include your custom .css file, like:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;link type=&amp;quot;text/css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;rewards.css&amp;quot;&amp;gt;      &lt;br /&gt;&amp;lt;link type=&amp;quot;text/css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;tendril_theme.css&amp;quot;&amp;gt; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UiBinder Page&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The next thing to do is actually define your TabLayoutPanel in your UI. I use UiBinder for this, but you can do this programmatically as well. Notice that I don’t declare style info for the tab widgets – they automatically consume the custom theme styles.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;g:TabLayoutPanel ui:field=&amp;quot;programsTabPanel&amp;quot; barHeight=&amp;quot;2&amp;quot; barUnit=&amp;quot;EM&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Available&amp;lt;/g:header&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel styleName=&#39;program_tab&#39;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Demand Response&amp;lt;/g:header&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Energy Efficiency&amp;lt;/g:header&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel styleName=&#39;program_tab&#39;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;       &lt;br /&gt;&amp;lt;/g:TabLayoutPanel&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Now, the next time you refresh the browser your tabs should look pretty.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:be91f748-e20f-4a00-ba67-b111dbbf6d27&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/gwt&quot; rel=&quot;tag&quot;&gt;gwt&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/css&quot; rel=&quot;tag&quot;&gt;css&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/style&quot; rel=&quot;tag&quot;&gt;style&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/tabs&quot; rel=&quot;tag&quot;&gt;tabs&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/tabcontrol&quot; rel=&quot;tag&quot;&gt;tabcontrol&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/5687441640560360248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/sample-code-for-gwt-tablayoutpanel.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5687441640560360248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/5687441640560360248'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/sample-code-for-gwt-tablayoutpanel.html' title='Sample code for GWT TabLayoutPanel - overriding the default CSS styles'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHilYg01EQ3IhydFsk1IfzP8QJpmSEG052CB3C8uP9ptC3_eVrvywMNbcI8XVm3mA8wBLq4JuxLACHgzurnDoP1cvGHyAlxpdT-yzKRAaA-8ORnqzeJeEA9zRzoRfUIvWPIFMJhwSOKpeM/s72-c?imgmax=800" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-4167460112518698743</id><published>2010-04-15T14:19:00.001-07:00</published><updated>2010-04-16T14:43:43.102-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gwt"/><title type='text'>Code sample for making GWT TabLayoutPanel tabs visible and invisible</title><content type='html'>&lt;p&gt;Here are some code snippets for making TabLayoutPanel tabs visible and invisible. I use it to provision all my tabs in a UiBinder template up front, but have only those tabs that are relevant visible. This requires me to immediately make most of the tabs invisible on load, and then triggering their visibility when the user takes certain actions.&lt;/p&gt;  &lt;h2&gt;Use Case&lt;/h2&gt;  &lt;p&gt;The initial rendering of the tabs looks like this. (if you want to know how I styled the tabs, see &lt;a href=&quot;http://peterlairdtech.blogspot.com/2010/04/sample-code-for-gwt-tablayoutpanel.html&quot;&gt;another post of mine&lt;/a&gt;) Notice only one tab is visible:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF865IDn62Q-4fQ5ZJYbOZCGDwlSE4Hwl6OdQ8xv9g47rlo5BAPti-WC4fK0rBZc_ei9xhL_g3cfffWT7cebkridtx5atnwHWesBdONr4htoj1ls_f-Os5yo5EUAcDhoNV6UjED5EAJ4KF/s1600-h/gwt_tabcontrol_initial%5B6%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;gwt_tabcontrol_initial&quot; border=&quot;0&quot; alt=&quot;gwt_tabcontrol_initial&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9o9v-w_h6LxG9q1OX_9zDEB-OY-cfzD1yaQZsrPfYCgQKxq9i7U7B5eauFFDG12K1bLlBlKjHhu9MWPXZ7gt6EZ1fBf6bULyhtLttMjkj7GPJ8fj22dnu4t8oyoFPZu1VuPzUz6eqZvqT/?imgmax=800&quot; width=&quot;534&quot; height=&quot;171&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After the user clicks on one of the enroll buttons, I make the associated tab visible on the control, which results in this:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOAJxvYou8tYMeMuu_8YNoaEQZAvUnhjGFoApPYGJbJGqXpTVeSwf0edX6nHVi_26Ml7WBs6td_Ah-HPTUioNeco_nRwdFZTYqgTp32CSSZ9xN1R78WR1QxOMKnbg_YRTrwMgOAbhrkyLQ/s1600-h/gwt_tabcontrol_visible%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px&quot; title=&quot;gwt_tabcontrol_visible&quot; border=&quot;0&quot; alt=&quot;gwt_tabcontrol_visible&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIjci4LrNq2uf3CSLjTg6h990F7BuIWH1EJ-s93mMWfg36CT-4WUFx_-YGxZqdv26AFlzX9IkMbNwoiBrgc4ygwkyig-odA_wHTHvm3GXBfzpATBBAK88oz_Tv4Vsy_zOjfIf09G-xG0xl/?imgmax=800&quot; width=&quot;534&quot; height=&quot;167&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;Sample Code&lt;/h2&gt;  &lt;p&gt;The following is the sample code that I use to make all of this happen.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;UiBinder Page&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Here is a snippet from my RewardsView.ui.xml UiBinder file, with most of the user text redacted for brevity. Notice how I define all of the possible tabs up front:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;&amp;lt;g:TabLayoutPanel ui:field=&amp;quot;programsTabPanel&amp;quot; barHeight=&amp;quot;2&amp;quot; barUnit=&amp;quot;EM&amp;quot;&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Available&amp;lt;/g:header&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel styleName=&#39;program_tab&#39;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Demand Response&amp;lt;/g:header&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:tab&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:header&amp;gt;Energy Efficiency&amp;lt;/g:header&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:HorizontalPanel styleName=&#39;program_tab&#39;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&amp;quot;35%&amp;quot;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;g:cell width=&#39;65%&#39;&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CONTENT GOES HERE&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:cell&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:HorizontalPanel&amp;gt;         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/g:tab&amp;gt;         &lt;br /&gt;&amp;lt;/g:TabLayoutPanel&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;Hiding a tab during initialization of the UiBinder Composite&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I then set most of my tabs to invisible during construction of the UiBinder composite. Notice that I had to introduce an extra getParent() call to do this. If you don’t do this, you will find small slivers of the invisible tabs still visible (and still clickable by the user!). Making the parent invisible properly obscures the whole thing.&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;@UiField TabLayoutPanel programsTabPanel; &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;public RewardsView(String firstName) {      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; initWidget(uiBinder.createAndBindUi(this));       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; programsTabPanel.getTabWidget(1).getParent().setVisible(false);       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; programsTabPanel.getTabWidget(2).getParent().setVisible(false);       &lt;br /&gt;}&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Its a bit lame that I reference the tabs by index, but it works for me.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Displaying a hidden tab in a button ClickHandler&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Look at the &lt;a href=&quot;http://code.google.com/webtoolkit/doc/latest/tutorial/create.html&quot;&gt;StockWatcher sample&lt;/a&gt; if you need to learn how to create a ClickHandler for a button. You could also trigger visibility of a tab via other means. But in the end, you need a line of code like this to make the tab visible again:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;programsTabPanel.getTabWidget(2).getParent().setVisible(true); &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;You will need to determine the right tab index to enable (I show 2 above), but otherwise its a piece of cake. Done!&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:32fe5395-a5a9-4e95-9f6b-f97c99d04463&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/gwt&quot; rel=&quot;tag&quot;&gt;gwt&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/tabcontrol&quot; rel=&quot;tag&quot;&gt;tabcontrol&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/4167460112518698743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/code-sample-for-making-gwt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/4167460112518698743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/4167460112518698743'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/code-sample-for-making-gwt.html' title='Code sample for making GWT TabLayoutPanel tabs visible and invisible'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9o9v-w_h6LxG9q1OX_9zDEB-OY-cfzD1yaQZsrPfYCgQKxq9i7U7B5eauFFDG12K1bLlBlKjHhu9MWPXZ7gt6EZ1fBf6bULyhtLttMjkj7GPJ8fj22dnu4t8oyoFPZu1VuPzUz6eqZvqT/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-1129036280168116029</id><published>2010-04-02T14:17:00.001-07:00</published><updated>2010-04-02T14:17:48.343-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="virtualbox"/><title type='text'>Solution: Mouse disappears when using Skype Share Desktop in Windows VirtualBox VM on Ubuntu Linux Host</title><content type='html'>&lt;p&gt;That’s a mouthful. But I have an easy solution to this annoying problem. It happens when I run Skype in a Windows VM, and then opt to share desktop. The mouse will disappear, which makes for a tough time navigating around.&lt;/p&gt;  &lt;p&gt;This is my configuration:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Host OS:&lt;/strong&gt; Ubuntu Linux 9.10 (with all updates)&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Guest OS:&lt;/strong&gt; Windows XP SP3 (with all updates)&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Guest additions have been installed&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Hypervisor:&lt;/strong&gt; VirtualBox 3.1.4&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Skype:&lt;/strong&gt; Windows version 4.2.0.155&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Hardware:&lt;/strong&gt; Dell Latitude E6400&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Is simple. When I installed&lt;/p&gt;  &lt;p&gt; guest additions, it enabled a feature called “Mouse Integration”. It is enabled by default. However, with Skype it causes this mouse problem.&lt;/p&gt;  &lt;p&gt;For the duration of your Skype call, simply disable Mouse Integration and this problem goes away. Do this from the VirtualBox menu bar for your VM:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Machine –&amp;gt; Disable Mouse Integration&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:1848d386-ca8d-4a43-88ac-477e9528b0c1&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/ubuntu&quot; rel=&quot;tag&quot;&gt;ubuntu&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/virtualbox&quot; rel=&quot;tag&quot;&gt;virtualbox&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/1129036280168116029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/solution-mouse-disappears-when-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1129036280168116029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/1129036280168116029'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/04/solution-mouse-disappears-when-using.html' title='Solution: Mouse disappears when using Skype Share Desktop in Windows VirtualBox VM on Ubuntu Linux Host'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-2477718941182474292</id><published>2010-03-27T23:16:00.001-07:00</published><updated>2010-05-06T15:27:30.088-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="networking"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Solutions to VPN Problems with Ubuntu Linux – vpnc, network-manager, “terminated by dead peer”, WICD</title><content type='html'>&lt;p&gt;I have been successfully using the Linux &lt;strong&gt;vpnc&lt;/strong&gt; client to connect into the corporate network for months. However, I recently gained access to a more secure VPN network at the company, and I had nothing but trouble. This blog post explains the solution for that, as well as some other random network issues I was having.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Will this blog post solve MY problem?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I don’t know if I can help you, but here are the symptoms I was having on my machine:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I could establish VPN, but something truncated my connection every 5 minutes &lt;/li&gt;    &lt;li&gt;After establishing VPN from certain locations, I could not ssh to my target instance; it never resolved the IP address &lt;/li&gt;    &lt;li&gt;As I moved around the building (particularly up and down stairs), I had trouble with re-establishing network &lt;/li&gt;    &lt;li&gt;I found the network hanging every 2 minutes for a few seconds      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The key to solving these problems is to look into&lt;strong&gt; /var/log/syslog&lt;/strong&gt;. Do you see either of these entries?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&amp;quot;connection terminated by dead peer detection”&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This will be noted when something terminates your VPN connection&amp;quot;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;“Roamed from BSSID 00:0F:61:1B:A4:32 (ESSID) to (none) ((none))”,&lt;/strong&gt; followed by &lt;strong&gt;“Roamed from BSSID (none) ((none)) to 00:0F:61:1B:A4:32 (ESSID)”&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This will happen every 2 minutes, and will be associated with a pause in your network traffic.&lt;/p&gt;  &lt;h2&gt;network-manager was the problem for me&lt;/h2&gt;  &lt;p&gt;I believe the source of all the trouble was the second error noted above. Based on Google searches, this indicates that the network card is scanning for new wireless networks every 2 minutes. During this time (which lasts 6 seconds) no other network traffic can be sent. It makes sense that this would cause issues with a picky VPN.&lt;/p&gt;  &lt;p&gt;See &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/291760&quot;&gt;this Ubuntu bug report&lt;/a&gt; for a full explanation (and confusion as to the proper fix) related to this nasty problem. Some folks indicated the &lt;strong&gt;network-manager &lt;/strong&gt;component to be the source of the problem. network-manager is the default network manager for GNOME Linux distros (like Ubuntu). The problem reported in the bug report does not affect everybody – only some network cards. I run on a Dell Latitude E6400 with an Dell 1510 network card.&lt;/p&gt;  &lt;p&gt;Sadly, the network-manager folks didn’t agree that it was their problem. So I had to look elsewhere for a solution.&lt;/p&gt;  &lt;h2&gt;WICD was the solution for me&lt;/h2&gt;  &lt;p&gt;Following guidance from others posting on the bug report, I uninstalled network-manager and installed an alterative called WICD (pronounced “wicked”). I have been running WICD for a week, and I am sold. All of the issues that I reported are now gone. &lt;/p&gt;  &lt;p&gt;WICD has much of the same functionality of network-manager, but is a bit simpler which perhaps is its strength. Here is a screen shot of the WICD applet:&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynrKeeBIWTKRo44SaKtgqMrmH_X1E37BaX3JtMizRy8B3LRumjvbv4fx2jXkF01XNEIrLKrfxiHjT6AMSA1Z1mQpliM6YWRjeJMExQFbRME3TnlEQ9O8nkb1YzvFKLXYPYUfqaMjSEfZv/s1600-h/wicd_applet%5B3%5D.png&quot;&gt;&lt;img style=&quot;border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px&quot; title=&quot;wicd_applet&quot; border=&quot;0&quot; alt=&quot;wicd_applet&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWTKgv017YBZo7oKMWSZgOo1Z9qbtWt4TWulwYj9YIE0fMnLrXpC71jKOIdKy8k75bsEejdHm-Iqy5eiTAGsW8gvm_bX1Ry3u_2_MUvg3r1ov_EaXVT3CKVMZsidOXEcdxeyja78xXsYzh/?imgmax=800&quot; width=&quot;404&quot; height=&quot;327&quot; /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you wish to go this route (highly recommended!), issue the following command. It will install wicd and remove network-manager: &lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;sudo aptitude install wicd&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;Note that wicd doesn&#39;t currently (as of 1.6.1) have menu driven support for VPNs. It is supposed to come with version 2.0 though, so keep checking in on this. It simply means that to start a VPN connection, you will have to do it from the command line instead of from the applet. If you are using vpnc, that means you have to do this from a terminal:&lt;/p&gt;  &lt;p&gt;&lt;font face=&quot;Courier New&quot;&gt;sudo vpnc&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;WICD Pro Tip&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;One thing that should be the default in WICD, but isn’t, is to always show the wired network connection in the list. Choose this by checking the box in the UI here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Preferences-&amp;gt;General-&amp;gt;Always show wired interface &lt;/li&gt; &lt;/ul&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fdfc0c1b-19a5-407a-8d62-859b620e9ba0&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/linux&quot; rel=&quot;tag&quot;&gt;linux&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/ubuntu&quot; rel=&quot;tag&quot;&gt;ubuntu&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/networking&quot; rel=&quot;tag&quot;&gt;networking&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/wireless&quot; rel=&quot;tag&quot;&gt;wireless&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/VPN&quot; rel=&quot;tag&quot;&gt;VPN&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/2477718941182474292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/03/solutions-to-vpn-problems-with-ubuntu.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2477718941182474292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/2477718941182474292'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/03/solutions-to-vpn-problems-with-ubuntu.html' title='Solutions to VPN Problems with Ubuntu Linux – vpnc, network-manager, “terminated by dead peer”, WICD'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWTKgv017YBZo7oKMWSZgOo1Z9qbtWt4TWulwYj9YIE0fMnLrXpC71jKOIdKy8k75bsEejdHm-Iqy5eiTAGsW8gvm_bX1Ry3u_2_MUvg3r1ov_EaXVT3CKVMZsidOXEcdxeyja78xXsYzh/s72-c?imgmax=800" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3662509960113735055.post-443985252161759292</id><published>2010-03-27T22:17:00.001-07:00</published><updated>2010-04-02T14:21:04.862-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><title type='text'>Eclipse missing from JPS (Java Process Status) command results list</title><content type='html'>&lt;p&gt;It has been a while since I have posted. I have been working on some interesting stuff, but somehow didn’t manage to post about it. I will start to correct that.&lt;/p&gt;  &lt;p&gt;I had a lot of work to do leading up to this past week. I had a couple of demos due for a big trade show at work. I hit a lot of bumps in the road due to infrastructure problems. I made a list, and I am working through them now that the deadlines are over. The next few posts will probably be about solutions to those.&lt;/p&gt;  &lt;p&gt;The one covered here is pretty lame, but I’ll post it anyway.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Java Process Status command&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I use the Java Process Status command line tool enough to want it to work perfectly. But, by default, it doesn’t. After launching Eclipse, I would execute JPS and get results like this:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;plaird@plaird-laptop:~$ jps      &lt;br /&gt;18589 Jps       &lt;br /&gt;18339&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;If I launched multiple copies of Eclipse with different workspaces, I would predictably get:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;plaird@plaird-laptop:~$ jps      &lt;br /&gt;19369       &lt;br /&gt;18339       &lt;br /&gt;19388 Jps&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This isn’t a big problem, but its annoying. I put it on the list, and looked into it tonight. The reason is simple, and so is the solution.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;JPS only works when using the standard Java launcher&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The clue comes from the &lt;a href=&quot;http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jps.html&quot;&gt;JPS documentation&lt;/a&gt;. It states:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The jps command uses the java launcher to find the class name and arguments passed to the main method. If the target JVM is started with a custom launcher, the class name (or JAR file name) and the arguments to the main method will not be available.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Well, that explains it because as many people know…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Eclipse uses a custom (native) launcher&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After installing Eclipse, you are provided with a handy executable in the Eclipse directory. Invoking this thing launches Eclipse. Under the hood, it uses platform specific code to make it happen. The main benefit for doing this is to ensure that Eclipse is contained within a single OS process. The native code launches the JVM within its same process using a custom launcher. This appears to be a problem, but…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;There is a way to use the standard launcher for Eclipse&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;However, you can revert to using the standard launcher. As per the &lt;a href=&quot;http://dsdp.eclipse.org/help/latest/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/launcher.html&quot;&gt;launcher docs&lt;/a&gt;, there are several ways to do this. The way I chose is to make sure my eclipse.ini has these lines:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;-vm      &lt;br /&gt;/usr/lib/jvm/java-6-sun-1.6.0.16/bin/java&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Since the path for the vm arg is the standard Java launcher, it uses that instead of the custom launcher. Now look at my JPS results:&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;plaird@plaird-laptop:~$ jps      &lt;br /&gt;19369 org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar       &lt;br /&gt;18339 org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar       &lt;br /&gt;19388 Jps&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Problem solved. Well…&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Caveats&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Sadly, this doesn’t solve the problem of identifying which workspace is in use by either. But as long as you remember the order in which you started them, in most cases the pids will be in order.&lt;/p&gt;  &lt;p&gt;And the known downside of multiple processes is evident in a &lt;strong&gt;ps –ef&lt;/strong&gt; command: &lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;18325&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1 /bin/sh /home/plaird/Apps/eclipse35/eclipse.sh      &lt;br /&gt;18326 18325 /home/plaird/Apps/eclipse35/eclipse       &lt;br /&gt;18339 18326 /usr/lib/jvm/java-6-sun-1.6.0.16/bin/java equinox.launcher.jar &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size=&quot;1&quot; face=&quot;Courier New&quot;&gt;20111&amp;#160;&amp;#160;&amp;#160;&amp;#160; 1 /bin/sh /home/plaird/Apps/eclipse35/eclipse.sh      &lt;br /&gt;20112 20111 /home/plaird/Apps/eclipse35/eclipse       &lt;br /&gt;20128 20112 /usr/lib/jvm/java-6-sun-1.6.0.16/bin/java equinox.launcher.jar&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Which is worse – JPS not listing Eclipse or having more goo in a ps listing?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Random Footnote&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I noticed this comment in the JPS docs:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;The lvmid is typically, but not necessarily, the operating system&#39;s process identifier for the JVM process.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;This means that the pid/lvmid reported by JPS cannot always be used in a kill command. Good to know.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;div style=&quot;padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px&quot; id=&quot;scid:0767317B-992E-4b12-91E0-4F059A8CECA8:79faaccf-4ec1-4db7-b788-991c1b8142a2&quot; class=&quot;wlWriterEditableSmartContent&quot;&gt;Technorati Tags: &lt;a href=&quot;http://technorati.com/tags/java&quot; rel=&quot;tag&quot;&gt;java&lt;/a&gt;,&lt;a href=&quot;http://technorati.com/tags/eclipse&quot; rel=&quot;tag&quot;&gt;eclipse&lt;/a&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://peterlairdtech.blogspot.com/feeds/443985252161759292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://peterlairdtech.blogspot.com/2010/03/eclipse-does-not-appear-in-jps-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/443985252161759292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3662509960113735055/posts/default/443985252161759292'/><link rel='alternate' type='text/html' href='http://peterlairdtech.blogspot.com/2010/03/eclipse-does-not-appear-in-jps-java.html' title='Eclipse missing from JPS (Java Process Status) command results list'/><author><name>Peter Laird</name><uri>http://www.blogger.com/profile/03129951400907428207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP8OS93ja8ngAlGSYn-BO0ykgfhKtk4FzgQcwye_LULLKhVLY3oUI3LgeYd6z0Zhi_vNTEfenfj8uHVPSl1PXbbZYWm6axW2XbtZVdDMS8mjpdinKn6895Eialo3ScRA/s220/peterlaird_headshot.jpg'/></author><thr:total>0</thr:total></entry></feed>