XNSIO
  About   Slides   Home  

 
Managed Chaos
Naresh Jain's Random Thoughts on Software Development and Adventure Sports
     
`
 
RSS Feed
Recent Thoughts
Tags
Recent Comments

Archive for the ‘Tips’ Category

Cannot create JDBC driver of class ” for connect URL ‘null’

Monday, November 23rd, 2009

On, one of our tomcat boxes in production, we kept getting the following exception when trying to start the server:

17:06:30,823 ERROR SchemaUpdate:134 - could not get database metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
        at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper. prepare(SuppliedConnectionProviderConnectionHelper.java:27)
        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127)
        at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:314)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:808)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
        at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
        at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
        at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
        at java.sql.DriverManager.getDriver(DriverManager.java:253)
        at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
        ... 22 more

Googling for it, only kept suggesting to check our context.xml file, which appeared to be correct. In fact the same war works fine on other instances of tomcat.

All we were doing in our context.xml file is that we’re defining a Data Source Resource. Which gets referred in our Web.xml. Pretty straight forward.

Looking back at the exception, particularly the following part:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create JDBC driver of class '' for connect URL 'null'

suggests that tomcat was not able to find the Data Source definition which is of course defined in our context.xml file. So certainly there was something to do with Context.xml causing the failure.

On comparing this web app with the other, working tomcat instances, I found Context.xml file was present on both instance in the webapp/<web_app_name>/META-INF dir. Which is fine. But on the working tomcat instance I found another file called <web_app_name>.xml (with the same contents as Context.xml) file under the tomcat/conf/Catalina/localhost folder. This <web_app_name>.xml file was missing on the tomcat instance.

Solution: Copy the Context.xml file to tomcat/conf/Catalina/localhost folder and renaming it to <web_app_name>.xml got rid of the exception. This made it clear why tomcat was throwing this exception and failing to start.

Something was stopping tomcat from creating this file. And of course it turned out to be a tomcat user permission issue. The user under which tomcat was running did not have permission to write to these folders. So we changed the group ownership of tomcat and /etc/tomcat folder to the same group to which the tomcat user belonged and magically everything started working as before.

Simple Regression Testing for Static Web Sites

Wednesday, November 18th, 2009

For Freeset, I’ve always been in the quest of Simplest Thing that Could Possibly Work. In a previous post, I explained how we’ve embraced an ultra-light process (call it lean, if you like) to build their e-commerce site.

In that post, I’ve talked about our wish to create a Selenium test suite for regression testing. But it never got high enough on our priority list. (esp. coz we mostly have static content served from a CMS as of now).

While that is something I wanted to tackle, last night, when I was moving Industrial Logic and Industrial XP‘s site over to a new server hardware, I wanted some quick way to test if all the pages were correctly displayed after the move. This was important since we switched from Apache to Nginx. Nginx has slightly different way to handle secure pages, etc.

So I asked on Twitter, if anyone knew of a tool that could compare 2 deployments of the same website. Few people responding saying I could use curl/wget with diff recursively. That seemed like the simplest thing that could work for now. So this morning I wrote a script.

rm -Rf * &amp;&amp; mkdir live &amp;&amp; cd live &amp;&amp; wget -rkp -l5 -q -np -nH http://freesetglobal.com &amp;&amp; cd .. &amp;&amp; mkdir dev &amp;&amp; cd dev &amp;&amp; wget -rkp -l5 -q -np -nH http://dev.freesetglobal.com &amp;&amp; cd .. &amp;&amp; for i in `grep -l dev.freesetglobal.com \`find ./dev -name '*'\`` ; do sed -e 's/dev.freesetglobal.com/freesetglobal.com/g' $i &gt; $i.xx &amp;&amp; mv $i.xx $i; done &amp;&amp; diff -r -y --suppress-common-lines -w -I '^.*' dev live

I’m planning to use this script to do simple regression test of our Freeset site. We have a live and a dev environment. We make changes on dev and frequently sync it up with live. I’m thinking before we sync up, we can check if we’ve made the correct changes to the intended pages. If some other pages show up in this diff that we did not expect, it’s a good way to catch such issue before the sync.

