[appengine-java] Re: JDO problem : oid is not instanceof javax.jdo.identity.ObjectIdentity

2010-10-14 Thread l.denardo
I managed to reproduce the issue with a simplified model.
Notice that the same code seemed to pass the test yoesterday...not
today.

I can't attach files so I paste the model here


@PersistenceCapable
class Inner{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;
}


@PersistenceCapable
class Outer{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent
Inner inner;

public Outer(){
inner = new Inner();
}

//  public void setInner(Inner in){
//  inner = in;
//  }
}


@PersistenceCapable
class Container{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent
ArrayListOuter outers;

@Persistent
ArrayListInner inners;

public void addOuters( int n){
outers = new ArrayListOuter();
for (int i = 0; i  n; i++){
outers.add(new Outer());
}
}

public void addInners(int n){
inners = new ArrayListInner();
for (int i = 0; i  n; i++){
inners.add(new Inner());
}
}
}

public class TestJDOException {

private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig());

private static final PersistenceManagerFactory pmf =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

@Before
public void setUp() throws Exception {
helper.setUp();
}

@After
public void tearDown() throws Exception {
helper.tearDown();
}

@Test
public void testAddInners(){
Key key = null;
Container container = new Container();
container.addInners(1);
PersistenceManager pm = pmf.getPersistenceManager();
try{
pm.makePersistent(container);
key = container.key;
}
finally{
pm.close();
}

pm = pmf.getPersistenceManager();
try{
container = pm.getObjectById(Container.class, key);
System.out.println(container.inners);
System.out.println(container.outers);
}
finally{
pm.close();
}
}

@Test
public void testAddOuters(){
Key key = null;
Container container = new Container();
container.addOuters(1);
PersistenceManager pm = pmf.getPersistenceManager();
try{
pm.makePersistent(container);
key = container.key;
}
finally{
pm.close();
}

pm = pmf.getPersistenceManager();
try{
container = pm.getObjectById(Container.class, key);
System.out.println(container.inners);
System.out.println(container.outers);
}
finally{
pm.close();
}
}
}

First test passes, second fails. Every test adding Outers fails as
well.
Thanks to everybody
Lorenzo

-- 
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-j...@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 problem : oid is not instanceof javax.jdo.identity.ObjectIdentity

2010-10-14 Thread l.denardo
I managed to reproduce the issue with a simplified model.
Notice that the same code seemed to pass the test yoesterday...not
today.

I can't attach files so I paste the model here


@PersistenceCapable
class Inner{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;
}


@PersistenceCapable
class Outer{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent
Inner inner;

public Outer(){
inner = new Inner();
}

//  public void setInner(Inner in){
//  inner = in;
//  }
}


@PersistenceCapable
class Container{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent
ArrayListOuter outers;

@Persistent
ArrayListInner inners;

public void addOuters( int n){
outers = new ArrayListOuter();
for (int i = 0; i  n; i++){
outers.add(new Outer());
}
}

public void addInners(int n){
inners = new ArrayListInner();
for (int i = 0; i  n; i++){
inners.add(new Inner());
}
}
}

public class TestJDOException {

private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig());

private static final PersistenceManagerFactory pmf =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

@Before
public void setUp() throws Exception {
helper.setUp();
}

@After
public void tearDown() throws Exception {
helper.tearDown();
}

@Test
public void testAddInners(){
Key key = null;
Container container = new Container();
container.addInners(1);
PersistenceManager pm = pmf.getPersistenceManager();
try{
pm.makePersistent(container);
key = container.key;
}
finally{
pm.close();
}

pm = pmf.getPersistenceManager();
try{
container = pm.getObjectById(Container.class, key);
System.out.println(container.inners);
System.out.println(container.outers);
}
finally{
pm.close();
}
}

