Zephyr Logo

Shailesh’s Blog

Implementing RIA technologies to make TestManagement, a breeze

Using LCDS to Power Live REAs

Posted in lcds, SaaS, Zephyr, tomcat by shailesh.mangal on the April 23rd, 2009

I gave a talk on “Using LCDS to Power Live REAs” at SilvaFug South and showed Zephyr as an example of this. I briefly discussed what forced us to go down this route followed by a quick 30 min demo of the product. Explained general philosophy behind LCDS, things to keep in mind while designing applications based on LCDS, issues and misconceptions around LCDS and how we got around those issues. Here are the presentation slides.

Tomcat Error - java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

Posted in java, tomcat by shailesh.mangal on the April 13th, 2009

One fine day my smooth running tomcat 5.5.23 started giving this error. Most surprising thing was that nothing had change in my setup or the application which could result such a drastic error.

2009-04-13 11:18:54,665 ERROR [main] [/flex].listenerStart(3715) | Error configuring application listener of class com.thed.server.event.DataListener
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

The issue turned out to be permission issue of the working folder where I started tomcat from. I realized this when I tried to check version of java and got following error.

Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
Abort trap

Also discussed in this thread - http://forums.sun.com/thread.jspa?threadID=560395

Any case, I shutdown and started tomcat from a different folder and every thing was honky dory again.

Zephyr uses CloudFront

Posted in Zephyr by shailesh.mangal on the November 20th, 2008

Amazon recently announced cloudFront, a content delivery service. Like all other amazon service, this service is also very simple to implement with pay as you go pricing. It made sense for us to move our website static contents and downloadable files to cloudfront. It took us less then half a day from signing up for the service to move everything over to Amazon. Now, all the static resource for www.getzephyr.com is served up from CloudFront.

CloudFront doesn’t yet support media streaming but its in their roadmap. I can’t wait to move ZephyrTV files over to CloudFront.

Embedded Zephyr TV

Posted in Zephyr by shailesh.mangal on the November 11th, 2008
You need the Flash Player to view this video.

Amazon shortlists Zephyr

Posted in SaaS by shailesh.mangal on the November 7th, 2008

Its barely been two weeks since we formally announced ZaaS (Zephyr as a Service) and got selected as one of the 6 finalists in AWS Startup Challenge. It would be tough for a enterprise software to compete against consumer software and not even a fair one. But hey, if it was easy, any body could have done it. Some of the sites talking about it:

Deploying PHPFileNavigator on tomcat - Step by Step

Posted in Fedora by shailesh.mangal on the October 3rd, 2008

Its not very common to come across a need to install php on a J2EE server. For the same reason, there is not enough documentation written around this. It took me a while to figure out all the pieces. Hope this is helpful.
Environment
Tomcat : 5.5.23
OS: Fedora
PHP: 5.2.6
Assumptions
tomcat is already installed
Mysql is already installed

Steps