Note: One could also use diff with -q option, if all they are interested to know is which pages changes. Also note that under Mac, the sed command’s -i (inline edit) option is broken. It simply does not work as explained. If you give sed -i -e …., it ends up creating backup files with -e extension. #fail.

Where is the real innovation happening?

Sunday, October 18th, 2009

It appears to me that the Agile Community is falling behind the innovation curve. At conferences, user groups, mailing list, etc, we see the same old same old stuff (may be I’m missing something). So where is the real innovation happening? What space should I be watching?

These were the questions I posed to the group @ the SDTConf 2009. Later, during our discussion at the conference we tried answering them. After a wonderful discussion we come up with some suggestions:

  • Web 2.0
  • Alternative Language (non-mainstream languages) space. Lot of interesting experiments going on in
    • Dynamic language space
    • Functional language space
    • Hybrid language space
  • Domain Specific Language space
  • Could Computing, Parallel Computing (Grid Computing), Virtualization space
  • Code Harvesting Space – Check out Test Driven Code Search and Code Genie as a starting point
  • Complex Adaptive Systems and its implication on our social interactions space. Dave Snowden’s work is a good starting point
  • eLearning and visual assessments (feedback) of a programming session. Check out Visualizing Proficiency
  • Polyglot Programming space
  • With Google Apps, people are able to build 100s of Apps each month and get instant feedback on their ideas
  • Social Networking and Second Life space
  • Conference: Lot of interesting experiments are been conducted in the conference space. Conferences have evolved to something very different from before.
  • Distributed Development and Remote Pairing space

If you would like to contribute to this list, please add your point on the SDTConf Wiki.

Setting up Huawei Mobile Connect on Snow Leopard

Monday, September 21st, 2009

Recently I upgraded to Snow Leopard and found my Huawei Modem (Model: EC168C) which came with Tata Indicom Photon+ does not work any more. On Huawei’s user forums they claim that these modems are not tested with Snow Leopard.

I tried to manually set up the modem in my network settings under System Preferences and it seems to work. Following are the steps I took to set up a new network service:

Add New Network Service

Once we click on the + button, select

Select Huawei Modem Interface

Once you select the Huawei Modem, you will need to fill the following info

Configure Modem Settings

Please fill in the exact same info as shown in the image above. Note that password is “internet”. Make sure the “Show modem status in menu bar” check box is checked. You’ll see later, we use this from the menu bar to connect to the internet.

Once you have entered the data as shown above, clicking on the Advanced… button will show:

Advanced Settings

Make sure to select “Sierra Wireless” as the Vendor (even though you are using Tata Indicom).

If you are using Photon Plus, then select “au by KDDI” as the Vendor. Sierra won’t work.

Click OK and then Apply.

Now you are all set to connect to the internet using your Photon account. Insert your USB modem, do not use the MobileConnect.app; instead use the Menu Bar to connect:

Connectin to the Internet from Menu Bar

Hopefully this explains the step by step set-up process to get our Huawei Modem to work on  Snow Leopard.

Distributed Standup Meetings: Spam or Ham?

Tuesday, September 8th, 2009

Distributed Stand-up meetings essentially becomes a lot of ceremony and the true value of communication, feedback, team bonding, working towards a common goal starts falling apart.

If you have done distributed stand up meetings you would have noticed that its not easy to communicate to a bunch of people on the other side of the phone. (Telephonic conversations are good when there is just one person on the other side. As the number of people on the other end of the phone starts increasing the quality of communication starts dropping).

Also if you have noticed, when a person does not know who is listening on the other side of the phone, they usually speak very little. May be they just talk about 2 out of the 3 things (What they worked on and what they plan to work on. They skip the learning/roadblocks part). I would argue that you can understand who is working on what by looking at the story wall (you don’t really need a stand-up for that). More on this @ Standup Meetings: Missing the Forest for a Tree.