@Test
public void testAddOuters(){
Key key = null;
Container container = new Container();
container.addOuters(1);
PersistenceManager pm = pmf.getPersistenceManager();
try{
pm.makePersistent(container);
key = container.key;
}
finally{
pm.close();
}

pm = pmf.getPersistenceManager();
try{
container = pm.getObjectById(Container.class, key);
System.out.println(container.inners);
System.out.println(container.outers);
}
finally{
pm.close();
}
}
}

First test passes, second fails. Every test adding Outers fails as
well.
Thanks to everybody
Lorenzo

-- 
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-j...@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 problem : oid is not instanceof javax.jdo.identity.ObjectIdentity

2010-10-14 Thread l.denardo

Looks like the problem is due to a combination of two factors:

*Class Inner has two parents, Outer and Container

AND

*Class Container mantains a list of Inners.

Changing to

@PersistenceCapable
 class Container{
 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 Key key;

 @Persistent
 ArrayListOuter outers;

 @Persistent
 Inner inners;

 public void addOuters( int n){
 outers = new ArrayListOuter();
 for (int i = 0; i  n; i++){
 outers.add(new Outer());
 }
 }

 public void addInners(int n){
 for (int i = 0; i  n; i++){
inner = new Inner();
 }
 }
}

Makes everything work fine.

I have a very similar model which works well in production (it's been
up for nearly one month now).
Hope this helps people facing similar issues. Maybe a short note in
documentation could help.

Regards
Lorenzo

-- 
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-j...@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: Fwd: entity update question

2010-10-14 Thread MatthewAdams
Incorrect, Vik.  You do not need to call pm.makePersistent(e) in order
to save changes made to an already persistent object.  You use
makePersistent(..) to cause new instances to become persistent, to
merge detached instance state into the persistence context, or to
attach detached instances into the persistence context in place.

The act of changing the state of a persistence capable instance marks
the instance as dirty, which JDO will then flush at or before the
commit of the transaction governing your operation.

Calling pm.makePersistent(x) on an instance x that is already
persistent is a no-op.  If x is detached and you want to merge the
changes incurred while detached into the persistent object graph, then
do the following:

Employee persistentEmployee = pm.makePersistent(detachedEmployee);

The PersistenceManager will take the detachedEmployee, find its
persistent counterpart by id (persistentEmployee), apply any changes
found in detachedEmployee to persistentEmployee, then return
persistentEmployee.  This happens assuming that the option
javax.jdo.option.CopyOnAttach is true.  If false and the PM has no
Employee with that oid currently in the persistence context, then
detachedEmployee itself transitions to persistent-dirty and is itself
returned.  If false and the PM already has an Employee with the same
oid in the persistence context, then a JDOUserException will be
thrown.

I highly recommend a read of the JDO specification.  It's really well
written, if I don't say so myself... :)

HTH,
Matthew
JDO Expert Group Member

On Oct 13, 1:56 pm, Cyrille Vincey crll...@gmail.com wrote:
 Yes you do.

 From:  Vik vik@gmail.com
 Reply-To:  google-appengine-java@googlegroups.com
 Date:  Wed, 13 Oct 2010 18:47:33 +0530
 To:  Google App Engine for Java google-appengine-java@googlegroups.com
 Subject:  [appengine-java] Fwd: entity update question

 Hie

 I do for create like

 try{
      Employee e = new Employee();
     pm.makePersistent(e);

 }finally(){
    pm.close();
 }

 For update case I am getting the entity by id and updating one of the
 attribute like
 Employee e = pm.getObectById(empPK, Employee.class);
 e.setSalary(1000);

 the question is do i need to call the below statement in this case as well?
  pm.makePersistent(e)

 Thankx and Regards

 Vik
 Founderwww.sakshum.comhttp://www.sakshum.comwww.sakshum.blogspot.comhttp://www.sakshum.blogspot.com

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://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-j...@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] Content-Length header on POST request to GAE

2010-10-14 Thread markus
Dear community,

I've searched on Google and on this forum for an answer to my
question, but nothing turned up, so here goes:

