[appengine-java] BackEnd Names

2012-01-04 Thread suresh ashok
Hi,

This is the piece of code where i am trying to get the backend name,
which i am using in GAE but its actually returning null.


BackendService service =
BackendServiceFactory.getBackendService();
String currentBackendName = service.getCurrentBackend();
System.out.println(The current backend name
is+currentBackendName);

Any idea about how to retrieve the backend names in GAE.


regards,
Suresh

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Use of com.google.appengine.repackaged

2012-01-04 Thread ramesh
Hi All,

I need to use JSONObject in my project.

When i import com.google.appengine.repackaged.org.json.JSONObject;
 giving error as
Use of com.google.appengine.repackaged may result in your app
breaking without warning

I got this error after i upgrade to appengine 1.6.1 sdk. 1.6.0 works
fine.

Please help me on this.


On Jan 3, 3:59 pm, Jerome jerome.mou...@gmail.com wrote:
 Hello Ramesh,

 As Ikai was suggesting above, change your import to:
 import org.apache.commons.codec.binary.Base64;

 The method name in this class are a bit different from the repacked
 Google class, but the mapping is fairly straight forward.

 Cheers,

 Jerome

 On Jan 3, 9:49 am, ramesh chiluverirame...@gmail.com wrote:







  Hi,

  How can i resolve this issue. I am getting same issue after upgrading
  to app engine1.6.1

  Thanks

  On Dec 20 2011, 2:13 am, Ikai Lan (Google) ika...@google.com
  wrote:

   I usually just use the Apache Commons one:

  http://commons.apache.org/codec/apidocs/org/apache/commons/codec/bina...

   --
   Ikai Lan
   Developer Programs Engineer, Google App Engine
   plus.ikailan.com | twitter.com/ikai

   On Mon, Dec 19, 2011 at 11:03 AM, Carter jcmas...@gmail.com wrote:
After upgrading to1.6.1, we get this message:
Use of com.google.appengine.repackaged may result in your app
breaking without warning
for our use of:
import com.google.appengine.repackaged.com.google.common.util.Base64;

Is there a preferred Base64 encoder we can use instead?

--
You received this message because you are subscribed to the Google 
Groups
Google App Engine for Java group.
To post to this group, send email to
google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
   http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Use of com.google.appengine.repackaged

2012-01-04 Thread Vic Chen
Hello chiluveriramesh1

me too.
i have to use com.google.appengine.repackaged.org.json.JSONObject.

anyway, i just don't care and deploy it.
it still work fine.

2012/1/4 ramesh chiluverirame...@gmail.com:
 Hi All,

 I need to use JSONObject in my project.

 When i import com.google.appengine.repackaged.org.json.JSONObject;
  giving error as
 Use of com.google.appengine.repackaged may result in your app
 breaking without warning

 I got this error after i upgrade to appengine 1.6.1 sdk. 1.6.0 works
 fine.

 Please help me on this.


 On Jan 3, 3:59 pm, Jerome jerome.mou...@gmail.com wrote:
 Hello Ramesh,

 As Ikai was suggesting above, change your import to:
 import org.apache.commons.codec.binary.Base64;

 The method name in this class are a bit different from the repacked
 Google class, but the mapping is fairly straight forward.

 Cheers,

 Jerome

 On Jan 3, 9:49 am, ramesh chiluverirame...@gmail.com wrote:







  Hi,

  How can i resolve this issue. I am getting same issue after upgrading
  to app engine1.6.1

  Thanks

  On Dec 20 2011, 2:13 am, Ikai Lan (Google) ika...@google.com
  wrote:

   I usually just use the Apache Commons one:

  http://commons.apache.org/codec/apidocs/org/apache/commons/codec/bina...

   --
   Ikai Lan
   Developer Programs Engineer, Google App Engine
   plus.ikailan.com | twitter.com/ikai

   On Mon, Dec 19, 2011 at 11:03 AM, Carter jcmas...@gmail.com wrote:
After upgrading to1.6.1, we get this message:
Use of com.google.appengine.repackaged may result in your app
breaking without warning
for our use of:
import com.google.appengine.repackaged.com.google.common.util.Base64;