People have tried using Video Conferencing and other techniques, but it usually falls short of encouraging and fostering true communication. It also leads to a lot of time wastage and ceremony (prep-time, getting to the video conferencing room or setting up the video conference tool on your machine). IMHO, its easy to get distracted when the person speaking is not in front of you. So your attention span starts reducing and if you have a team of 8-10 people, it would be difficult to comprehend and remember who said what.

So if Distributed Stand-up meetings as they stand are not the best options, what else can we do?

I have 2 suggestions:

1) Really light weight option: User a chat (conference) room. Everyone from the team shares their bits simultaneously and then people have a small chat to decide the game plan for the day. This has a nice side effect. These notes get naturally persisted in the chat history. So if someone misses the standup or if someone wants to go back and refer to some day’s standup notes, they have it accessible. Also creates a felling of async, non-blocking io (Remember the good old open source days, this is how we used to work).

2) Slightly more process centric: One-on-One Standing Meeting: Each location has their own stand-up meeting at beginning of their day (or what ever time is suitable for the local team). And then, when both teams are online, one member from each team will update the other team(s) about their progress and anything else which is important that might affect the other team(s).

Usually people think of this as a Scrum-of-Scrums where ScrumMasters from each team present their status. We don’t use ScrumMaster. Instead we make this a rotating responsibility of each team member.  Which means, one team member from each team will represent their team in the standing meeting in a round-robin fashion per day. Next day, the person who represented the team in the standing meeting, not only shares their progress with others, but also shares other team’s progress with the rest of the team. The next person in the queue then attends the next standing meeting. These meetings are usually very light weight and are done in 5-10 mins.

P.S: One pant does not fit everyone, find out what works for you and evolve from there.

Value Driven Leadership

Monday, July 20th, 2009

I came across this wonderful e-book called Did I Provide Value: The 8 Disciplines Of The Value Added Leader by folks from Business Efficacy, Inc.

Leaders who relentlessly provide value to every individual in each interaction achieve success no matter how it’s defined. A direct correlation exists between Leaders who passionately work at providing value and employee respect & appreciation.

Following are my key take-away (para-phrased):

  • Accountability – Take It On
    • Everyone has a behavioral comfort zone. Moving beyond this comfort
      zone takes motivation, courage, and persistence
    • Valued leaders are not constrained by a desire for popularity. Instead, they just take it on. They realize respect is earned by helping others to achieve more than they believe possible.
  • Timing, Not Time
    • Timing is more important than time in making this happen
    • No matter what is being done, never waste a learning opportunity
    • “just-in-time” coaching action is almost always superior to a planned
    • Employees value coaches being present at precisely the moment of need; effective leaders deliver this regardless of other demands
    • Do not base your actions on time or time management. Instead, drive your priority management based on commitment
  • It’s All About Them
    • Personal gratification for a Leader is achieved by ensuring others reach their full potential and are enormously successful.
    • Leader make sure they know what motivates each individual they coach. They then use this knowledge to make each required behavior make sense from the individual’s perspective, and show how it ties in to her personal motivations. When done effectively, employees quickly trust their leaders are dedicated to their success.
    • Leaders eschew the notion of “one size fits all” and tailor their communication style and learning methods/activities for each individual
    • A Leader’s first objective should always be to remove barriers to listening, comprehension, dialogue, behavioral change, and skill mastery as quickly as possible
  • Stay With It Until They Get It
    • It is pretty basic ? the more people there are doing the right activities, the more effective the execution is on what matters.
    • In today’s world of multi-tasking and conflicting agendas, it’s difficult to develop mastery.  Adequate (but not great) performance is often accepted.
      Repetitive practice and action is the building block of mastering any concept or task.  Unfortunately, personal tolerance for this effort wanes under the burden of our “get it done now” mentality.
    • Create opportunities to keep working on essential skills, even when dealing with a conflicting emphasis
  • Clear Expectations
    • Clear expectations make it easy for employees to self-evaluate and determine if work is being done well
    • Expectation clarity requires thoughtful determination of each essential behavioral requirement
  • High-Impact Few
    • Activity for activity’s sake must not be allowed. The mission is to do a few common (core) things exceptionally well
  • Ask More Than Tell
    • Learning is dependent upon critical, reflective thinking.  Increasing understanding is best accomplished by determining what, how, and why something is happening.
    • Self-discovery is a staple of the learning process. Make way for it.
    • When purposeful questioning is combined with timely, useful suggestions, true guidance/assistance is achieved
  • Learn From Each Win
    • Catch people when they are doing something right and make a big deal out of it
    • Its important to know how each individual prefers to receive recognition
    • Demonstrate an enthusiasm for success
    • Unfortunately, many don’t focus on finding success. They seem to dwell on communicating only what either is not being done or what is being done incorrectly
    • It’s important to address performance issues.  However, instead of criticizing, utilize everyday wins to help develop confidence, composure, and concentration
    • Individuals without the confidence to pursue success is destined for mediocrity
    • Invite people to enjoy the process, have fun, and celebrate a task well done. Understand doing so, encourages the characteristics in people which will help to achieve results.