1. Download and deploy PHP Java Bridge from http://php-java-bridge.sourceforge.net (just copy the war file to /webapps)
2. Recompile PHP (with various option) that are not there in the binary that come with the above bridge

  • Download php source www.php.net[http://www.php.net/get/php-5.2.6.tar.gz/from/this/mirror]
  • extract it to /home/zephyr/tmp/
  • Install development packs of following
    yum install libpng-devel
    yum install libjpeg-devel
    yum install zlib-devel
  • go to extracted folder and run
    ./configure --prefix=/home/zephyr/tmp/php-5.2.6 --disable-all --enable-session --enable-fastcgi --enable-pcre-regex --with-pcre-regex --with-fastcgi --with-gd --with-mysql --with-zlib
    >> You can ignore following warnings

    Notice: Following unknown configure options were used:

    –enable-pcre-regex
    –with-fastcgi

    make
    make install

  • rename
    $CATALINA_HOME/JavaBridge/WEBINF/cgi/php-cgi-i386-linux --> php-cgi-i386-linux-original
  • Stop tomcat
  • copy the compiled php binary to replace the orignal
    /home/zephyr/tmp/php-5.2.6/bin/php-cgi $CATALINA_HOME/JavaBridge/WEBINF/cgi/php-cgi-i386-linux
  • Start tomcat3. Download and extract PhpFileNavigator into $CATALINA_HOME/JavaBridge/explorer
    4. go to http://localhost:8080/JavaBridge/explorer and follow the installation steps
  • Logging Hibernate queries

    Posted in Hibernate by shailesh.mangal on the August 31st, 2008

    If you are using log4j [Simplest, easiest and most common way of doing it]
    a. log4j.xml
    Add following entry:

    b. log4j.properties
    Create a logger category
    log4j.logger.org.hibernate.SQL=DEBUG

    If you just want these on the console (quick n dirty), then set the hibernate.show_sql to true in your sessionFactory configuration.

    More Info

    360 Flex Day 1

    Posted in flex by shailesh.mangal on the August 19th, 2008

    I am attending 360Flex in San Jose. Day one wasn’t great in terms of new stuff to learn except few things. I attended following sessions

  • Adam Flater - How to make your AIR app blow up with Merapi, nothing new in the apple accelerometer, Jordan Snyder’s demo of controlling rover using Flex was good. She also discussed processing
  • Axel Jensen - Project Workflow (trac,svn,ANT,XML…) - Nothing new there, though it was good to know Assembla
  • Chris Scott - Introduction to the Swiz Framework for Flex - I should do more homework before I write about swiz, but my first impression of Swiz was that it doesnt suffer with what most frameworks do, Noise of boiler plate. Definitely need seconds level of exploration.
  • Jacob Wright - Advanced ActionScript APIs - Nice to see the use of namespace, some good examples of proxy, IExternizable.I also volunteered to participate in FlexCodeJam More on this in next day or two.
  • Are you still not feeling the pain

    Posted in Web by shailesh.mangal on the April 14th, 2008

    This morning as usual, I was browsing google finance and suddenly I noticed this.

    Google Finance

    Does any thing look wrong there. Well, yeah. How is Dow, despite of + growth, showing up in red. And that provoked one of my all time pet peeves - JavaScript. Decades of innovation and evolution and still large amount of web developers still putting up with the inherent pains of the language. Still not feeling the pain?
    Why should you not use java script
    1. Its painful to write
    2. Even more painful to debug
    3. Each browser treats it differently
    4. Error prone
    5. Poor testablity
    6. Hard to read and understand somebody’s code.

    Flex/Actionscript addresses all the above plus
    1. Fun to write
    2. Better maintainability
    3. Works seamlessly with JavaScript and variety of browsers.
    4. Applicability of OOPS concepts and Design patterns
    5. Better XML, JSON and other data format editing capabilities
    6. Asynchronous by nature.
    7. Memory management and bench marking

    And hence, UI of our test management tool, to a great extent, is written in Flex/Actionscript while utilizing strengths of java script also where ever necessary.

    Add a url, missing for google gadget developers

    Posted in Web by shailesh.mangal on the April 8th, 2008

    I am by far not a gadget freak. But I do go out once in a while to check out whats going on. Recently, I had a need to look at the gadget API. While going thro’ Google’s Gadget Tools documentation, I noticed some of the documentation is outdated. One that I was concerned with, was link to add developer gadget. Lazy enough, I googled it and found that other people also noticed that the link has been removed. After a bit of struggling, it turned out, the gadget is still there, just the link is not.

    Here is what I ended up doing as a work around. Type following url in your browser (replace $YOUR_TAB_NAME with your the tab that you want to add that gadget).

    http://www.google.com/ig/directory?root=/ig&igtab=$YOUR_TAB_NAME$&dpos=top&url=developer.xml

    Press enter, you will get following screen

    GOOGLE Developer Gadget
    Add the gadget, and thats it.

    Next Page »