Is there a preferred Base64 encoder we can use instead?

--
You received this message because you are subscribed to the Google 
Groups
Google App Engine for Java group.
To post to this group, send email to
google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
   http://groups.google.com/group/google-appengine-java?hl=en.

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine for Java group.
 To post to this group, send email to google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] BackEnd Names cant able to retreive back

2012-01-04 Thread suresh ashok
Hi,

This is the piece of code where i am trying to get the backend name,
which i am using in GAE but its actually returning null.


BackendService service =
BackendServiceFactory.getBackendService();
String currentBackendName =
service.getCurrentBackend();
System.out.println(The current backend name
is+currentBackendName);


Any idea about how to retrieve the backend names in GAE.


regards,
Suresh



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Full Text Search Status?

2012-01-04 Thread Jaroslav Záruba
Any news/updates? :(

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/NcoX-BGLD2MJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Full Text Search Status?

2012-01-04 Thread Ikai Lan (Google)
In general we don't release ETAs on APIs, so I don't have anything new to
announce at this time. Hope you've noticed that we've moved to monthly
releases, so if everything goes to plan, likely in one of the next few
releases (though probably not the next one).

--
Ikai Lan
Developer Programs Engineer, Google App Engine
plus.ikailan.com | twitter.com/ikai



On Wed, Jan 4, 2012 at 3:29 AM, Jaroslav Záruba
jaroslav.zar...@gmail.comwrote:

 Any news/updates? :(

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine-java/-/NcoX-BGLD2MJ.

 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] java.lang.OutOfMemoryError: PermGen space

2012-01-04 Thread jhonghee
I am trying to start backend service using push task queue. Here's my
backend configuration

?xml version=1.0 encoding=UTF-8?
backends
backend name=zipcodebuilder
classB1/class
options
dynamictrue/dynamic
/options
/backend
/backends

and here's my code for adding task queue.

try{
Queue queue = QueueFactory.getDefaultQueue();
TaskOptions options = TaskOptions.Builder
.withUrl(/zipcodebuilder)
.method(TaskOptions.Method.POST)
.param(buildAll, buildAll.toString())
.param(buildDatastore, 
buildDatastore.toString())
.param(size, String.valueOf(size));

options = options.header(Host,

BackendServiceFactory.getBackendService().getBackendAddress(zipcodebuilder));

queue.add(options);  // - Here PermGen space runs out
}
catch (Exception e) {
logger.severe(Failed to add zipcodebuilder task into 
task queue: 
+ e);
}


java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
com.google.appengine.tools.development.DevAppServerClassLoader.loadClass(DevAppServerClassLoader.java:
87)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.privateGetPublicMethods(Class.java:2547)
at java.lang.Class.getMethods(Class.java:1410)
at com.zeroturnaround.javarebel.pM.makeClassPublicMethodCache(JRebel:
420)
at com.zeroturnaround.javarebel.pM.getClassPublicMethodCache(JRebel:
177)
at com.zeroturnaround.javarebel.pM.getMethods(JRebel:570)
at java.lang.Class.getMethods(Class.java)
at
com.google.appengine.tools.development.ApiProxyLocalImpl.getDispatchMethod(ApiProxyLocalImpl.java:
411)
at com.google.appengine.tools.development.ApiProxyLocalImpl.access
$400(ApiProxyLocalImpl.java:46)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:490)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:452)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:430)
at java.util.concurrent.Executors$PrivilegedCallable
$1.run(Executors.java:463)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors
$PrivilegedCallable.call(Executors.java:460)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)

Has anybody encounter this problem?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Conversion API - Adding Assets Example Wrongly Documented

2012-01-04 Thread RAJ
Hi All,

I am trying to produce pdf reports out of my html String as mentioned
in below tutorial:

http://code.google.com/appengine/docs/java/conversion/overview.html

code

// Create a conversion request from HTML to PNG.
Asset asset = new Asset(
text/html, bsome data/b.getBytes(), testfile.html);
Document document = new Document(asset);

