views:

258

answers:

2

Has anyone gotten JODA time classes to work on Google Appengine? I'm using 1.3.4 of the java sdk and I get the following error when trying:

java.lang.NoClassDefFoundError: com/google/appengine/repackaged/org/joda/time/DateTimeZone

I've imported it as well:

import com.google.appengine.repackaged.org.joda.time.DateTime;
+3  A: 

The real purpose of repackaged classes is for Google to have a private set of classes that they can use and that do not conflict with any known packages. Repackaged classes are not meant to be used by the public and if you do, you do at your own risk. They could be yanked at any time.

You can download JODA and just include it as a dependency, there should be nothing to stop it from working. The names will nor clash with Google's because of the different package.

Romain Hippeau
@aloo I updated my post.
Romain Hippeau
@Romain Thanks for the advice re: com.google.appengine.repackage...I was thinking that these well known packages were optimized for the platform although you would never know if/how they were altered.
Stevko
+2  A: 

Lots of people love joda too.

I suggest placing the JODA package jar in your lib directory and importing it directly.

    import org.joda.time.DateTime;
Stevko