JUnit report StackOverflowError ; a quick hack fix

Posted by Rajesh Shetty on June 08, 2010

Blog post after a long time but this one deserves it because this can save someone a day or few minutes/hours of their time for sure.

Issue: When you run JUnit report generation using Ant target you will run into java.lang.StackOverflowError.

Where: Happens only on Windows machine (at least I have seen it). Works fine on linux/mac os x.

Why: When XSLT engine runs thru all the properties supplied to it while doing the actual test case to report translation, it runs into java.class.path variable specified and if your class path has too many path elements , it goes into infinite death loop.

How to fix: A Quick hack or fix (whatever you want to call it as); is to tell XSLT engine ignore the java.class.path while evaluating properties. To do that you will have to explicitly specify where to pick up the stylesheet from. Luckily junitreport lets us specify the external xsl folder location using styledir attribute in

 <report ... 

tag. So this is what you need to do.

  1. get a copy of junit-noframes.xsl (if you are using with frames get a copy of that) from the internet. or you should be able to get this from the latest version of Apache Ant and it should be located in /etc folder. Now copy this xsl fi
  2. Now change

    <xsl:template match="properties"> 

    section from

    <xsl:for-each select="property">

    to

    <xsl:for-each select="property[not(@name = 'java.class.path')]">

    and save this file in some location e.g c:/junit/xsl

  3. In your ant target explicitly specify the junit-noframes.xsdl location by adding styledir . It should look something like this

    <report format="noframes" todir="${junit.test.reports.dir}" styledir="c:/junit/xsl" />

That should fix the issue.
Point # 2 above tells the xsl engine to ignore classpath variable.

Rails, Phusion Passenger, Apache httpd Permission Denied error - Resolved one way.

Posted by Rajesh Shetty on February 25, 2009

This blog post is long due. Once again its a quick tip which can save lot of developers time in setting up rails with phusion passenger when they run into permission denied error.

After installing Passenger Phusion on a existing Apache HTTP web server when I started the Apache server and try to launch the app in browser I was getting following error.

[client ::1] (13)Permission denied: access to /favicon.ico denied, referer: http://localhost/

[client ::1] (13)Permission denied: access to / denied


After fixing obvious issues around permission like below, still no luck.
  • chmod on rails directory , so that Apache/Phusion would have all the permission to access the rails directory
  • Adjusting VirtualHost directory permission in Apache config (httpd.conf) file to allow all which would look something like this

<VirtualHost *:80>
ServerName localhost
DocumentRoot  <rails app directory>
<Directory  <rails app directory> >
Allow from all
</Directory>
RailsEnv development
RailsDefaultUser root
</VirtualHost>

As I was going thru httpd.conf in detail, I noticed that Apache kicking off the process under user  ”Daemon” every time I started the web server. This surely sounded like a issue to me and can lead to permission problems. So it was just a matter of changing this user to the my default user and bounce the server. This finally fixed it.
Look for following in your httpd.conf

User daemon


change this to

User <default machine user>


Here is one reference which talks about solution similar to what I explained above.

Following are some references for installing phusion passenger

Blogged with MessageDance using Gmail | Reply On Twitter

Supercharge your tweets with FatBird ; Its on Steroids.

Posted by Rajesh Shetty on July 11, 2008

This post is been in sitting a queue for a while and today I get a time to write about it. As most of us know Twitter is the new way of looking at the news. Well I should say it is new age media now. There is certainly a media shift happened in last few months around twitter. We get to see breaking news on Twitter before A-listers of the media.

Lot of mainstream bloggers using twitter more often than ever. Even though there was quite bit of apprehension about whether twitter can go mainstream or ready to go mainstream, according to me gap between mainstream media and twitter media is very perceptional and your attention span. Big difference between these two is that news on twitter comes in packet of 140 characters and you have running stream of updates to read the whole story. Having said that every tweet (one status update on Twitter) becomes very important for followers (in a traditional media its readers) to consume when someone updates his/her status (traditionally news publisher).


There are tons of twitter apps doing interesting things and adding value to this whole twitter ecosystem. Here at MesageDance we been a fan of Twitter from day one and had twitter status udpate posting via email for few months along with every message users sends (blog post, YouTube video, Digg share, Google Reader share etc) to MessageDance can be updated to user’s Twitter timeline.


With FatBird, we released a new feature called “MyTweets“. With this feature MessageDance becomes the full blown client to Twitter which can send, receive your tweets on demand along with other goodies. Check it out..


Bling Your Tweets


MyTweets in a true sense supercharges your tweets. User’s 140 characters gets more powerful as it exposes important assets of each tweet.
  • TinyURL expansion : instead of tinyurl , It expands the url and shows the real url to the user
  • If the url is YouTube video url it shows YouTube video right below user’s tweet.
  • If the url is Flickr url it shows Flickr photo right below user’s tweet.
  • If the url is MP3 it shows audio player inline right below the tweet.
  • User can Reply or Retweet right there from each tweet.
It feels good to save user some time and few clicks on the WWW.


Set your tweets free with TweetShare.

Having done all the blinging to tweets, How about setting your tweets free to go wherever they want to go?.




TweetShare
feature
  • Lets users send the anyone’s last 10 tweets (whom user is following) to their blog, friends, facebook etc.
  • Lets users send conversational tweets to user’s social destinations.
This opens up the door for tweet blogging and link love between blogger and urls in the tweet.
FatBird is your tweets on steroids. Let it fly to places.

Blogged with MessageDance using Gmail | Reply On Twitter

SCRAPER BIKE

Posted by Rajesh Shetty on April 30, 2008

These guys just featured on TV and making lot of name. More than 2 million hits on YouTube and they are nominated for best video last year.

Blogged with MessageDance using YouTube

Now bollywood starts blogging, Starting with big guns 1

Posted by Rajesh Shetty on April 29, 2008

Big B started his blog to communicate with his fans, This comes after Amir Khan launched his blog previously. This should have happened long back, but slowly it is hitting people who are vocal about issues.

Website Snapshot

Bollywood film legend Bachchan turns blogger - Yahoo! News

Indian film megastar Amitabh Bachchan has reached out to fans in cyberspace, launching a blog about his life which has triggered a flood of responses from around the world.

Blogged with MessageDance using Gmail

Great new Toy concept: Moov

Posted by Rajesh Shetty on April 10, 2008

IKEA meets Toy World. Very interesting for kids as they can build real life big enough rides.

Blogged with MessageDance using YouTube

Coke Commercial “Sip Stealing”

Posted by Rajesh Shetty on March 19, 2008

“Sip Stealing”. A good ad. As always coke has interesting ad campaigns.

Blogged with MessageDance using YouTube