/code

My HTML String has few pictures to be embedded. Thus, I am trying
Additional Functions (Adding Assets) example to add images as sub
asset.

But, example mentioned in tutorial is wrong. I am not able to add
image as sub-asset in my main html string. There is no java api
mentioned for the same!

Has someone done this earlier using Java?  (Example in python is
correctly described)

Cheers,
Raj

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: JPA Manual Transaction Retry

2012-01-04 Thread Gebo
I'm having the same problem...anyone know how to manually retry a
transaction when using JPA on GAE?

On Dec 30 2011, 9:36 pm, SaddleEDH saddle...@gmail.com wrote:
 Hi,
 I have a case where I want to manually retry a transaction in the case of
 failure...very similar to the example given on the java transaction page
 showing usage of the low level api...I have not been able to get this to
 work using JPA...it will never throw an exception when another user has
 changed the same entity group. I switched my code over to use the low level
 api and this works (basically I do just what is shown on the transaction
 page). While it works, the low level api has it disadvantages...one big one
 being that it can't update multiple entity groups in a single
 transaction...but maybe there is a way to do that that I am not aware of.

 Anyway, has anyone tried manual transaction retries with JPA? If so, any
 hints you can give me?

 Thanks!
 Jeff

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: JDO second level cache getting in the way...

2012-01-04 Thread Rick Mangi
Perhaps I am thinking of JDO and JPA as being more similar than I
should, but I've found that GAE doesn't really want you to think of
your datastore in an OO manner either. It's a collection of documents
and indexes. JDO (and JPA) encourage you to model your objects as you
would in any sane system and then let you forget about the mapping to
the underlying datastore as much as possible. That's awesome for most
environments. But IMHO (and admittedly with only a few months of time
trying to wrap my head around a JDO application I inherited, yes with
the old plugin) this is not the best way to work with the GAE
Datastore. I'm sure it works fine for many projects, but traversing
large trees of objects one at a time is very costly in terms of
performance. I've found that it's much more efficient to store the
data you need from related objects in the parent directly or in
another record using partial decomposition. That also makes using the
memcache service to cache larger result sets much easier, and you
don't wind up needing a lot of indexes to perform complex queries
since you can search on records that have been created ahead of time.
Yes, you can do this with JDO, but in my opinion JDO creates a layer
of abstraction that you don't need and one that gets in the way.


On Jan 3, 2:52 am, datanucleus andy_jeffer...@yahoo.com wrote:
  JDO was designed for relational data models, GAE was designed for the
  opposite.

 Please check your facts, perhaps by consulting people who actually
 designed the JDO standard, or by actually reading the JDO spec. It was
 designed to be datastore-agnostic. JPA on the other hand was not, with
 RDBMS syntax leaking through the query language.

 Use of version 2 of the GAE plugin (included as optional in 1.6.1 SDK)
 is recommended, fixing many shortcomings in the design of the original
 plugin

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: JDO second level cache getting in the way...

2012-01-04 Thread Péter Kovács
Many thanks, Rick, for bringing to my attention these apparently useful
alternatives! I hopefully will find time to try them.

Thanks,

Peter

