Friday July 31, 2009
If you are using Warbler to create a WAR file of your application and
deploying on GlassFish
or any other Servlet container, then you are likely seeing the
following error during deployment:
| [#|2009-07-30T15:29:50.788-0700|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=17; _ThreadName=httpWorkerThread-4848-0;_RequestID=1d7e8f18-1c9a-4924-bd0b-6a07eba425ba;|WebModule [/session]unable to create shared application instance org.jruby.rack.RackInitializationException: undefined method `new' for "Rack::Lock":String from /Users/arungupta/tools/glassfish/v2.1/glassfish/domains/domain1/applications/j2ee-modules/session/WEB-INF/gems/gems/actionpack-2.3.2/lib/ action_controller/middleware_stack.rb:116:in `inject' from /Users/arungupta/tools/glassfish/v2.1/glassfish/domains/domain1/applications/j2ee-modules/session/WEB-INF/gems/gems/actionpack-2.3.2/lib/ action_controller/middleware_stack.rb:116:in `build' from /Users/arungupta/tools/glassfish/v2.1/glassfish/domains/domain1/applications/j2ee-modules/session/WEB-INF/gems/gems/actionpack-2.3.2/lib/ action_controller/dispatcher.rb:82:in `initialize' . . . |
| # Additional Java .jar files to include.
Note that if .jar files are placed # in lib (and not otherwise excluded) then they need not be mentioned here. # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your # own versions if you directly set the value # config.java_libs += FileList["lib/java/*.jar"] config.java_libs.delete_if {|f| f =~ /jruby-rack/ } config.java_libs += FileList["lib/jruby-rack*.jar"] |
| # Additional Java .jar files to include.
Note that if .jar files are placed # in lib (and not otherwise excluded) then they need not be mentioned here. # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your # own versions if you directly set the value # config.java_libs += FileList["lib/java/*.jar"] config.java_libs.delete_if {|f| f =~ /jruby-rack/ || f =~ /jruby-complete/ } config.java_libs += FileList["lib/jruby-complete*.jar"] config.java_libs += FileList["lib/jruby-rack*.jar"] |
Posted by Arun Gupta in web2.0 | Comments[7]
|
|
|
|
|
Wednesday July 29, 2009
TOTD# 86: Getting Started with Apache Wicket on GlassFish
![]() |
Apache Wicket is an application framework to build web applications using HTML for markup and POJOs to capture the business logic and all other processing. Why Wicket digs more into the motivation behind this framework. |
| ~/samples/wicket
>mvn
archetype:create -DarchetypeGroupId=org.apache.wicket
-DarchetypeArtifactId=wicket-archetype-quickstart
-DarchetypeVersion=1.3.6 -DgroupId=org.glassfish.samples
-DartifactId=helloworld [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'archetype'. [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [archetype:create] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. [INFO] Setting property: velocimacro.messages.on => 'false'. [INFO] Setting property: resource.loader => 'classpath'. [INFO] Setting property: resource.manager.logwhenfound => 'false'. [INFO] [archetype:create] [WARNING] This goal is deprecated. Please use mvn archetype:generate instead [INFO] Defaulting package to group ID: org.glassfish.samples [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating OldArchetype: wicket-archetype-quickstart:1.3.6 [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.glassfish.samples [INFO] Parameter: packageName, Value: org.glassfish.samples [INFO] Parameter: package, Value: org.glassfish.samples [INFO] Parameter: artifactId, Value: helloworld [INFO] Parameter: basedir, Value: /Users/arungupta/samples/wicket [INFO] Parameter: version, Value: 1.0-SNAPSHOT [INFO] ********************* End of debug info from resources from generated POM *********************** [INFO] OldArchetype created in dir: /Users/arungupta/samples/wicket/helloworld [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Tue Jul 28 15:30:21 PDT 2009 [INFO] Final Memory: 12M/80M [INFO] ------------------------------------------------------------------------ |
| ~/samples/wicket/helloworld
>mvn jetty:run [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'jetty'. [INFO] ------------------------------------------------------------------------ [INFO] Building quickstart [INFO] task-segment: [jetty:run] [INFO] ------------------------------------------------------------------------ [INFO] Preparing jetty:run [INFO] [resources:resources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:compile] [INFO] Compiling 2 source files to /Users/arungupta/samples/wicket/helloworld/target/classes [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 2 source files to /Users/arungupta/samples/wicket/helloworld/target/test-classes [INFO] [jetty:run] [INFO] Configuring Jetty for project: quickstart [INFO] Webapp source directory = /Users/arungupta/samples/wicket/helloworld/src/main/webapp [INFO] Reload Mechanic: automatic [INFO] Classes = /Users/arungupta/samples/wicket/helloworld/target/classes 2009-07-28 15:31:35.820::INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] Context path = /helloworld [INFO] Tmp directory = determined at runtime [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml [INFO] Web overrides = none . . . INFO - WebApplication - [WicketApplication] Started Wicket version 1.3.6 in development mode ******************************************************************** *** WARNING: Wicket is running in DEVELOPMENT mode. *** *** ^^^^^^^^^^^ *** *** Do NOT deploy to your live server(s) without changing this. *** *** See Application#getConfigurationType() for more information. *** ******************************************************************** 2009-07-28 15:31:37.333::INFO: Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server |

| ~/samples/wicket/helloworld
>mvn package [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building quickstart [INFO] task-segment: [package] . . . [INFO] Processing war project [INFO] Webapp assembled in[494 msecs] [INFO] Building war: /Users/arungupta/samples/wicket/helloworld/target/helloworld-1.0-SNAPSHOT.war [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6 seconds [INFO] Finished at: Tue Jul 28 15:35:59 PDT 2009 [INFO] Final Memory: 14M/80M [INFO] ------------------------------------------------------------------------ |
| ~/samples/wicket/helloworld
>~/tools/glassfish/v3/preview/glassfishv3/bin/asadmin deploy
target/helloworld-1.0-SNAPSHOT.war Command deploy executed successfully. |

Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
|
Tuesday July 28, 2009
Track your running miles using JRuby, Ruby-on-Rails, GlassFish, NetBeans, MySQL, and YUI Charts
This blog introduces a new application that will provide basic tracking
of your running distance and generate charts to monitor progress. There
are numerous similar applications that are already available/hosted and
this is a very basic application. What's different about this ?
The first version of this application is built using JRuby,
Ruby-on-Rails, GlassFish Gem, MySQL, and NetBeans IDE. This combination
of technologies is a high quality Rails stack that is used in production
deploymnet at various places. Still nothing different ?
A similar version of this application
will be built using a variety of Web frameworks such as Java EE, Grails, Wicket, Spring and Struts2 (in
no particular order). The goal is to provide a similar application,
slightly bigger than "Hello World," built using different frameworks
and deploy on GlassFish.
Each framework will then be evaluated based upon the criteria ranging
from the basic principles of framework, ease-of-use in
design/development/testing/debugging/production of this web app,
database interaction, tools support, ability to add 3rd party
libraries, browser compatibility and other points.
An important point to note is that this is not an exhaustive
evaluation of different Web frameworks and the scope is limited only to
this application.
A complete list of frameworks planned is available here.
The criteria used to evaluate each framework is described here.
Your feedback in terms of Web frameworks and evaluation criteria is
highly appreciated. Please share your feedback on the users list.
Now the first version of application. The complete instructions to
check out and run the Rails version of
this application are available here.
Here are some charts generated using the application:

and

YUI is
used for all the charting capabilities.
And here is a short video that explains how the application work:
If you are a runner, check out the application and use it for tracking
your miles. A sample runlog is available in "test/fixtures/runlogs.yml"
and races in "test/fixtures/races.yml".
If you know Rails, please provide feedback if the application is DRY
and using the right set of helpers.
If you'd like the existing list of web frameworks to be pruned or
include another one to the list, let us know.
Share you feedback at users@runner.kenai.com.
Technorati: jruby
rubyonrails
glassfish
netbeans
mysql
yahoo
yui chart running miles framework
Posted by Arun Gupta in Running | Comments[2]
|
|
|
|
|
Monday July 27, 2009
San Francisco Half Marathon 2009 Completed - Personal Best so far!
I ran San
Francisco Half Marathon 2009 yesterday and here are the
results:

I'm excited about the results because improved
my timing
by almost 3 minutes. And running on Golden Gate Bridge is always a
great experience. As always, the race was very well organized starting
from expo to bib/tee-shirt distribution, well marked course, water and
medical stations, local community support, buses from half
marathon finish line to start line and every thing else. A few possible
improvements are listed below.
I saw Dean
Karnazes (50/50/50 marathon man) and met Bart Yasso (Yasso
800 man) in the Expo. There is certainly a wealth of
knowledge to pick up from these elite runners.
![]() |
![]() |


Posted by Arun Gupta in Running | Comments[3]
|
|
|
|
|
Monday July 20, 2009
Running Pet Peeves - Running San Francisco Marathon 2009 First 1/2
I've been running for many many years now and got into long distance
running 4 years ago. Just love outdoor running and use treadmill for
speed workouts and hills. Treadmill is a very predictable environment
and allows you to focus on particular aspects of training. Most of my
workouts are in the neighborhood
and I generally try to run on business trips. As much as I enjoy
running, I have my share of pet peeves experienced over these past
years.
Posted by Arun Gupta in Running | Comments[4]
|
|
|
|
|
Thursday July 16, 2009
Are you using GlassFish ? - Let us know!
![]() |
Are you using GlassFish for development,
deployment/production, testing, teaching or in other interesting ways ? Help us fill out this short survey so we understand you better. The survey will not take more than 5-10 minutes of your time. blogs.sun.com/stories has a partial list of production deployments of GlassFish. Send us an email at stories@sun.com if you are using GlassFish in production. |
Posted by Arun Gupta in General | Comments[2]
|
|
|
|
|
Wednesday July 08, 2009
Received a "certificate of attendance as speaker" for recently
concluded FISL 10.

This is sweet, thanks FISL organizers! It certainly adds a personal
touch to the whole experience.
I don't remember receiving a personal certificate like this :)
Technorati: conf
fisl brazil glassfish
netbeans
mysql
eclipse
Posted by Arun Gupta in General | Comments[3]
|
|
|
|
|
Thursday July 02, 2009
Rails on GlassFish - "most performant of all", "simpler and just works", "blazing speed"
Here are some quotes about running Rails applications on GlassFish from user@jruby
mailing list:
I find the glassfish gem
to be the most performant of all -- and I don't need to war-up my app.
I also have some mongrel
cluster stuff, but glassfish is simpler and just works.
Voila...blazing speed,
can handle lots of traffic. Note that I am also cominging into apache
from a dyndns name. So, whatever IP I have, I can go straight to
execution on the glassfish gem and NO warring up! What could be easier
deployment, or a faster execution?
It's running fantasticly
and performing like nothing I've seen before :) Completely stable
memory, no wirings or anything bad for 5 days now.. (with several
ab/htperf stresstests).
It's always exciting to get good endorsements of our efforts in the
GlassFish team :)
Other similar stories for using Rails/GlassFish in production are
described at rubyonrails+stories.
Technorati: glassfish
v3 gem rubyonrails
stories
jruby
Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
|
Wednesday July 01, 2009
Running Streak in Q2 2009 - 378.5 miles, 77/91 days of running
Continued from Q1
2009 running streak, here is a summary of Q2 (Apr 1 - Jun 30)
2009 running:
| Total Mileage | 378.5 miles (30% more than Q1) |
| Total Days of Runing | 77 days (10% more than Q1) |
| Missed Days of Running | 14 days |
| Day 72 | 4 miles, 28:29 mins, switching between 0/5% grade every min. 286.5 miles in Q1, 2009: http://tinyurl.com/cffk3x #fb |
| Day 73 | 3.5 miles, 27:09 mins ... a good outdoor run with 110 crunches ... feels good & hungry! #fb |
| Day 74 | 3 miles, 19:21 mins, fastest 3 miler so far. Ran 10 mph for 1/4mile, that was fast & good! Ready to board for Portland. #fb |
| Day 75 | 45 mins walk + 7 miles, 54:54 mins = healthy start to this weekend, honey-do list rest of the day #fb |
| Day 76 | 6-7 miles flat + hills in Rancho with @igorminar. 1 hr, 6 mins ... went uphill on my typical downhill trail #fb |
| Day 77 | 3 miles, 21:41 mins, switching between 0-5% grade every minute |
| Day 78 | 2 miles, 13:25 mins, a short fast paced run |
| Day 79 | 4 miles, 33:15 mins - an easy pace outdoor run this morning #fb |
| Day 80 | 4 miles, 31:09 mins ... well paced outdoor run #fb |
| Day 81 | 4 miles, 27:23 mins ... 0.5 miles at 6 minute pace ... loving it! |
| Day 82 | 6 miles, 51:30 mins: nice hilly run in Thousand Oaks: http://www.gmap-pedometer.c... ... Time to hit easter egg hunting |
| Day 83 | 6 miles, 50:59 mins ... it was really hot to run at 9am in Simi Valley Hills |
| Day 84 | 6 miles in the hills, 49:49 mins ... enjoyed running hills for past 3 days. |
| Day 85 | 3 miles at 3% grade in 21:08 mins. Past 4 runs have been hilly so will try some easy- and fast-paced runs in the next few days. #fb |
| Day 86 | 2 miles in 14:22 mins, 2/4/6/4/2 % ladder for 1 min/grade ... am hooked to hills! #fb |
| Day 87 | 7 miles, 57:29 mins ... it was pretty hot even at 9am in the morning. Wonder what it's going to be tomorrow! #fb |
| Day 88 | 3 miles, 19:51 mins ... plain flat run with no hills at all. |
| Day 89 | 2 miles, 13:51 mins with 0.5 miles on 10 mph ... am planning to bump up 6 min pace to 1 mile now. |
| Day 90 | 2 miles, 13:51 mins. Ran 1 mile at 6 min pace ... first time ever .... woot! Goal is to sustain 6 min pace for 5 miles. #fb |
| Day 91 | 3.5 miles, 26:25 mins ... a good outdoor run this morning! #fb |
| Day 92 | 4.5 miles, 33:43 mins ... need to squeeze 0.5 miles in 1:17 mins for a 7 min outdoor pace. |
| Day 93 | 10 miles, 1 hr, 19:43 mins ... thoroughly enjoyed a decent paced outdoor run this morning! #fb |
| Day 94 | 5 miles, 39:43 mins, yet another outdoor run this morning ... and weekend is over! |
| Day 95 | 3 miles, 21:03 mins with 1 mile at 4% grade |
| Day 96 | 3 miles in 18:29 mins, 2 miles and 0.5 mile at 10 mph pace ... slowly building up! #fb |
| Day 97 | 3 miles, 23:33 mins - lap running in the school ground today! |
| Day 98 | 3 miles, 21:29 mins, alternating between 0/5% grade every minute |
| Day 99 | 3 miles, 22:46 mins (from yesterday) |
| Day 100 | 5 miles, 44 mins at http://tinyurl.com/dl9dq5 Attending Stanford meet as press: http://tinyurl.com/cj898f in 45 mins |
| Day 101 | 8-9 miles, 1 hr 23:08 mins at rancho this morning |
| Day 102 | 6.4 miles, 57:04 mins (from yesterday): http://tinyurl.com/chyqov |
| Day 103 | 5.2 miles, 43:18 mins (from yday), more details at http://tinyurl.com/cdu6ke see you at Hilton lobby |
| Day 104 | 4.8 miles, 40:38 mins at #railsconf, join @railsConfRunner if interested in running together. |
| Day 105 | 7 miles, 54:32 mins ... a good outdoor run this morning. Now helping wifey in her jewelry show at her work #fb |
| Day 106 | 3.5 miles, 21:46 mins with 2.5 miles at 6 min pace. Slowly getting to 5 miles in 30 minutes goal :) #fb |
| Day 107 | 13.3 miles, 1 hr, 46:18 mins #fb |
| Day 108 | 4 miles, 27:28 mins |
| Day 109 | 1 miles, 6:36 mins ... got up late and so could squeeze only a very short run. |
| Day 110 | 2.6 miles, 19:39 mins and route is: http://www.gmap-pedometer.c... Gotta run more tomorrow! |
| Day 111 | 4 miles lap running in 31:05 mins |
| Day 112 | 4 miles in 24:30 mins, 3.5 miles at 10mph. Just 1.5 more miles at this pace for the first goal :) #fb |
| Day 113 | 3 miles, 19:15 mins at 2% grade |
| Day 114 | 3 miles in 18:52 mins (from yday) + 5k walk/run at http://bit.ly/HKYfl |
| Day 115 | 5 miles in 39:40 mins |
| Day 116 | 5 miles in 39:24 mins |
| Day 117 | 5 miles in 30:45 mins on TM, 4 miles at 10 mph pace |
| Day 118 | 1 mile in 6:17 mins (from yesterday) |
| Day 119 | 5 miles in 30:17 mins .. finally 6 min pace (after 20 sec TM warmup) for 5 miles ... w00t! #fb |
| Day 120 | 2.6 miles, 19:10 mins |
| Day 121 | 7-8 miles, 1:14 mins (from 2 days back). No running for the past 2 days, will start tomorrow after recovery from weekend camping. |
| Day 122 | 2 miles in 19 mins (1 mile at 9.5 mph and 1 mile at 7%) - from yday. |
| Day 123 | 2 miles in 14:14 mins at 5% elevation. Need to try longer distance on that level now. |
| Day 124 | 3 miles in 20:14 mins with 2 and 4% elevation (from yday) |
| Day 125 | 7 miles in 52:55 mins - one of the fastest 7 miler on road #fb |
| Day 126 | 1 mile, 6:55 mins |
| Day 127 | 2 miles (3 days ago) in 13:13 mins |
| Day 128 | 3 miles in 17:54 mins (fastest 3 miler so far) #fb |
| Day 129 | 3 miles, 17:45 mins, heading to park with boys & dad while wife/mom are in the gem/beads show |
| Day 130 | 5 miles in 35:32 mins, tried the new wrist weights (6.33 lbs) and sure feel the tension. |
| Day 131 | 5 miles in 34:15 mins with 6.33 lbs wrist weights. |
| Day 132 | 3 miles in 21:25 mins (from yesterday) with 6.33 lbs ankle weights, definitely much harder than wrist weights |
| Day 133 | 3 miles in 21:25 mins with 5 lbs ankle weights |
| Day 134 | 13.2 miles in 1 hr, 46:45 mins (missed posting from 2 days ago, strange) |
| Day 135 | 10 miles in 1 hr, 18:23 mins |
| Day 136 | 3 miles in 17:57 mins on TM, 42 miles total from Sun-Sat, plan to bump up mileage for next week #fb |
| Day 137 | 10 miles in 1 hr 16:07 mins ... fastest run ever for that distance, that's a 7:31 pace. #fb |
| Day 138 | 10 miles in 1 hr 19:04 mins ... 2nd consecutive 10 miler. #fb |
| Day 139 | 7 miles in 53:10 mins |
| Day 140 | 8.5 1 hr, 6:13 mins |
| Day 141 | 8-9 miles in 1 hr 18:14 mins ... solid running week with 43 miles in 5 days! |
| Day 142 | 1 miles 6:15 mins (from 7 days ago) |
| Day 143 | 3.5 miles in approx 30 mins (3 days ago) |
| Day 144 | 7 miles in approx 1 hour (2 days ago) |
| Day 145 | 3.5 miles in approx 30 mins (yesterday) |
| Day 146 | Solid 14.5 miles in approx 1 hr, 55 mins, now heading to POA, then Chicago and so ready to reach home #fb |
| Day 147 | 3 miles in 18:41 mins on TM (from yesterday) |
| Day 148 | 7 miles in 51:49 mins. Today is the last day of Jun 2009, quarterly report coming out tomorrow. |
Posted by Arun Gupta in Running | Comments[0]
|
|
|
|
|
Today's Page Hits: 2670
Total # blog entries: 1002