Wednesday, August 22, 2012

Don't Forget, Bugs Can Be Environment-specific Too

Fun With Play Framework

I recently heard a lot of great stuff about the Play Framework so I decided to download it and play with it. The tutorial seemed rather simple, I figured I would just breeze through it. Nope. Not at all.

Running play on its own worked normally as it should; creating a new application via play new worked as it should. Running play in the app directory is where it failed.

error: error while loading , error in opening zip file [error] scala.tools.nsc.MissingRequirementError: object scala not found. [error] Use 'last' for the full log. Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

Interesting. I dug deeper and thought it was due to Play's bundled version of sbt. So, I installed a version of sbt. I tried a "hello world" test with it and got the same error. Aha! So it must be a bug with sbt. No, not really. I google'd and stumbled upon Howard Guo's blog and read that he too was running openSUSE. Ah, now that's where it all hit me! I loaded Play on my old Ubuntu box and bingo all is well! Sheesh.

The Bugzilla entry says this bug probably won't be fixed since it's in openjdk 1.6.0, but luckily the fix is easy enough!
That's quite unfortunate - please type
chmod 0644
/usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre/lib/ext/gnome-java-bridge.jar
as a root as a workaround. I doubt we will release any new maintenance update
of openjdk6 in the future.