On Mon, Jan 2, 2012 at 9:00 PM, Rick Mangi r...@broadcastr.com wrote:

 Do yourself a big favor and run away from JDO + GAE screaming as fast
 as you can. You're much better off using one of the thin wrappers
 around the AppEngine Datastore like Objectify or Twig along with the
 built in Memcache service.

 JDO was designed for relational data models, GAE was designed for the
 opposite. They don't play well together. You *can* get them to work,
 and many have, but I have yet to find anyone who enjoyed the
 experience.

 best,

 Rick


 On Jan 1, 7:07 pm, The night manager peter.dunay.kov...@gmail.com
 wrote:
  Hi,
 
  I am new to both GAE and JDO. I would be grateful if someone could
 provide
  guidance on a behavior I find rather counter-intuitive. In the following
  code, I have to call pm.evictAll() to successfully/persistently change
  properties (labels) on a freshly persisted object (bookmark):
 
  PersistenceManager pm = PMF.get().getPersistenceManager();
  try {
  Bookmark bookmark = new Bookmark(url);
  bookmark = pm.makePersistent(bookmark);
  pm.evictAll();
  Key k = bookmark.getKey();
  bookmark = pm.getObjectById(Bookmark.class, k);
  bookmark.addLabels(labels);
 
  } finally {
  pm.close();
  }
 
  I'd naively expect the above code to persistently adding labels to
 bookmarkseven without calling
  pm.evictAll()and with explicitly (re-)fetching the bookmark object. I'd
  expect JDO to notice that the Bookmark instance has been dirtied and
  pm.close() to persist the changes to the cached object.
 
  I find it also counter-intuitive that pm.evict(bookmark) doesn't work --
  the entire cache needs to be cleared for new labels on bookmark to get
  persisted. (Even though pm.evict(Object) appears to expect a *
  persistent-clean* object, which, in turn, appears to assume being in a
  transaction...)
 
  Any pointers on the reasons of this behavior will be gratefully
 appreciated.
 
  Peter

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: JDO second level cache getting in the way...

2012-01-04 Thread Péter Kovács
Many thanks, Andy, for the clarification.

I am still not sure which of the following statements describes the best
the behaviour I observe: it is (a) the intended behaviour, (b) not
intended, just happens to be like this or (c) a bug.

After regarding cache level: reading fleetingly through the JDO
specification (3.0), nothing sticks out to indicate that the JDO
implementation is supposed to manage any other cache than the second level
cache. (void evictAll() itself is listed under the *11.8 Second-level cache
management* section.) I am not sure what Level 1 cache may be...is it,
perhaps, an artifact of the datanucleus implementation?

Thanks

Peter

On Wed, Jan 4, 2012 at 6:04 AM, datanucleus andy_jeffer...@yahoo.comwrote:

 As for the problem of the original poster, evictAll is for the
 *Level1* cache (which will not be of any use since you aren't using
 transactions there). Calling addLabels is queued (doesn't go straight
 to the DB in the version you use there), and you don't then start a
 transaction. Simple thing to do to get around it would be
 pm.currentTransaction().begin();
 pm.currentTransaction().commit();
 after the addLabels.

 You can help yourself by looking at the log, since it explains way
 more than that (at DEBUG level).

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Anybody else unable to use com.google.api.services.plus? Suggestions please!

2012-01-04 Thread Ikai Lan (Google)
Is that file included in google-api-java-client-1.6.0-beta.zip? I see this:

dependencies  google-http-client-extensions-android2-1.6.0-beta.jar
google-api-client-1.6.0-beta.jar
 google-http-client-extensions-android2-1.6.0-beta-sources.jar
google-api-client-1.6.0-beta-sources.jar
 google-http-client-extensions-android3-1.6.0-beta.jar
google-api-client-extensions-1.6.0-beta.jar
 google-http-client-extensions-android3-1.6.0-beta-sources.jar
google-api-client-extensions-1.6.0-beta-sources.jar
 google-oauth-client-1.6.0-beta.jar
google-api-client-extensions-android2-1.6.0-beta.jar
 google-oauth-client-1.6.0-beta-sources.jar
google-api-client-extensions-android2-1.6.0-beta-sources.jar
 google-oauth-client-extensions-1.6.0-beta.jar
google-http-client-1.6.0-beta.jar
 google-oauth-client-extensions-1.6.0-beta-sources.jar
google-http-client-1.6.0-beta-sources.jar  LICENSE
google-http-client-extensions-1.6.0-beta.jar  readme.html
google-http-client-extensions-1.6.0-beta-sources.jar