I am trying to set the Content-Length header in my response from
within the servlet, like this:

response.setContentLength(someString.getBytes().length);

The request is a POST request.

It works on the test-server started from within Eclipse (and tested
with curl), it doesn't work on the GAE production server -- the header
field Content-Length simply gets discarded.

These are the headers from the response on GAE production:

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Date: Thu, 14 Oct 2010 13:24:48 GMT
Server: Google Frontend
Cache-Control: private, x-gzip-ok=
Transfer-Encoding: chunked

Does it have something to do with the compression and/or the chunked
encoding? Is it still possible to set the content-length somehow? If
not, why does GAE supress this header?

Thank you very much in advance!

Regards,
Markus

-- 
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-j...@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] HtmlUnit support on GAE for GWT crawlability

2010-10-14 Thread Gal Dolber
This is not 100% mature, but it is a beginning
http://code.google.com/p/guit-ajax-crawler/

On Wed, Oct 13, 2010 at 11:25 PM, brucko geoff.bruck...@gmail.com wrote:

 This is doable. After sorting through the various forums, I decided to
 write a blog to put what I did all in one place. The biggest problem now
 appears to be startup times for your instance on App Engine resulting in
 timeouts. The other thing to watch is to make sure that you don't use the
 redirects in an irresponsible way leading to infinite loops.

 Blog is here.
 How to Make Google AppEngine Applications Ajax 
 Crawlablehttp://www.ozdroid.com/#%21BLOG/2010/10/12/How_to_Make_Google_AppEngine_Applications_Ajax_Crawlable

 Geoff

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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-j...@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] Strange exception with my app

2010-10-14 Thread nicanor.babula
Hi google appengine team,

Since today, I have been getting continuously the exception reported
below. Yesterday I am not sure, but the day before yesterday it worked
for sure. I have more apps that use the same library and all of them
keep throwing the same exception. You can reproduce it uploading this
xsl file:
http://www.4shared.com/file/uefUC7KX/simple.html
on this servlet:
http://almaoffice0.appspot.com/testPDF.jsp
app id:
almaoffice0 and domodentweb.

In the development server, everything works fine (just like before).

I need information about the issue pretty fast because the second app
is a production one and I need to know what decision to take.

Thanks in advance.

Uncaught exception from servlet
java.lang.NoClassDefFoundError: sun/dc/path/PathException
at
org.apache.xmlgraphics.java2d.GraphicContext.init(GraphicContext.java:
93)
at
org.apache.fop.render.intermediate.IFGraphicContext.init(IFGraphicContext.java:
42)
at
org.apache.fop.render.intermediate.IFRenderer.init(IFRenderer.java:
127)
at
org.apache.fop.render.RendererFactory.createRendererForDocumentHandler(RendererFactory.java:
313)
at
org.apache.fop.render.RendererFactory.tryIFDocumentHandlerMaker(RendererFactory.java:
290)
at
org.apache.fop.render.RendererFactory.createRenderer(RendererFactory.java:
270)
at org.apache.fop.area.RenderPagesModel.init(RenderPagesModel.java:
69)
at
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:
130)
at org.apache.fop.area.AreaTreeHandler.init(AreaTreeHandler.java:
102)
at
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:
359)
at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:105)
at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:100)
at org.apache.fop.apps.Fop.init(Fop.java:78)
at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:254)
at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:231)
at
cri.domodentweb.server.servlets.GenUserCalendarMemoPDF.doGet(GenUserCalendarMemoPDF.java:
166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
261)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:8483)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:8481)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
418)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:
572)
at com.google.tracing.TraceContext$TraceContextRunnable
$1.run(TraceContext.java:448)
at 

[appengine-java] Re: Need to include com.google.gdata.client in the deployment for GAE?

2010-10-14 Thread Saqib Ali
Thanks Ikai. Are there any plans to include GData Client to the App
Engine?

Saqib

