Sunday Sep 07, 2008 - Developer Collaboration Platform Released!

  • Checkout - Developer Collaboration Platform just released!
  • Built using JRuby, Deployed on Glassfish V2, using MySQL - all on Sun Technologies and Products
  • Email me, if you would like an invite to be able to create projects there
  • It can house subversion and Mercurial repositories for your projects
  • You can have bugzilla, mailing lists, forums and wiki's for your project
  • You could use your Sun Developer Network account to login there
  • You could email to and or post your comments/issues you might have at:
  • Wednesday Jul 09, 2008

    want to know more about

    Checkout Tim Bray's Q&A with Nick Sieger at

    Friday Jul 04, 2008

    Installing MySQL gem gives OutofMemory Error

    dhcp-umpk16-82-199:~ sakthivelgopal$ gem install mysql -- --include=/usr/local/ lib Bulk updating Gem source index for: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.nio.ByteBuffer.wrap( at java.lang.StringCoding$CharsetSD.decode( at java.lang.StringCoding.decode( at java.lang.String.( at org.jvyamlb.ScannerImpl.into( at org.jvyamlb.ParserImpl$11.produce( at org.jvyamlb.ParserImpl.parseStreamNext( at org.jvyamlb.ParserImpl.peekEvent( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeNode( at org.jvyamlb.ComposerImpl.composeDocument( at org.jvyamlb.ComposerImpl.getNode( at org.jvyamlb.BaseConstructorImpl.getData( at org.jruby.RubyYAML.load( at Source) at org.jruby.runtime.callback.FastInvocationCallback.execute( at at org.jruby.evaluator.EvaluationState.callNode( at org.jruby.evaluator.EvaluationState.evalInternal( at org.jruby.evaluator.EvaluationState.orNode( at org.jruby.evaluator.EvaluationState.evalInternal( at org.jruby.evaluator.EvaluationState.eval( at org.jruby.internal.runtime.methods.DefaultMethod.internalCall( at at org.jruby.evaluator.EvaluationState.fCallNode( at org.jruby.evaluator.EvaluationState.evalInternal( at org.jruby.evaluator.EvaluationState.blockNode( at org.jruby.evaluator.EvaluationState.evalInternal( dhcp-umpk16-82-199:~ sakthivelgopal$ which ruby /usr/local/bin/ruby dhcp-umpk16-82-199:~ sakthivelgopal$ ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.8.2] dhcp-umpk16-82-199:~ sakthivelgopal$

    Monday Apr 28, 2008

    Exciting time at MySQL Conference!

    It was quite an exciting time to be at the MySQL conference and i could experience the upbeat in the land of MySQL. Here is my quick comments on few of the sessions i liked:
  • Best Practices for Database Administrators
      Sheeri from Pythian, covered a great deal of DB Admin practices around Monitoring services, Backup/Restore, Documentation, Trouble Shootiong. Overall the session was very entertaining with all her cartoons and style of preso.
  • DTrace and MySQL
      This sesssion was even cooler. Just with a few simple lines of dtrace scripts, you could watch what queries are being processed by mysql daemon
  • Best Practices for Deploying MySQL on the Solaris Platform
      Solaris and MySQL - the combo looked like theey are made for each other for production deployments. The 64bit support and SMF service on Solaris for MySQL makes it easier and robust. Dtrace Chime tool looks good too.
  • Just-In-Time Scalability: Agile Methods to Support Massive Growth
      Excellent case study where IMVU started with a small setup and worked on it iteratively to build an architecture with which they could scale as well work on HA setup."
  • Performance Guide to MySQL Cluster, Helping InnoDB Scale on Servers with Many CPU Cores and Disks
      These sessions on Performance benchmarking and MySQL Cluster that were really good and very informative.
  • Friday Jul 27, 2007

    Deploy Ruby onto Glassfish and Experience the magic in performance yourself!

    Check out the Sun & Joyent sponsored event:
    JRuby on Rails: Power plus simplicity.
    When: August 8, 2007, 2:30-8:00pm
    Where: Axis Cafe, 1201 8th St, San Francisco, CA 94107

    You can bring you laptop and deploy ruby application onto Glassfish and experience 500% performance increase!!

    Thursday Dec 07, 2006

    Missing Library References for Embedded Component Libraries

    How to resolve missing library references for Embedded Component Libraries?
    NetBeans Visual Web Pack 5.5 has built in Sun Web UI components. It is also possible for users to download and Import external component Libraries. When using such non-bundled component libraries in Visual Web project, those component libraries are included in the project (not references). When opening up such project built from Sun Java Studio Creator or built by someother developer, you get a message saying :
    Just click OK and Open a page, it should render fine.
    • If it still shows "Missing Library References" for those Embedded Component Library, Right click on the project node and choose Properties. In the project properties dailog, choose "Libraries" under catgeories, and click 'Remove' after selecting the warning-badged missing library reference. Remove the missing library reference in Build> Packaging category too.
    • If you get class missing in designer for references in the embedded component library, remove the EmbeddedComponent Library in projects Window under "Component Libraries" and re-add it using right Context action 'Add Component Library'.

    Friday Dec 01, 2006

    Understanding Scope and Managed Beans

    Check out this project which uses managed beans in Application, Session and Request Scope : Visual Web Project built using Understanding Scope and Managed Beans Tutorial

    Tuesday Nov 21, 2006

    Webinar: Simplifying Data Access using Netbeans Visual Web Pack

    Learn how to rapidly build visual applications that read, display, and update databases, browse and edit database schemas, data, and commands, and access databases using a variety of JDBC drivers. ON Monday the 27th

    Friday Aug 25, 2006

    Our First Cut on Performant Creator!

    Get Improved Performance with Hotfix 2!
    The HotFix2 update for Creator 2 update 1 is available via UpdateCenter. We have tested this with large apps and are excited with big improvements!

    • Note:If your web application is more than medium sized, having more than 25 pages, we recommend increasing the default memory settings. This will enable Creator to give a comfortable designtime experience while building the project. Increase the maximum Java heap size from the default 384MB to 512MB or more, depending on the size of your application and the available physical memory on your computer.
      To do this, edit your $creator_install/etc/creator.conf file, changing:
      "-J-Xmx384m" to "-J-Xmx512m" or more
    • Check out this forum thread:
      Please post your comments, feedback and suggestions in there to make this product better!

    Friday Jun 23, 2006

    How to use Oracle Sequence for auto increment column

    While reading through this thread I had to check out how to invoke sequence.nextval for new row being appended.

    Here's how i did achieve this:

    1. Created a Sequence and a Table:
    create table user_seq_test ( seq_col int not null primary key, char_col char(10) );

    2. Creating a Page to append rows into this table:
    Add a datadource (say ora9i) to access this database table in Servers Window. Create a New Project, drag and drop user_seq_test table onto page. Dropa text field and bind it to user_seq_test.char_col. Add a button for "Append Row". Add a message group to be able to see the error messages on the page, when it happens.

    In the prerender, append a row to the dataprovider and get the sequence value for the new row and set it:
    try {
        RowKey rk = user_seq_testDataProvider.appendRow();
        Connection conn = null ;
        Statement sqlStatement = null ;
        ResultSet rs = null ;
        javax.naming.Context ctx = new javax.naming.InitialContext() ;
        DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/ora9i") ;                      
        conn = ds.getConnection() ;                        
        // setup the connection             
        conn.setAutoCommit(true) ;                         
        // execute the query            
        sqlStatement = conn.createStatement() ;
        rs = sqlStatement.executeQuery("select userid_seq.NEXTVAL from dual" ) ; ;
        int nextvalue = rs.getInt(1) ;
        user_seq_testDataProvider.setValue("seq_col", new Integer(nextvalue));
            } catch (Exception ex) {
                log("Error Description", ex);
    In the append Row Button action:
    try {
            } catch (Exception ex) {
                log("Error Description", ex);

    So, when we want to use Sequence.NEXTVAL, you need to fetch the value and set this value on the auto-increment column in the appended row.

    We could use similar technique for calling functions and stored procedures.

    Wednesday Jun 14, 2006

    How to Track JDBC Calls with DataDirect Spy

    You could track the JDBC calls made using the Sun JDBC Driver (rebranded DataDirect Connect for JDBC Driver) using DataDirect Spy included with the Sun JDBC Driver.

    To use the DataDirect Spy with Sun Java Studio Creator:
    • You need to add new Database Server Type. Call it 'OracleSpy', Choose smbase.jar, smutil.jar, smoracle.jar & smspy.jar from $creator_installdir/rave2.0/core/ directory, click Suggest to get the DriverClassName, Enter the JDBC url like: jdbc:sun:oracle://#HOSTNAME:1521;SID=#DATABASE;SpyAttributes=(log=(file)C:\\\\temp\\\\spy.log;linelimit=80;logTName=yes;timestamp=yes)");
    • Add a datasource using the newly added server type
    • View the log file C:\\\\temp\\\\spy.log for JDBC calls being tracked
    • With every operation in the IDE (like Adding datasource, consuming tables in project via drag and drop, opening query editor on a rowset, deploying/running the project) JDBC calls would be made and all those tracking information will be routed to this spy.log

    Both at design time and runtime, Creator and CreatorApps make jdbc calls to fetch data and metadata. When query editor on a rowset is opened for the firsttime after the project is opened, it fetches the metadata, so it is likely to make a little more time for the first time. Sucessive opening of the rowset in query editor could be faster (as long as the project is opened).

    For more info on using DataDirect Spy refer:

    Wednesday Jun 07, 2006

    Fast Track (3 days) Learning - WebApps and Portlets Development using Java Studio Creator

    If you are craving to get started or understand deeper with Java Web Application and Portlet Development, this Threee Day Fast Track Course will be the awesome event for you!

    • You will get this Field guide.
    • This workshop is loaded with lots of exerices with explains building web applications and portlets very quickly.
    • Building Web Applications with Creator using JAX Components is the HOT thing!
    • This will give you indepth understanding of various technologies like JavaServer Faces, JDBC rowsets, dataproviders.

    Friday Apr 07, 2006

    How to bind checkbox to non-boolean datatype?

    CheckBox has two properties -- selected and SelectedValue

    selected property is used purely for display purpose i.e, selecting/deselecting the checkbox being displayed

    selectedValue is returned by checkbox1.getSelected(), when the checkbox is selected i.e, checkbox1.isSelected() returned true.

    checkbox works intuitively/easily when bound to a [Bb]oolean data type i.e, w/o additional wiring/coding.

    When it needs to be bound to a non-boolean datatype (like Integer, or String), we need to explicitly create a boolean property and bind the checkbox to that property. This property should have getter (isPropertyname) and setter (setPropertyname).

    Suppose that you have TRAVEL.PERSON.FrequentFlyer is of type SMALLINT. So,

    0. Drop a table and drop this database table TRAVEL.PERSON onto it (which has FrequestFlyer as smallint)

    1. we add/create a property, named frequentFlyer, in page with type\* boolean\* (use primitive type boolean and not Object type Boolean) i.e, Right click on $ProjectNode in Projects> Source Pakcages> $DefaultPackage> Choose Add> Property. Enter name as frequentFlyer, type as _boolean_ and click OK

    2. Modify it's gettter (in as in: public boolean isFrequentFlyer() {
    Object value = getValue("#{currentRow.value['PERSON.FREQUENTFLYER']}");
    if(value != null){ Integer freqFlyer = (Integer) value; return freqFlyer.intValue()==1? true : false ; }
    return false; }

    3. Modify it's setter as in :

    public void setFrequentFlyer(boolean frequentFlyer) { if(frequentFlyer){ setValue("#{currentRow.value['PERSON.FREQUENTFLYER']}", new Integer(1)); }else{ setValue("#{currentRow.value['PERSON.FREQUENTFLYER']}", new Integer(0)); }; }

    4. Modify the table layout to display FrequentFlyer column as checkbox and bind the selected property of the checkbox (using property bindings) to this FrequentFlyer boolean property in the PageBean and Run Project to see it working!

    These little extra steps are needed to bind checkbox to a non-boolean type database column.

    Tuesday Mar 07, 2006

    CRUD Project in Portlet Environment

    While exercising the CRUD Tutorial (Performing Inserts, Updates and Deletes) in a Portlet Project, I have learnt that Portlet Life Cycle is little different from that of a normal Creator WebApplication.

    Unlike a normal web application page, a portlet page can't assume that the page being rendered in the Render Response phase is the same page that was built in Restore View. If a portlet wants to maintain state across repeated render requests, the portlet must use the session bean to store stateful information.

    The prerender code in this CRUD Portlet tutorial is little different from the one used in normal webapplication(as suggested in the tutorial). It uses a sessionbean property personId to persist the current personId selection or its change and then uses the same for passing as the parameter to the tripRowSet.

    Here's the Creator Project built,, that works fine with the bundled Pluto w/ SunAppserver. Download this project, Open it in IDE and Choose Run project to deploy this to the bundled container.

    Wednesday Feb 22, 2006

    Flavors of CRUD Tutorial projects against all Supported Databases

    The purpose of this blog item is to share the Creator 2 projects built while exercising the Performing Inserts Updates and Deletes Tutorial against all of the supported databases using the bundled Sun JDBC Drivers. Check out the Creator 2 system requirments for Supported Database Servers and JDBC Drivers.

    Note: You will need to setup the travel schema on your database and add a datasource for it in Servers window. You could use the exported_datasources_travel_sample.xml for importing/creating your datasource. Change $hostname, port# and validation table appropriately.

    Database Type Schema/SQL files, Creator 2 Project
    PointBase 5.2 (bundled)

    $Creator_install/rave2.0/startup/samples/ create-schema-travel.sql and create-Travel.sql

    DataSource Name: Travel

    MySQL 5.x/4.x


    DataSource Name: mysql_travel

    Oracle 9i/10g


    DataSource Name:ora10g_travel

    MS SQL Server 2000


    DataSource Name:mssql_travel

    Sybase ASE 12.5


    DataSource Name: sybase_travel

    IBM DB2 8.1


    DataSource Name:db2_travel




    « June 2016