I dug out the GAE starter project for Google+ (
http://code.google.com/p/google-plus-java-starter/source/checkout) and did
this:

jar xvf google-api-services-plus-v1-1.2.4-beta-sources.jar
  created: com/
  created: com/google/
  created: com/google/api/
  created: com/google/api/services/
  created: com/google/api/services/plus/
  created: com/google/api/services/plus/model/
 inflated: com/google/api/services/plus/model/ActivityObjectResharers.java
 inflated: com/google/api/services/plus/model/Acl.java
 inflated: com/google/api/services/plus/model/PeopleFeed.java
 inflated: com/google/api/services/plus/model/Comment.java
 inflated: com/google/api/services/plus/model/ActivityActorImage.java
 inflated: com/google/api/services/plus/model/CommentInReplyTo.java
 inflated: com/google/api/services/plus/model/ActivityObjectPlusoners.java
 inflated: com/google/api/services/plus/model/PersonOrganizations.java
 inflated: com/google/api/services/plus/model/CommentFeed.java
 inflated: com/google/api/services/plus/model/CommentActor.java
 inflated: com/google/api/services/plus/model/ActivityObjectReplies.java
 inflated: com/google/api/services/plus/model/CommentObject.java
 inflated: com/google/api/services/plus/model/PlusAclentryResource.java
 inflated: com/google/api/services/plus/model/PersonName.java
 inflated:
com/google/api/services/plus/model/ActivityObjectAttachmentsFullImage.java
 inflated: com/google/api/services/plus/model/PersonUrls.java
 inflated: com/google/api/services/plus/model/PersonEmails.java
 inflated: com/google/api/services/plus/model/ActivityProvider.java
 inflated: com/google/api/services/plus/model/ActivityObjectAttachments.java
 inflated:
com/google/api/services/plus/model/ActivityObjectAttachmentsEmbed.java
 inflated: com/google/api/services/plus/model/PersonPlacesLived.java
 inflated: com/google/api/services/plus/model/Activity.java
 inflated: com/google/api/services/plus/model/ActivityObjectActor.java
 inflated:
com/google/api/services/plus/model/ActivityObjectAttachmentsImage.java
 inflated: com/google/api/services/plus/model/ActivityFeed.java
 inflated: com/google/api/services/plus/model/ActivityObjectActorImage.java
 inflated: com/google/api/services/plus/model/CommentActorImage.java
 inflated: com/google/api/services/plus/model/ActivityActor.java
 inflated: com/google/api/services/plus/model/PersonImage.java
 inflated: com/google/api/services/plus/model/ActivityObject.java
 inflated: com/google/api/services/plus/model/Person.java
 inflated: com/google/api/services/plus/Plus.java
 inflated: com/google/api/services/plus/ApiClient.java

It's an older version, but it looks like it's defined there. Where did you
get the 1.3.0 version from? It could have been mispackaged.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
plus.ikailan.com | twitter.com/ikai



On Sat, Dec 31, 2011 at 1:24 AM, Jon mrjonandr...@gmail.com wrote:

 Anybody got any ideas why I'm getting class def not found errors when
 trying to use com.google.api.services.plus?

 I'm using the google-api-services-plus-v1-1.3.0-beta.jar

 ...Which is included in the google-api-java-client-1.6.0-beta.zip. All the
 other classes from that zip seem to build ok.

 My project is a non Maven project btw.

 Uncaught exception from servlet
 java.lang.NoClassDefFoundError: com/google/api/services/plus/Plus

 Maybe I'm missing some dependencies or maybe app engine is sandboxing it
 as it compiles fine?

 Any suggestions greatly appreciated!

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine-java/-/G0-Ks_v_CuwJ.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You 

[appengine-java] Re: JDO second level cache getting in the way...

2012-01-04 Thread datanucleus
@Rick,

JDO doesn't encourage you to do anything, nor impose it. Perhaps its
just that some will, upon using it, think in a particular way because
they used a similar API before, and they're used to their good old
RDBMS handling things for them so assume the same is true ... and it
isn't as you say. Doesn't mean they can't bundle things together with
JDO to minimise query impact also.

@Peter,
You observe behaviour in a very old version of software, and
nontransactional operations in that version did things differently
(though still comparable to the likes of Hibernate). The v2 version of
Googles plugin makes use of recent software and all nontransactional
persists/deletes are atomic. Obviously you could just put things in a
transaction and you'd be fine too.

Read about caches here
http://www.datanucleus.org/products/accessplatform_3_0/jdo/cache.html

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] DataStoreFactory and KeyFactory

