6

Just updated to 1.6.1 and I am getting warnings that I should not be using

com.google.appengine.repackaged

What should I be using instead?

Affected classes specifically are:

com.google.appengine.repackaged.org.json.JSONException; com.google.appengine.repackaged.org.json.JSONObject; com.google.appengine.repackaged.com.google.common.util.Base64; com.google.appengine.repackaged.com.google.common.util.Base64DecoderException;

Lumpy
  • 3,632
  • 4
  • 34
  • 58
  • 2
    By way of background, until 1.6.1 (and the corresponding Google Plugin for Eclipse), Eclipse would happily reach in to the App Engine SDK, letting you use bits that are really implementation details that we're reserving the right to change (likely without warning). To head off sudden, unpleasant surprises, we arranged for the warning you're getting. – Dave W. Smith Jan 26 '12 at 19:39

3 Answers3

3

For org.json.* you can use the Java JSON library found at http://json.org/ (though there are other, better JSON libraries for Java)

For classes in com.google.common.* you can find most of them (though not Base64, etc., apparently) in Google's Guava libraries.

Jason Hall
  • 20,632
  • 4
  • 50
  • 57
2
org.json.JSONException;
org.json.JSONObject;
com.google.common.util.Base64;
com.google.common.util.Base64DecoderException;
Mike Samuel
  • 118,113
  • 30
  • 216
  • 245
  • it seems JSONException does not exist in org.json – Lumpy Jan 25 '12 at 21:53
  • @Lumpy, Yes it does. See the [Javadoc](http://json.org/javadoc/org/json/JSONException.html) – Mike Samuel Jan 25 '12 at 22:06
  • sorry I meant org.json included in appengine doesn't have it, once I included my own jar it works. – Lumpy Jan 25 '12 at 22:14
  • Do you know where I can dl a jar for com.google.common.util.Base64DecoderException; – Lumpy Jan 25 '12 at 22:14
  • 1
    I suspect that that is one of the classes that Google developed internally and has not yet packaged into a public release of Guava. – Mike Samuel Jan 25 '12 at 22:16
  • 1
    Speaking as a Guava developer, Guava doesn't control `common.util`. I'm not sure what the AppEngine guys were doing, but this is not something that Guava has any plans to provide. Were you using Base64 for your own purposes, or do you need it to build AppEngine? – Louis Wasserman Jan 25 '12 at 22:39
  • Personally, I need it so I can use appengine classes clientside in a gwt project. I would very much like to be sending base64 encoded strings to the client and decoding there, so I don't have to send my keys in cleartext over the wire. Perhaps the Base64 encoder is too expensive to use in gwt, and I will have to come up with my own encoding, but it would be optimal to construct properly encoded keys in the client. – Ajax Jun 26 '12 at 05:39
2

You should include third party jars yourself in your application, instead of relying on com.google.appengine.repackaged

In your case, your should add the following dependencies:

proppy
  • 10,495
  • 5
  • 37
  • 66