On Oct 7, 6:50 pm, Ikai Lan (Google) ikai.l+gro...@google.com
wrote:
 You have to include it. The gdata client is not available server side.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blogger:http://googleappengine.blogspot.com
 Reddit:http://www.reddit.com/r/appengine
 Twitter:http://twitter.com/app_engine



 On Thu, Oct 7, 2010 at 1:42 PM, Saqib Ali docbook@gmail.com wrote:
  Hello All,

  I am working on a GAE App that will talk using Google Spreadsheet API
  w/ OAuth. Do I need to include com.google.gdata.client in the
  deployment package, or is it already available on GAE?

  Thanks,
  Saqib

  --
  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-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2B 
  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-j...@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: Need to include com.google.gdata.client in the deployment for GAE?

2010-10-14 Thread Ikai Lan (Google)
Not at the moment, though the new builtins function in app.yaml would
certainly allow for it. The reason I think it wouldn't is because the GData
client isn't maintained by a team that works closely with App Engine, but if
there is a demand, there's nothing else really holding us back. I don't see
including it as that big of a deal, though, so in my eyes this feature would
be low priority.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Thu, Oct 14, 2010 at 9:19 AM, Saqib Ali docbook@gmail.com wrote:

 Thanks Ikai. Are there any plans to include GData Client to the App
 Engine?

 Saqib

 On Oct 7, 6:50 pm, Ikai Lan (Google) 
 ikai.l+gro...@google.comikai.l%2bgro...@google.com
 
 wrote:
  You have to include it. The gdata client is not available server side.
 
  --
  Ikai Lan
  Developer Programs Engineer, Google App Engine
  Blogger:http://googleappengine.blogspot.com
  Reddit:http://www.reddit.com/r/appengine
  Twitter:http://twitter.com/app_engine
 
 
 
  On Thu, Oct 7, 2010 at 1:42 PM, Saqib Ali docbook@gmail.com wrote:
   Hello All,
 
   I am working on a GAE App that will talk using Google Spreadsheet API
   w/ OAuth. Do I need to include com.google.gdata.client in the
   deployment package, or is it already available on GAE?
 
   Thanks,
   Saqib
 
   --
   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-j...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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] HtmlUnit support on GAE for GWT crawlability

2010-10-14 Thread Ikai Lan (Google)
Awesome! It's been submitted to the App Engine Reddit:

http://www.reddit.com/r/AppEngine/comments/dr9c4/making_htmlunit_work_with_gwt_and_app_engine_for/

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Thu, Oct 14, 2010 at 8:16 AM, Gal Dolber gal.dol...@gmail.com wrote:

 This is not 100% mature, but it is a beginning
 http://code.google.com/p/guit-ajax-crawler/


 On Wed, Oct 13, 2010 at 11:25 PM, brucko geoff.bruck...@gmail.com wrote:

 This is doable. After sorting through the various forums, I decided to
 write a blog to put what I did all in one place. The biggest problem now
 appears to be startup times for your instance on App Engine resulting in
 timeouts. The other thing to watch is to make sure that you don't use the
 redirects in an irresponsible way leading to infinite loops.

 Blog is here.
 How to Make Google AppEngine Applications Ajax 
 Crawlablehttp://www.ozdroid.com/#%21BLOG/2010/10/12/How_to_Make_Google_AppEngine_Applications_Ajax_Crawlable

 Geoff

 --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




 --
 Guit: Elegant, beautiful, modular and *production ready* gwt applications.

 http://code.google.com/p/guit/





  --
 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@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-j...@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: Fwd: entity update question

2010-10-14 Thread MatthewAdams
...which, by the way, can be found for JDO 3.0 at
http://jcp.org/aboutJava/communityprocess/mrel/jsr243/index3.html

The section in question here is 12.6.7, p.124, Make instances
persistent.

--matthew