Embracing Naturopathy and Yogic Science

Monday, July 20th, 2009

Over the last 5 months I’ve lost 20 kgs. People ask me what diet am I following? (Glad no one asked me, where I got my liposuction done).

I think there are 2 main factors behind this:

  • Zero international travel (up until last month)
  • And I tried to get may act together.

So, in Feb I took a 10 day break from the concrete jungles and headed over to Jindal Nature Cure Institute. At Jindal, I surrendered myself to mother nature. The beauty of this place is, its a charitable hospital, not a luxurious spa.

At Jindal they put you through a very rigorous, yet relaxing process to get your life back in form. Everything is natural, which means no side-effects.

A typical day in life @ Jindal would be:

  • 45 mins compulsory brisk walk @ 5:00 AM
  • 15 mins Yogic Kriyas
  • 10 mins Open Laughter Session
  • First fresh Juice of the day @ 7:00 AM
  • 45 mins Pranayama session @ 7:30 AM
  • 10 mins Mud packs for eyes and kidneys @ 8:20 AM
  • Wonderful massages, steam/sauna bath and other water treatments @ 8:30 AM
  • Second fresh Juice of the day @ 9:15 AM
  • 9:30 AM, time for 45 mins Yoga class
  • 10:30 AM, time for Eye exercises.
  • Since I choose to stay on Liquid Diet, I would have my lunch (2 glasses of fresh juice) @ 11:15 AM
  • Post lunch was free time. Some people choose to go to Gym, I was too busy catching up with my sleep.
  • 2:00 PM, time for another Juice.
  • Second round of eye & kidney pack and massage post 2:00 PM.
  • 3:30 PM time for 5th Juice of the day
  • 3:40 PM second 30 mins Yoga class of the day.
  • 4:30 PM, time for a quick 10 mins reflexology track walk.
  • 4:45  – 5:45 PM, time for a wonderful walk around the Lake
  • 6:00 PM swim time. Good 30 mins swim in cold chilling water.
  • 6:45 PM: Dinner time. Yes, 2 more juices for me please.
  • Post dinner, time for some more walks
  • 7:30 PM: Socializing time. Usually I would play Table Tennis for 30 mins and skip the boring lectures by guest speakers.
  • 8:15 PM: Last drink for the day. Hot Tulsi water with lime.
  • Time for some more walking and gazing the stars. The sky never looked so beautiful before.
  • 10:00 PM lights off. Retire to your dreams.

Yes its a busy schedule, but its fun. 10 days is a good time frame.

After 10 days, I had just lost 4 kgs. (3.5 Kg fat, 0.3 Kg water and 0.2 Kg muscle). I was disappointed with the results. Obviously, after coming back, I won’t be able to maintain this life-style.

Surprisingly after coming back, I’ve not gained weight at all. In fact I’ve lost 16 more kgs and now my weight is stabilizing. After coming back, I’ve tried to follow:

  • Daily
    • 2-4 Glasses of water soon after waking up
    • 30 mins Jog/Cycle/Swim/Yoga & Pranayam in the morning
    • Throughout the day, try to drink at least 12 glasses (3 lt.) of water
    • Try to eat more raw food (fruits and vegetables with their skins)
    • Keep a gap of 3 hrs between dinner and sleep
    • Reduce my intake of salt, sugar and processed wheat flour (3 white killers)
  • Weekly
    • Fast one whole day on liquid diet
    • Vamana Dhauti (forceful vomiting)
    • Oil Massage + Steam Bath

