Technofeel Things that keep me up late

8Sep/091

GWT, Google Gears and OSX: The explosive mix

This is a little post that may save you hours (because you are probably using the Google Web Toolkit along with the Google Gears API, the whole thing under OSX, right ? no ? Okay, so read forward because you may one day). So the problem comes when you try to launch you damn awesome application with the GWT Hosted Mode in your Eclipse and get this ugly exception:

Jul 12, 2009 6:26:29 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: jetty-6.1.x
Jul 12, 2009 6:26:29 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext@c45809{/,/Users/work/workspace/Athena/war}
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
    at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:113)
    at org.mortbay.xml.XmlParser.(XmlParser.java:69)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.webXmlParser(WebXmlConfiguration.java:83)
    at org.mortbay.jetty.webapp.WebXmlConfiguration.(WebXmlConfiguration.java:78)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)

And guess what ? This is actually a Java (jre) 1.5 bug ! So the easy solution is to switch to Java 1.6 which also allows you do to String.isEmpty() instead of String.length() == 0 which is just awesome (...). So you switch to Java 1.6, and try to start your app again, and then cry again when you get this clear one-line message that haunts you since you've read it:

You must use a Java 1.5 runtime to use GWT Hosted Mode on Mac OS X.

Damn.

How the hell can you get this stupid app running ? The solution is damn easy but again there's a trap. One thread on stackoverflow tells you that you should replace you gwt-gears.jar file with gwt-gears-noredist.jar that is available in the GWT Gears API archive, and tada. So you go on the GWT Gears API website and get the gwt-gears-1.2.1.zip file in the download box on the right side, and of course, there's no gwt-gears-noredist.jar file inside the archive. This is the moment where you get a little angry and depressed. Where the heck to find this file ? Well, don't ask me why, but the gwt-gears-noredist.jar file is only available in the tar archive, known as gwt-gears-1.2.1.tar.gz, that you can only find in the Downloads page of the site.

This is fucking stupid and make you feel like you've lost precious time because, so I hope this post saved you that :-)

Filed under: Uncategorized 1 Comment
16Aug/090

Sharing again !

Hello World !

Some of you won't even believe this, but yeah, after more than a year without blogging, i feel like writing and sharing again. This blog will be much more technical than the defunct unixaumonde.com, so some of you may just get lost reading my thoughts, sorry :-)

As your might have guessed I'll mainly talk about my passions, so a lot of search engine related stuff, information retrieval, natural language processing, distributed / cloud computing and web development.

Keep warming up folks, more to come soon !

Filed under: Uncategorized No Comments

About…

Hi ! I'm Jérémie, a french passionate about information retrieval, natural language processing, distributed computing, innovative web interfaces, entrepreneurship and wakeboarding !

I work for Exalead where I lead a little team on innovative challenges to rock'n'roll enterprise search.

View Jeremie Bordier's profile on LinkedIn

Recent Posts

Categories