On Oct 14, 8:34 am, MatthewAdams matthewadam...@gmail.com wrote:
 I highly recommend a read of the JDO specification.  It's really well
 written, if I don't say so myself... :)


-- 
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-j...@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] protobuf storage with JDO

2010-10-14 Thread Guillaume B.
Hello,

I make a basic application that store simple java object using objectify

I also make a spring service that create and return protobuf object

as the protobuf object is nearly the same that the object that I store
in big table
I wonder if there was a standard way to store protobuf object in the
datastore

as objectify and JDO use annotation and that I will not anoted
generated protobuf object
perhaps someone as a sample / tutorial of the AddressBook protobuf in
appengine that store object in the datastore

-- 
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-j...@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] JPA query + missing the obvious?

2010-10-14 Thread alesj
I have this query:

  Query query = getEM().createQuery(select s from Subscription s
where s.clientId = ?1 and s.topicId = ?2);
  query.setParameter(1, client.getId());
  query.setParameter(2, topic.getId());
  return getSingleResult(query);

I'm pretty sure it should return some results - the proper data is
persisted before this,
but yet, I don't get any results.

Which obvious thing am I missing?

My entity class:

@Entity
public class Subscription extends AbstractEntity
{
   private static long serialVersionUID = 1l;

   private Long clientId;
   private Long topicId;

   public Long getClientId()
   {
  return clientId;
   }

   public void setClientId(Long client)
   {
  this.clientId = client;
   }

   public Long getTopicId()
   {
  return topicId;
   }

   public void setTopicId(Long topicId)
   {
  this.topicId = topicId;
   }
}

-- 
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-j...@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 query + missing the obvious?

2010-10-14 Thread alesj
A missing info -- the matching data is persisted before, in a separate/
different transaction.

-- 
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-j...@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] SDK 1.3.8 released!

2010-10-14 Thread Takashi Matsuo
Hello App Engine Developers!

We're very happy to announce that SDK 1.3.8 is released today. There
are many new cool features, so please download the new SDK and enjoy
it!

You can download the new SDK from:
http://code.google.com/appengine/downloads.html

Our blog post includes some screenshots of new features in admin console:
http://googleappengine.blogspot.com/2010/10/new-app-engine-sdk-138-includes-new.html

Here are release notes:

Java
---
Version 1.3.8
=
- You can run task queue tasks immediately from the admin console.
- Added an OutputSettings class to the Images API to specify the JPEG encoding
  quality when running in production.
- Support for login of multiple Google accounts within an app, and longer login
  sessions. For more information see:
http://www.google.com/support/accounts/bin/answer.py?answer=181599
- In queue.xml, the maximum allowed bucket size is now 100.
- Removed limits on zigzag merge-join queries. Therefore the error The built-in
  indices are not efficient enough for this query and your data. Please add a
  composite index for this query. will no longer be thrown in most cases,
  enabling more types of queries without indexes.
- The whitelist has been updated to include java.net.InetAddress and some
  interfaces and abstract classes in javax.xml.soap, including
  javax.xml.soap.SOAPMessage.
- Fixed an issue reserving App Ids by owners of emails containing periods,
  multiple cases, and googlemail.com address.
http://code.google.com/p/googleappengine/issues/detail?id=1196
- Fixed an issue where TaskOptions had no public getters, making testing
  impossible.
http://code.google.com/p/googleappengine/issues/detail?id=3243
- Fixed an issue on the development server where PNGs were being returned as
  JPEGs.
http://code.google.com/p/googleappengine/issues/detail?id=3661


Python
-
Version 1.3.8
==
- Builtin app.yaml handlers are available for common application functions,
  such as appstats.

http://code.google.com/appengine/docs/python/config/appconfig.html#Builtin_Handlers
- The Admin Console now provides an experimental tool to delete all entities in
  the datastore or all entities of a given type. This is available only if
  enabled using the datastore_admin builtin. Deleting entities will count
  against application quota.