That’s it folks. The secret behind me looking 5 years younger.

Unable to initialize TldLocationsCache

Thursday, July 9th, 2009

On one of the projects we are using Cargo Maven Plugin to run an embedded Jetty server for our builds. Out of the blue, today, I started getting the following error when I was running my Selenium Tests after deploying the application.

1
2
3
4
5
6
7
WARN:  Nested in org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null:
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
at org.apache.jasper.compiler.TldLocationsCache.init (TldLocationsCache.java:253)
at org.apache.jasper.compiler.TldLocationsCache.getLocation (TldLocationsCache.java:224)
at org.apache.jasper.JspCompilationContext.getTldLocation (JspCompilationContext.java:526)
at org.apache.jasper.compiler.Parser.parseTaglibDirective (Parser.java:422)
...

No clue why this is happening. Surprising this is, this issue cannot be reproduced on a Windows box. Only on my Mac with JDK 1.6 and Maven 2.0, I’m getting this issue.

On goolging for this issue, I make across this bug report which kind of indicated that this might be an issue with the Cargo Maven Plugin. On upgrading the plugin to version 1.0, the issue was solved. 🙂

Need to find out what caused the problem in the first place.

People I like following on Twitter

Wednesday, June 10th, 2009

@agilemanager
@WardCunningham
@marick
@JoshuaKerievsky
@jbrains
@bpettichord
@nashjain
@venkat_s
@jeffpatton
@testobsessed
@jamesshore
@coreyhaines
@cory_foy
@mfeathers
@unclebobmartin
@rachelcdavies
@sf105
@jeantabaka
@martinfowler
@KentBeck
@RonJeffries
@GeePawHill
@bigballofmud
@olabini
@deborahh
@redsquirrel
@DianaOfPortland
@sai_venkat
@sandeepshetty
@patrickwelsh
@elefevre
@lukehohmann
@simpsonjulian
@dsaff
@tastapod
@gerardmes
@chzy
@dchelimsky
@athought
@rebeccawb
@mpoppendieck
@pramodsadalage
@lisacrispin
@rebeccaparsons
@odersky
@ericries
@PragmaticAndy
@TotherAlistair
@paulk_asert
@kensipe
@jimweirich
@tedneward
@scottdavis99
@neal4d
@pragdave
@stuarthalloway

This is not a comprehensive list. I’m sure I’m missing some more folks. These folks came to my mind immediately or they have been tweeting recently.

Standup Meetings: Missing the Forest for a Tree

Wednesday, May 20th, 2009

I’ve seen some teams getting so caught up in answering the 3 questions of the stand-up meetings, that they even forget the objective behind the standup meeting.

Following are NOT the goals of a standup meeting:

  • Get in-sync or to know who is doing what & where they stand. 
    • That information can be achieved through the story-wall (virtual story-wall if you are using a Agile PM tool). If you are a team of 3-4 people and sitting next to each other, you’ll anyway have this information (you better).  
  • To identify impediments. 
    • Why wait till the standup meeting to identify something is blocking you. If you can’t solve something yourself, bring it up to others notice immediately. Don’t sit on it.
  • Status report. 
    • This is the worst goal you can have for standup meetings. We are moving away from micro-management. 
  • Communication to the chickens. 
    • Again they can look at the project status on the story-wall. Or they can stop by in the team room and talk to someone informally. We don’t need to have a meeting for them.
  • And so on…

IMHO the real goals of a standup meeting is

  • To come up with a Game Plan till the next standup meeting. 
    • Its an opportunity to inspect and adapt 
    • Helps in doing micro-re-prioritization 
    • Helps in keeping everyone on the same page as far as the goals/vision is concerned

If answering the 3 questions helps towards this goal, then go ahead. But don’t think of them as an end in themselves.

    Licensed under
Creative Commons License