2012-01-04 Thread suresh ashok
Hi All,

Is we need any additional lib to  be included in the classpath to use
the DataStoreFactory and KeyFactory in GAE?

I am trying to use the both but it fires an exception like this
java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/
KeyFactory



Regards,
Suresh

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] File content getting truncated while uploading the same in blob store

2012-01-04 Thread Nirzari Bhatt
Hi,

I am using experimental version of blob store API, to upload the file
retrieved as byte[] through a web service.

Following is the code I am using to upload the byte[] to blob store.

public BlobKey writeFileToBlobStore(String mimeType,byte[]
fileContent) {
 // Get a file service
 FileService fileService = FileServiceFactory.getFileService();
 AppEngineFile file = null;
  try {
file = fileService.createNewBlobFile(mimeType);
boolean lock = true;
FileWriteChannel writeChannel = null;
if(fileContent == null){
 LOGGER.log(Level.INFO,File Content is null...);
} else {
 writeChannel = fileService.openWriteChannel(file, lock);
 writeChannel.write(ByteBuffer.wrap(fileContent));
 writeChannel.closeFinally();
}
   } catch (IOException e) {
LOGGER.log(Level.SEVERE,e.getMessage(),e);
   }
return fileService.getBlobKey(file);
   }

Using the code above the file gets uploaded successfully without any
exception to blobstore.
But strangely the size of file is lesser that the one which was
actually sent across through web service. And hence it gives error
while opening the file.
I have experienced this thing while uploading the ms office files i.e.
word doc and excel file.
If I try uploading some text file with larger text then the text file
gets displayed,but the content at the end is truncated.

The size of files I tried uploading were upto 450 kb (i.e. less then
32 MB  restriction given by blob store API).

Kindly help me out in the same and let me know if anything is missing
out in the code, or it is some restriction of the experimental version
of the API?

I am in need of getting this work very urgently, so any help would be
highly appreciated.

Thanks in advance,
Nirzari

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Problem with Backend service development on local env

2012-01-04 Thread jhonghee
As I reported in my previous post:
https://groups.google.com/group/google-appengine-java/browse_thread/thread/3486790b7f5fd061,
I am having this PermGen issue consistently now.

I think that it's really related to local dev environment support for
Backend service. Please take a look at following stacktrace. It
originated from BackendServersFilter. If I disabled Backend Service on
my local dev, I don't have PermGen issue.


java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
176)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.codehaus.jackson.util.BufferRecycler.init(BufferRecycler.java:
48)
at
org.codehaus.jackson.JsonFactory._getBufferRecycler(JsonFactory.java:
601)
at org.codehaus.jackson.JsonFactory._createContext(JsonFactory.java:
532)
at
org.codehaus.jackson.JsonFactory.createJsonGenerator(JsonFactory.java:
458)
at
org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.writeInternal(MappingJacksonHttpMessageConverter.java:
148)
at
org.springframework.http.converter.AbstractHttpMessageConverter.write(AbstractHttpMessageConverter.java:
181)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
$ServletHandlerMethodInvoker.writeWithMessageConverters(AnnotationMethodHandlerAdapter.java:
975)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
$ServletHandlerMethodInvoker.handleResponseBody(AnnotationMethodHandlerAdapter.java:
933)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter
$ServletHandlerMethodInvoker.getModelAndView(AnnotationMethodHandlerAdapter.java:
882)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:
428)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:
414)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:
790)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:
719)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:
644)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:
549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:
97)
Jan 5, 2012 2:32:18 AM com.google.apphosting.utils.jetty.JettyLogger
warn
WARNING: /saveItem
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
176)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.google.apphosting.api.DatastorePb
$PutResponse.clinit(DatastorePb.java:11932)
at
com.google.appengine.api.datastore.AsyncDatastoreServiceImpl.doBatchPutBySize(AsyncDatastoreServiceImpl.java:
523)
at
com.google.appengine.api.datastore.AsyncDatastoreServiceImpl.put(AsyncDatastoreServiceImpl.java:
466)
at