http://code.google.com/appengine/docs/python/datastore/creatinggettinganddeletingdata.html#Deleting_Entities_in_Bulk
- You can run task queue tasks immediately from the Admin Console.
- You can now specify the quality of JPEG images via the Image API's
  execute_transforms function. Available in production only.
- Support for login of multiple Google accounts within an app, and longer login
  sessions. For more information see:
http://www.google.com/support/accounts/bin/answer.py?answer=181599
- In queue.yaml, the maximum allowed bucket size is now 100.
- Precompilation is now enabled by default. To disable, use the
  --no_precompilation flag when updating your app.
- BlobInfo now has an open() method that returns a BlobReader.
- BlobReader now accepts a BlobInfo.
- Removed limits on zigzag merge-join queries. Therefore the error The built-in
  indices are not efficient enough for this query and your data. Please add a
  composite index for this query. will no longer be thrown in most cases,
  enabling more types of queries without indexes.
- Fixed an issue with task queue tasks not running on the dev_appserver when
  using Python 2.6.
- Fixed an issue on the dev_appserver where auto task running wasn't working for
  BulkAdd.
- Fixed an issue reserving App Ids by owners of similarly-named mails accounts
  containing periods, multiple cases, and googlemail.com address.
http://code.google.com/p/googleappengine/issues/detail?id=1196
- Fixed an issue on the development server where PNGs were being returned as
  JPEGs.
http://code.google.com/p/googleappengine/issues/detail?id=3661

-- 
Takashi Matsuo
Developer Relations
Developer Advocate for Google App Engine/iGoogle
Google Japan, Inc.

-- 
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-j...@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] Any changes to access levels in com.google.appengine.api.datastore recently?

2010-10-14 Thread Darren Clarke
Has anything changed with class access levels (public vs. private) in
the production datastore code in the last day or so?

I've had a Clojure app running for several weeks and starting last
night, whenever I try to access the datastore, I get the error below.
It could be a bug in the library I'm using (appengine-clj) or even in
Clojure's dispatch code, but I just want to understand if anything has
changed server-side that might have triggered it. The application still
works on the dev appserver v1.3.7.





java.lang.IllegalArgumentException: Can't call public method of
non-public class: public com.google.appengine.api.datastore.Transaction
com.google.appengine.api.datastore.BaseDatastoreService.getCurrentTransaction(com.google.appengine.api.datastore.Transaction)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:85) at
clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) at
appengine.datastore.service$current_transaction.invoke(service.clj:72)
at appengine.datastore.service$put_entity.invoke(service.clj:131) at
appengine.datastore.service$fn__176.invoke(service.clj:149) at
appengine.datastore.service$fn__136$G__116__141.invoke(service.clj:10)
at
com.redaranj.ledes.service.servlet$fn__1902$fn__1903.invoke(servlet.clj:17)
at compojure.core$routes$fn__1706$fn__1707.invoke(core.clj:72) at
clojure.core$some.invokeStatic(core.clj:2297) at
compojure.core$routes$fn__1706.invoke(core.clj:71) at
ring.middleware.params$wrap_params$fn__1468.invoke(params.clj:77) at
ring.middleware.cookies$wrap_cookies$fn__1559.invoke(cookies.clj:123)
at
ring.util.servlet$make_service_method$fn__1881.invoke(servlet.clj:117)
at com.redaranj.ledes.service.servlet$_service.invoke(servlet.clj:19)
at com.redaranj.ledes.service.servlet.service(Unknown Source) at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326) at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8483)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:8481)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
at
com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:418)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:572)
at
com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at
com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at
com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

-- 
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-j...@googlegroups.com.
To unsubscribe from this 

[appengine-java] help with redirecting user after authentication

2010-10-14 Thread fd
hello people;

i have a question about user authentication, i want to redirect the
http request, to a custom url, after the user performs login, actually
the framework redirects to the same url that host the app.

thanks a lot

fd

-- 
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-j...@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.