Re: [appengine-java] Re: Problem with persist a child class

2010-09-24 Thread Cyrille Vincey
Sorry, I did not see that your child class was inherited from another class.
I tried using inheritance with JDO some times ago.
Unsuccessfully : this is not supported by JDO yet.

See 
http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/dataclasses.
html#Inheritance  


On 24/09/10 01:30, lisandrodc lisandr...@gmail.com wrote:

 Hi!Cyrille I add a primary key in my child class:
 
 @PersistenceCapable(identityType =
 IdentityType.APPLICATION,detachable=true)
 public class RegFechaUsuario extends Fecha  {
 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 private Key id;
 @Persistent
 private int puntos;
 @Persistent
 private Long idUsuarioFecha;
 @Persistent
 private Long idFechaOriginal;
 
 
 And the exception is:
 
 Error in meta-data for model.RegFechaUsuario: More than one
 primary key field.
 
 Caused by:
 
 Error in meta-data for model.RegFechaUsuario: More than one primary
 key field.
 org.datanucleus.store.appengine.MetaDataValidator
 $DatastoreMetaDataException: Error in meta-data for
 model.RegFechaUsuario: More than one primary key field.
 at
 org.datanucleus.store.appengine.MetaDataValidator.validatePrimaryKey(MetaDataV
 alidator.java:
 416)
 at
 org.datanucleus.store.appengine.MetaDataValidator.validate(MetaDataValidator.j
 ava:
 120)
 at
 org.datanucleus.store.appengine.DatastoreManager.validateMetaDataForClass(Data
 storeManager.java:
 766)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(D
 atastorePersistenceHandler.java:
 328)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(Data
 storePersistenceHandler.java:
 251)
 at
 org.datanucleus.store.appengine.BatchPutManager.processBatchState(BatchPutMana
 ger.java:
 35)
 at
 org.datanucleus.store.appengine.BatchManager.finish(BatchManager.java:
 54)
 at org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
 $BatchManagerWrapper.call(DatastoreJDOPersistenceManager.java:127)
 at org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
 $BatchManagerWrapper.access$200(DatastoreJDO
 
 On 23 sep, 05:25, Cyrille Vincey crll...@gmail.com wrote:
 There is no primary key in your child class.
 Add one.
 
 On 23/09/10 04:40, lisandrodc lisandr...@gmail.com wrote:
 
 
 
 Hi ! I have a problem when persist a chid class.
 The parent class:
 
 @PersistenceCapable
 
 @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
 public  abstract class Fecha   {
 
 @PrimaryKey
 @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 private Key id;
 @Persistent
 private String nombre;
 @Persistent
 private Date fechaIni;
 @Persistent
 private Date fechaFin;
 
 @Persistent(defaultFetchGroup = true)
 ListPartido partidos;
 
 private Long id2;
 
 private Long kind;
 
 The child class:
 @PersistenceCapable(identityType =
 IdentityType.APPLICATION,detachable=true)
 public class RegFechaUsuario extends Fecha  {
 
 @Persistent
 private int puntos;
 @Persistent
 private Long idUsuarioFecha;
 @Persistent
 private Long idFechaOriginal;
 
 The method at persist:
 
 public void crearRegFechaUsuario(RegFechaUsuario regFechaUsuario) {
         //regFechaUsuario is an object initialized
 Transaction tx = pm.currentTransaction();
 try {
 tx.begin();
 
 pm.makePersistentAll(regFechaUsuario);
                        //here is the exception
 tx.commit();
 } finally {
 // pm.close();
 if (tx.isActive()) {
 tx.rollback();
 }
 }
 
 }
 
 And the exception is (internal error of the library of google apps or
 datanucleus), the cast:
 
 Problem accessing /Prode/JugarFecha.action. Reason:
 
     java.lang.Long cannot be cast to java.lang.String
 
 Caused by:
 
 java.lang.ClassCastException: java.lang.Long cannot be cast to
 java.lang.String
 at
 org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParent
 Sw
 itch(DatastoreRelationFieldManager.java:
 202)
 at org.datanucleus.store.appengine.DatastoreRelationFieldManager
 $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
 at org.datanucleus.store.appengine.DatastoreRelationFieldManager
 $1.apply(DatastoreRelationFieldManager.java:112)
 at
 org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations
 (D
 atastoreRelationFieldManager.java:
 81)
 at
 org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(Datasto
 re
 FieldManager.java:
 955)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(D
 at
 astorePersistenceHandler.java:
 546)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProces
 s(
 DatastorePersistenceHandler.java:
 304)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(Da
 ta
 storePersistenceHandler.java:
 256)
 at
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(Dat
 as
 torePersistenceHandler.java:
 240)
 at
 org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateMan
 ag
 erImpl.java:
 3185)
 at
 

[appengine-java] javax.naming.InitialContext is a restricted class

2010-09-24 Thread Bhanwar Gupta
Hi, I am trying to  deploy a sample JSF 2.0 application using the
following guide

http://java.dzone.com/news/jsf2-configuration-google-app

But on deploy getting this error in the logs :

http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/

WARNING: Error starting handlers
Throwable occurred: java.lang.NoClassDefFoundError:
javax.naming.InitialContext is a restricted class. Please see the
Google  App Engine developer's guide for more details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
51)
at
com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:
578)
at com.sun.faces.config.WebConfiguration.init(WebConfiguration.java:
114)
at
com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:
174)
at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:
161)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
146)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
222)
at com.google.appengine.tools.development.DevAppServerMain
$StartAction.apply(DevAppServerMain.java:171)
at com.google.appengine.tools.util.Parser
$ParseResult.applyArgs(Parser.java:48)
at
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:
120)
at
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:
96)

Tried few other links but in vain, please suggest

Bhanwar Gupta
www.bhanwar.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 at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Creating indexes on List of String elements

2010-09-24 Thread Ice13ill
I'm trying to implement a search based on a list of keywords (string).
The list is created based on the content of the objects' fields and i
use it when matching against a query text.
The problem is that i can't create indexes on App engine (i get Error
after about 30 mins, and i have to delete it). There are about 90,000
entities of that kind and the index should looke like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

and i have about four of them.

My question: do i want to much ? :) I tried uploading about 4 indexes
and i got Error. I tried uploading 1 and worked (but needed about 2-3
h). Is there a problem if i try to create 4 indexes of this magnitude
(and why)? Can i be sure that uploading one by one will work? Or maybe
this problem is related to AppEngine datastore problems ?
Please advice !

-- 
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] Problem with indexes on List of String elements

2010-09-24 Thread Ice13ill
I'm trying to implement a search based on a list of keywords (string).
The list is created based on the content of the objects' fields and i
use it when matching against a query text.
The problem is that i can't create indexes on App engine (i get Error
after about 30 mins, and i have to delete it). There are about 90,000
entities of that kind and the index should looke like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

and i have about four of them. Plus, i want to upload smth like this
keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲,
keyWordsList ▲, key ▼
so i can include about 5 words in my query text

My question: do i want to much ? :) I tried uploading about 4 indexes
and i got Error. I tried uploading 1 and worked (but needed about 2-3
h). Is there a problem if i try to create 4 indexes of this magnitude
(and why)? Can i be sure that uploading one by one will work? Or maybe
this problem is related to AppEngine datastore problems ?
Please advice !

-- 
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] Problem with indexes on ListString

2010-09-24 Thread Ice13ill
I'm trying to implement a search based on a list of keywords (string).
The list is created based on the content of the objects' fields and i
use it when matching against a query text.
The problem is that i can't create indexes on App engine (i get Error
after about 30 mins, and i have to delete it). There are about 90,000
entities of that kind and the index should looke like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

and i have about four of them. Plus, i want to upload smth like this
keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲,
keyWordsList ▲, key ▼
so i can include about 5 words in my query text

My question: do i want to much ? :) I tried uploading about 4 indexes
and i got Error. I tried uploading 1 and worked (but needed about 2-3
h). Is there a problem if i try to create 4 indexes of this magnitude
(and why)? Can i be sure that uploading one by one will work? Or maybe
this problem is related to AppEngine datastore problems ?
Please advice !

-- 
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] Problem with indexes on ListString

2010-09-24 Thread Ice13ill
I'm trying to implement a search based on a list of keywords (string).
The list is created based on the content of the objects' fields and i
use it when matching against a query text.
The problem is that i can't create indexes on App engine (i get Error
after about 30 mins, and i have to delete it). There are about 90,000
entities of that kind and the index should looke like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

and i have about four of them. Plus, i want to upload smth like this
keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲,
keyWordsList ▲, key ▼
so i can include about 5 words in my query text

My question: do i want to much ? :) I tried uploading about 4 indexes
and i got Error. I tried uploading 1 and worked (but needed about 2-3
h). Is there a problem if i try to create 4 indexes of this magnitude
(and why)? Can i be sure that uploading one by one will work? Or maybe
this problem is related to AppEngine datastore problems ?
Please advice !

-- 
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: Problem with persist a child class

2010-09-24 Thread Fernando O.
you don't need an aditional key

your problem is that you already have a @PrimaryKey in Fecha so you don't
need it in RegFechaUsuario.

Cheers,
Fernando

On Thu, Sep 23, 2010 at 8:30 PM, lisandrodc lisandr...@gmail.com wrote:

 Hi!Cyrille I add a primary key in my child class:

 @PersistenceCapable(identityType =
 IdentityType.APPLICATION,detachable=true)
 public class RegFechaUsuario extends Fecha  {
 @PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
 private int puntos;
@Persistent
private Long idUsuarioFecha;
@Persistent
private Long idFechaOriginal;


 And the exception is:

Error in meta-data for model.RegFechaUsuario: More than one
 primary key field.

 Caused by:

 Error in meta-data for model.RegFechaUsuario: More than one primary
 key field.
 org.datanucleus.store.appengine.MetaDataValidator
 $DatastoreMetaDataException: Error in meta-data for
 model.RegFechaUsuario: More than one primary key field.
at

 org.datanucleus.store.appengine.MetaDataValidator.validatePrimaryKey(MetaDataValidator.java:
 416)
at

 org.datanucleus.store.appengine.MetaDataValidator.validate(MetaDataValidator.java:
 120)
at

 org.datanucleus.store.appengine.DatastoreManager.validateMetaDataForClass(DatastoreManager.java:
 766)
at

 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:
 328)
 at

 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:
 251)
at

 org.datanucleus.store.appengine.BatchPutManager.processBatchState(BatchPutManager.java:
 35)
at
 org.datanucleus.store.appengine.BatchManager.finish(BatchManager.java:
 54)
at
 org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
 $BatchManagerWrapper.call(DatastoreJDOPersistenceManager.java:127)
at
 org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
 $BatchManagerWrapper.access$200(DatastoreJDO

 On 23 sep, 05:25, Cyrille Vincey crll...@gmail.com wrote:
  There is no primary key in your child class.
  Add one.
 
  On 23/09/10 04:40, lisandrodc lisandr...@gmail.com wrote:
 
 
 
   Hi ! I have a problem when persist a chid class.
   The parent class:
 
   @PersistenceCapable
 
   @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
   public  abstract class Fecha   {
 
   @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Key id;
   @Persistent
   private String nombre;
   @Persistent
   private Date fechaIni;
   @Persistent
   private Date fechaFin;
 
   @Persistent(defaultFetchGroup = true)
   ListPartido partidos;
 
   private Long id2;
 
   private Long kind;
 
   The child class:
   @PersistenceCapable(identityType =
   IdentityType.APPLICATION,detachable=true)
   public class RegFechaUsuario extends Fecha  {
 
   @Persistent
   private int puntos;
   @Persistent
   private Long idUsuarioFecha;
   @Persistent
   private Long idFechaOriginal;
 
   The method at persist:
 
   public void crearRegFechaUsuario(RegFechaUsuario regFechaUsuario) {
   //regFechaUsuario is an object initialized
   Transaction tx = pm.currentTransaction();
   try {
   tx.begin();
 
   pm.makePersistentAll(regFechaUsuario);
  //here is the exception
   tx.commit();
   } finally {
   // pm.close();
   if (tx.isActive()) {
   tx.rollback();
   }
   }
 
   }
 
   And the exception is (internal error of the library of google apps or
   datanucleus), the cast:
 
   Problem accessing /Prode/JugarFecha.action. Reason:
 
   java.lang.Long cannot be cast to java.lang.String
 
   Caused by:
 
   java.lang.ClassCastException: java.lang.Long cannot be cast to
   java.lang.String
   at
  
 org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSw
   itch(DatastoreRelationFieldManager.java:
   202)
   at org.datanucleus.store.appengine.DatastoreRelationFieldManager
   $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
   at org.datanucleus.store.appengine.DatastoreRelationFieldManager
   $1.apply(DatastoreRelationFieldManager.java:112)
   at
  
 org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(D
   atastoreRelationFieldManager.java:
   81)
   at
  
 org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(Datastore
   FieldManager.java:
   955)
   at
  
 org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(Dat
   astorePersistenceHandler.java:
   546)
   at
  
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPostProcess(
   DatastorePersistenceHandler.java:
   304)
   at
  
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(Data
   storePersistenceHandler.java:
   256)
   at
  
 org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(Datas
   

Re: [appengine-java] Creating indexes on List of String elements

2010-09-24 Thread Cyrille Vincey
You're facing the exploding indexes problem.
You should never put more than 1 list properties in one composite index.

This problem is described in the GAE doc.
http://code.google.com/intl/fr-FR/appengine/docs/python/datastore/queriesan
dindexes.html#Big_Entities_and_Exploding_Indexes

On 24/09/10 15:54, Ice13ill andrei.fifi...@gmail.com wrote:

I'm trying to implement a search based on a list of keywords (string).
The list is created based on the content of the objects' fields and i
use it when matching against a query text.
The problem is that i can't create indexes on App engine (i get Error
after about 30 mins, and i have to delete it). There are about 90,000
entities of that kind and the index should looke like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

and i have about four of them.

My question: do i want to much ? :) I tried uploading about 4 indexes
and i got Error. I tried uploading 1 and worked (but needed about 2-3
h). Is there a problem if i try to create 4 indexes of this magnitude
(and why)? Can i be sure that uploading one by one will work? Or maybe
this problem is related to AppEngine datastore problems ?
Please advice !

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



-- 
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: Namespace design issues

2010-09-24 Thread Robert Lancer
What about the ability to move an entity to a namespace?

On Sep 23, 10:57 pm, John Patterson jdpatter...@gmail.com wrote:
 On 24 Sep 2010, at 02:55, Mouseclicker wrote:

  API. The need to set and later reset a global setting is dangerous and
  error-prone. Probably that's what Guillaume mentions with The fear I
  had was when seeing a static methods being used. I'm always afraid
  when I see 'static' somewhere. Me too!

 The namespace is not global or static but stored per-thread so it must  
 be set for every request e.g. in a servlet Filter.  There is no  
 problem setting it for a single operation if it is reset in a finally  
 block.

 I personally like the way that the namespace API is completely  
 separated from other APIs.  In fact, I would prefer it if the memcache  
 API namespace did not override the namespace API namespace... that  
 caused a subtle bug the other day.

 It really is very important to be able to see all the stored data in  
 the datastore viewer without requiring the user to enter the  
 namespace.  Especially as the user could be billed for data they  
 cannot delete.

-- 
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: Problem with indexes on List of String elements

2010-09-24 Thread Ice13ill
Sorry about the multiple posting. I tried for about an hour to post
this message :(

On Sep 24, 4:03 pm, Ice13ill andrei.fifi...@gmail.com wrote:
 I'm trying to implement a search based on a list of keywords (string).
 The list is created based on the content of the objects' fields and i
 use it when matching against a query text.
 The problem is that i can't create indexes on App engine (i get Error
 after about 30 mins, and i have to delete it). There are about 90,000
 entities of that kind and the index should looke like this:

 keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

 and i have about four of them. Plus, i want to upload smth like this
 keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲,
 keyWordsList ▲, key ▼
 so i can include about 5 words in my query text

 My question: do i want to much ? :) I tried uploading about 4 indexes
 and i got Error. I tried uploading 1 and worked (but needed about 2-3
 h). Is there a problem if i try to create 4 indexes of this magnitude
 (and why)? Can i be sure that uploading one by one will work? Or maybe
 this problem is related to AppEngine datastore problems ?
 Please advice !

-- 
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: Creating indexes on List of String elements

2010-09-24 Thread Ice13ill
Hmm... i understand the problem. But, if i want to query using a text
with multiple words and NO sorting order, i use the build-in index
supplied default right ?
So, what do i do for 90.000 entities ?? because it seams that the
build-in index is not powerful enough !

The built-in indices are not efficient enough for this query and your
data. Please add a composite index for this query..  An index is
missing but we are unable to tell you which one due to a bug in the
App Engine SDK.  If your query only contains equality filters you most
likely need a composite index on all the properties referenced in
those filters.

So the solution is creating a index like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲

Isn't this really the build-in index ?

On Sep 24, 5:16 pm, Cyrille Vincey crll...@gmail.com wrote:
 You're facing the exploding indexes problem.
 You should never put more than 1 list properties in one composite index.

 This problem is described in the GAE 
 doc.http://code.google.com/intl/fr-FR/appengine/docs/python/datastore/que...
 dindexes.html#Big_Entities_and_Exploding_Indexes

 On 24/09/10 15:54, Ice13ill andrei.fifi...@gmail.com wrote:

 I'm trying to implement a search based on a list of keywords (string).
 The list is created based on the content of the objects' fields and i
 use it when matching against a query text.
 The problem is that i can't create indexes on App engine (i get Error
 after about 30 mins, and i have to delete it). There are about 90,000
 entities of that kind and the index should looke like this:

 keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

 and i have about four of them.

 My question: do i want to much ? :) I tried uploading about 4 indexes
 and i got Error. I tried uploading 1 and worked (but needed about 2-3
 h). Is there a problem if i try to create 4 indexes of this magnitude
 (and why)? Can i be sure that uploading one by one will work? Or maybe
 this problem is related to AppEngine datastore problems ?
 Please advice !

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

-- 
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] org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException

2010-09-24 Thread karunakar mamidi
i am trying to make a persistent class stored in the datastore...i got
this exception..amnew to app engine ppls reply



Uncaught exception from servlet
org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException:
The class The class hare.krishna.LoginBean is not persistable. This
means that it either hasnt been enhanced, or that the enhanced version
of the file is not in the CLASSPATH (or is hidden by an unenhanced
version), or the Meta-Data/annotations for the class are not found.
is not persistable. This means that it either hasnt been enhanced, or
that the enhanced version of the file is not in the CLASSPATH (or is
hidden by an unenhanced version), or the Meta-Data for the class is
not found.

-- 
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: Creating indexes on List of String elements

2010-09-24 Thread Cyrille Vincey
I am afraid you will have to change your data model.
By the way, I remember that someone shared so times ago his code for a
full text search implementation in GAE. Maybe you should check this out.


On 24/09/10 17:01, Ice13ill andrei.fifi...@gmail.com wrote:

Hmm... i understand the problem. But, if i want to query using a text
with multiple words and NO sorting order, i use the build-in index
supplied default right ?
So, what do i do for 90.000 entities ?? because it seams that the
build-in index is not powerful enough !

The built-in indices are not efficient enough for this query and your
data. Please add a composite index for this query..  An index is
missing but we are unable to tell you which one due to a bug in the
App Engine SDK.  If your query only contains equality filters you most
likely need a composite index on all the properties referenced in
those filters.

So the solution is creating a index like this:

keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲

Isn't this really the build-in index ?

On Sep 24, 5:16 pm, Cyrille Vincey crll...@gmail.com wrote:
 You're facing the exploding indexes problem.
 You should never put more than 1 list properties in one composite index.

 This problem is described in the GAE
doc.http://code.google.com/intl/fr-FR/appengine/docs/python/datastore/que
...
 dindexes.html#Big_Entities_and_Exploding_Indexes

 On 24/09/10 15:54, Ice13ill andrei.fifi...@gmail.com wrote:

 I'm trying to implement a search based on a list of keywords (string).
 The list is created based on the content of the objects' fields and i
 use it when matching against a query text.
 The problem is that i can't create indexes on App engine (i get Error
 after about 30 mins, and i have to delete it). There are about 90,000
 entities of that kind and the index should looke like this:

 keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

 and i have about four of them.

 My question: do i want to much ? :) I tried uploading about 4 indexes
 and i got Error. I tried uploading 1 and worked (but needed about 2-3
 h). Is there a problem if i try to create 4 indexes of this magnitude
 (and why)? Can i be sure that uploading one by one will work? Or maybe
 this problem is related to AppEngine datastore problems ?
 Please advice !

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

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



-- 
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: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Daniel
I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
no ajax for me :/

On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:
 Hi
 this does not help... same behavior...

 i got my jsf jars from here 
 :http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
 and followed the setting of web.xml from 
 herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

 maybe you used different sources? if you do please let me know, also
 maybe you can post your web.xml ? might be i missed something...

 any other ideas are welcomed.

 Thanks ahead

 Daniel

 On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

  I have the same error few times ago.
  Try this, make you Bean implements Serializable.

  2010/9/23 Daniel vedm...@gmail.com

   I'm want to use the f:ajax tag of the JSF 2 on app engine... but
   without any luck

   I tried some very simple examples taken from

  http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

   all of them works perfectly on local Tomcat (not GAE)

   But when i try the same on GAE, nothing works, im not getting any
   errors.. its just do nothing...
   Here the simplest example

   On each char type I'm supposed to sea the same char typed beneath and
   beneath it a counter of chars (text length) - again.. this works
   perfectly on tomcat server... (not GAE)

   Any ideas what am i missing?

   h:form
     h:panelGrid
        h:inputText value=#{bean.text} 
           f:ajax event=keyup render=text count
   listener=#{bean.countListener}/
        /h:inputText
        h:outputText id=text value=#{bean.text} /
        h:outputText id=count value=#{bean.count} /
     /h:panelGrid
   /h:form

   java code:
   package general;

   import javax.faces.bean.ManagedBean;
   import javax.faces.event.AjaxBehaviorEvent;

   @ManagedBean(name = bean)
   public class Bean {
     private String text; // getter and setter
     private Integer count;

      public void countListener(AjaxBehaviorEvent event) {
             count = text.length();
          }

          public String getText() {
                  return text;
          }

          public void setText(String text) {
                  this.text = text;
          }

          public Integer getCount() {
                  return count;
          }

          public void setCount(Integer count) {
                  this.count = count;
          }

   }

   Thanks ahead.

   Daniel

   --
   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: Creating indexes on List of String elements

2010-09-24 Thread Ice13ill
Well, that is what i'm using :)
FTS with self merged join (if that is what you're refering to)

The problem here is with the build-in indexes (it should be able to
serve those queries that matches a text on a singe list property, for
a large number of entities right ?). As i understand, the FTS in GAE
is based on the ability of matching a list of keywords against the
list field of the entities you want to search (equality filter) right?

On Sep 24, 6:29 pm, Cyrille Vincey crll...@gmail.com wrote:
 I am afraid you will have to change your data model.
 By the way, I remember that someone shared so times ago his code for a
 full text search implementation in GAE. Maybe you should check this out.

 On 24/09/10 17:01, Ice13ill andrei.fifi...@gmail.com wrote:

 Hmm... i understand the problem. But, if i want to query using a text
 with multiple words and NO sorting order, i use the build-in index
 supplied default right ?
 So, what do i do for 90.000 entities ?? because it seams that the
 build-in index is not powerful enough !

 The built-in indices are not efficient enough for this query and your
 data. Please add a composite index for this query..  An index is
 missing but we are unable to tell you which one due to a bug in the
 App Engine SDK.  If your query only contains equality filters you most
 likely need a composite index on all the properties referenced in
 those filters.

 So the solution is creating a index like this:

 keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲

 Isn't this really the build-in index ?

 On Sep 24, 5:16 pm, Cyrille Vincey crll...@gmail.com wrote:
  You're facing the exploding indexes problem.
  You should never put more than 1 list properties in one composite index.

  This problem is described in the GAE
 doc.http://code.google.com/intl/fr-FR/appengine/docs/python/datastore/que
 ...
  dindexes.html#Big_Entities_and_Exploding_Indexes

  On 24/09/10 15:54, Ice13ill andrei.fifi...@gmail.com wrote:

  I'm trying to implement a search based on a list of keywords (string).
  The list is created based on the content of the objects' fields and i
  use it when matching against a query text.
  The problem is that i can't create indexes on App engine (i get Error
  after about 30 mins, and i have to delete it). There are about 90,000
  entities of that kind and the index should looke like this:

  keyWordsList ▲ , keyWordsList ▲ , keyWordsList ▲ , key ▼

  and i have about four of them.

  My question: do i want to much ? :) I tried uploading about 4 indexes
  and i got Error. I tried uploading 1 and worked (but needed about 2-3
  h). Is there a problem if i try to create 4 indexes of this magnitude
  (and why)? Can i be sure that uploading one by one will work? Or maybe
  this problem is related to AppEngine datastore problems ?
  Please advice !

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

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

-- 
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: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Chris (Google Employee)
Hi Daniel,

For a possible workaround, have you tried manually coding the
JavaScript for the Ajax request call?

For example, instead of:
h:commandButton
  f:ajax render=foo/
/h:commandButton

... manually coding the JavaScript for the Ajax request call would be:

h:commandButton onclick=jsf.ajax.request(this,event,
{render:'foo'});return false;/

This was taken from:
http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#ajax-declarative

Also, is this the only JSF2 tag that you've encountered that does't
appear to be working in App Engine?
-Chris



On Sep 24, 8:31 am, Daniel vedm...@gmail.com wrote:
 I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
 no ajax for me :/

 On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:







  Hi
  this does not help... same behavior...

  i got my jsf jars from here 
  :http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
  and followed the setting of web.xml from 
  herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

  maybe you used different sources? if you do please let me know, also
  maybe you can post your web.xml ? might be i missed something...

  any other ideas are welcomed.

  Thanks ahead

  Daniel

  On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

   I have the same error few times ago.
   Try this, make you Bean implements Serializable.

   2010/9/23 Daniel vedm...@gmail.com

I'm want to use the f:ajax tag of the JSF 2 on app engine... but
without any luck

I tried some very simple examples taken from

   http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

all of them works perfectly on local Tomcat (not GAE)

But when i try the same on GAE, nothing works, im not getting any
errors.. its just do nothing...
Here the simplest example

On each char type I'm supposed to sea the same char typed beneath and
beneath it a counter of chars (text length) - again.. this works
perfectly on tomcat server... (not GAE)

Any ideas what am i missing?

h:form
  h:panelGrid
     h:inputText value=#{bean.text} 
        f:ajax event=keyup render=text count
listener=#{bean.countListener}/
     /h:inputText
     h:outputText id=text value=#{bean.text} /
     h:outputText id=count value=#{bean.count} /
  /h:panelGrid
/h:form

java code:
package general;

import javax.faces.bean.ManagedBean;
import javax.faces.event.AjaxBehaviorEvent;

@ManagedBean(name = bean)
public class Bean {
  private String text; // getter and setter
  private Integer count;

   public void countListener(AjaxBehaviorEvent event) {
          count = text.length();
       }

       public String getText() {
               return text;
       }

       public void setText(String text) {
               this.text = text;
       }

       public Integer getCount() {
               return count;
       }

       public void setCount(Integer count) {
               this.count = count;
       }

}

Thanks ahead.

Daniel

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



[appengine-java] Re: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Daniel
I tried this too... but its the same.. does not work :/

On Sep 24, 6:15 pm, Chris (Google Employee) api.ch...@google.com
wrote:
 Hi Daniel,

 For a possible workaround, have you tried manually coding the
 JavaScript for the Ajax request call?

 For example, instead of:
 h:commandButton
   f:ajax render=foo/
 /h:commandButton

 ... manually coding the JavaScript for the Ajax request call would be:

 h:commandButton onclick=jsf.ajax.request(this,event,
 {render:'foo'});return false;/

 This was taken 
 from:http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#ajax...

 Also, is this the only JSF2 tag that you've encountered that does't
 appear to be working in App Engine?
 -Chris

 On Sep 24, 8:31 am, Daniel vedm...@gmail.com wrote:

  I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
  no ajax for me :/

  On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:

   Hi
   this does not help... same behavior...

   i got my jsf jars from here 
   :http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
   and followed the setting of web.xml from 
   herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

   maybe you used different sources? if you do please let me know, also
   maybe you can post your web.xml ? might be i missed something...

   any other ideas are welcomed.

   Thanks ahead

   Daniel

   On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

I have the same error few times ago.
Try this, make you Bean implements Serializable.

2010/9/23 Daniel vedm...@gmail.com

 I'm want to use the f:ajax tag of the JSF 2 on app engine... but
 without any luck

 I tried some very simple examples taken from

http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

 all of them works perfectly on local Tomcat (not GAE)

 But when i try the same on GAE, nothing works, im not getting any
 errors.. its just do nothing...
 Here the simplest example

 On each char type I'm supposed to sea the same char typed beneath and
 beneath it a counter of chars (text length) - again.. this works
 perfectly on tomcat server... (not GAE)

 Any ideas what am i missing?

 h:form
   h:panelGrid
      h:inputText value=#{bean.text} 
         f:ajax event=keyup render=text count
 listener=#{bean.countListener}/
      /h:inputText
      h:outputText id=text value=#{bean.text} /
      h:outputText id=count value=#{bean.count} /
   /h:panelGrid
 /h:form

 java code:
 package general;

 import javax.faces.bean.ManagedBean;
 import javax.faces.event.AjaxBehaviorEvent;

 @ManagedBean(name = bean)
 public class Bean {
   private String text; // getter and setter
   private Integer count;

    public void countListener(AjaxBehaviorEvent event) {
           count = text.length();
        }

        public String getText() {
                return text;
        }

        public void setText(String text) {
                this.text = text;
        }

        public Integer getCount() {
                return count;
        }

        public void setCount(Integer count) {
                this.count = count;
        }

 }

 Thanks ahead.

 Daniel

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



[appengine-java] Re: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Daniel
I tried this too... but its the same.. does not work :/

On Sep 24, 6:15 pm, Chris (Google Employee) api.ch...@google.com
wrote:
 Hi Daniel,

 For a possible workaround, have you tried manually coding the
 JavaScript for the Ajax request call?

 For example, instead of:
 h:commandButton
   f:ajax render=foo/
 /h:commandButton

 ... manually coding the JavaScript for the Ajax request call would be:

 h:commandButton onclick=jsf.ajax.request(this,event,
 {render:'foo'});return false;/

 This was taken 
 from:http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#ajax...

 Also, is this the only JSF2 tag that you've encountered that does't
 appear to be working in App Engine?
 -Chris

 On Sep 24, 8:31 am, Daniel vedm...@gmail.com wrote:

  I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
  no ajax for me :/

  On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:

   Hi
   this does not help... same behavior...

   i got my jsf jars from here 
   :http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
   and followed the setting of web.xml from 
   herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

   maybe you used different sources? if you do please let me know, also
   maybe you can post your web.xml ? might be i missed something...

   any other ideas are welcomed.

   Thanks ahead

   Daniel

   On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

I have the same error few times ago.
Try this, make you Bean implements Serializable.

2010/9/23 Daniel vedm...@gmail.com

 I'm want to use the f:ajax tag of the JSF 2 on app engine... but
 without any luck

 I tried some very simple examples taken from

http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

 all of them works perfectly on local Tomcat (not GAE)

 But when i try the same on GAE, nothing works, im not getting any
 errors.. its just do nothing...
 Here the simplest example

 On each char type I'm supposed to sea the same char typed beneath and
 beneath it a counter of chars (text length) - again.. this works
 perfectly on tomcat server... (not GAE)

 Any ideas what am i missing?

 h:form
   h:panelGrid
      h:inputText value=#{bean.text} 
         f:ajax event=keyup render=text count
 listener=#{bean.countListener}/
      /h:inputText
      h:outputText id=text value=#{bean.text} /
      h:outputText id=count value=#{bean.count} /
   /h:panelGrid
 /h:form

 java code:
 package general;

 import javax.faces.bean.ManagedBean;
 import javax.faces.event.AjaxBehaviorEvent;

 @ManagedBean(name = bean)
 public class Bean {
   private String text; // getter and setter
   private Integer count;

    public void countListener(AjaxBehaviorEvent event) {
           count = text.length();
        }

        public String getText() {
                return text;
        }

        public void setText(String text) {
                this.text = text;
        }

        public Integer getCount() {
                return count;
        }

        public void setCount(Integer count) {
                this.count = count;
        }

 }

 Thanks ahead.

 Daniel

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



[appengine-java] Re: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Daniel
I tried this too... but its the same.. does not work :/

On Sep 24, 6:15 pm, Chris (Google Employee) api.ch...@google.com
wrote:
 Hi Daniel,

 For a possible workaround, have you tried manually coding the
 JavaScript for the Ajax request call?

 For example, instead of:
 h:commandButton
   f:ajax render=foo/
 /h:commandButton

 ... manually coding the JavaScript for the Ajax request call would be:

 h:commandButton onclick=jsf.ajax.request(this,event,
 {render:'foo'});return false;/

 This was taken 
 from:http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#ajax...

 Also, is this the only JSF2 tag that you've encountered that does't
 appear to be working in App Engine?
 -Chris

 On Sep 24, 8:31 am, Daniel vedm...@gmail.com wrote:

  I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
  no ajax for me :/

  On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:

   Hi
   this does not help... same behavior...

   i got my jsf jars from here 
   :http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
   and followed the setting of web.xml from 
   herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

   maybe you used different sources? if you do please let me know, also
   maybe you can post your web.xml ? might be i missed something...

   any other ideas are welcomed.

   Thanks ahead

   Daniel

   On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

I have the same error few times ago.
Try this, make you Bean implements Serializable.

2010/9/23 Daniel vedm...@gmail.com

 I'm want to use the f:ajax tag of the JSF 2 on app engine... but
 without any luck

 I tried some very simple examples taken from

http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

 all of them works perfectly on local Tomcat (not GAE)

 But when i try the same on GAE, nothing works, im not getting any
 errors.. its just do nothing...
 Here the simplest example

 On each char type I'm supposed to sea the same char typed beneath and
 beneath it a counter of chars (text length) - again.. this works
 perfectly on tomcat server... (not GAE)

 Any ideas what am i missing?

 h:form
   h:panelGrid
      h:inputText value=#{bean.text} 
         f:ajax event=keyup render=text count
 listener=#{bean.countListener}/
      /h:inputText
      h:outputText id=text value=#{bean.text} /
      h:outputText id=count value=#{bean.count} /
   /h:panelGrid
 /h:form

 java code:
 package general;

 import javax.faces.bean.ManagedBean;
 import javax.faces.event.AjaxBehaviorEvent;

 @ManagedBean(name = bean)
 public class Bean {
   private String text; // getter and setter
   private Integer count;

    public void countListener(AjaxBehaviorEvent event) {
           count = text.length();
        }

        public String getText() {
                return text;
        }

        public void setText(String text) {
                this.text = text;
        }

        public Integer getCount() {
                return count;
        }

        public void setCount(Integer count) {
                this.count = count;
        }

 }

 Thanks ahead.

 Daniel

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



[appengine-java] Re: Channel api / Dance dance robot: what is ApplicationError: 2:

2010-09-24 Thread Shlomi
Hello,
I tried following your technique (on AppEngine 1.3.7), but it does not
seem to help...
if i view the source of the page, i do see that it attempts to load
the jsapi file, but i still get

 SEVERE: Failed to push the message
com.google.appengine.demos.dda.shared.dancebeginmess...@145d7f2 to
client dance-dance-android-
ahFkYW5jZS1kYW5jZS1yb2JvdHIWCxIER2FtZRgHDAsSBlBsYXllchgRDA
 [java] com.google.appengine.api.channel.ChannelFailureException:
An unexpected error occurred.
 [java] at
com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:
59)
 [java] at
com.google.appengine.demos.dda.server.PushServer.sendMessageByKey(Unknown
Source)
 
 [java] Caused by: com.google.apphosting.api.ApiProxy
$ApplicationException: ApplicationError: 2:
 [java] at
com.google.appengine.api.channel.dev.LocalChannelService.sendChannelMessage(LocalChannelService.java:
91)
 

I would really like to get this to work, so i can mess around more
with channels from java/gwt.

thanks,
shlomi


On Jul 28, 11:31 am, Daniel Guermeur superco...@gmail.com wrote:
 Thanks Don. Works perfectly.

 Here is a recap to summarize all the steps so others can do it too:

 1. Extract the apphosting/tools/dev-channel-js.js file from
 appengine-api-1.0-sdk-1.3.5.jar
 2. Create a directory _ah/channel in your war directory
 3. Rename dev-channel-js.js to jsapi and place it in _ah/channel dir.
 4. In your main html file include this jsapi file with script src=/
 _ah/channel/jsapi.

 Daniel

-- 
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: Problem with persist a child class

2010-09-24 Thread lisandrodc
Yes Fernando, but if I delete the @PrimaryKey in RegFechaUsuario,
the exception is
Problem accessing /Prode/JugarFecha.action. Reason:

java.lang.Long cannot be cast to java.lang.String

Caused by:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String

The child class in your builder, initialize attributes with
inheritance
of his father:

public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
 Long idUsuarioFecha, Long idFechaOriginal, 
ListPartidopartidos)
{
super(nombre,fechaIni,fechaFin,partidos);
this.puntos = 0;
this.idUsuarioFecha = idUsuarioFecha;
this.idFechaOriginal = idFechaOriginal;
this.partidos=partidos;
}

Regards

On 24 sep, 00:07, Fernando O. fot...@gmail.com wrote:
 you don't need an aditional key

 your problem is that you already have a @PrimaryKey in Fecha so you don't
 need it in RegFechaUsuario.

 Cheers,
 Fernando

 On Thu, Sep 23, 2010 at 8:30 PM, lisandrodc lisandr...@gmail.com wrote:
  Hi!Cyrille I add a primary key in my child class:

  @PersistenceCapable(identityType =
  IdentityType.APPLICATION,detachable=true)
  public class RegFechaUsuario extends Fecha  {
          @PrimaryKey
        �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
         private Key id;
        �...@persistent
          private int puntos;
        �...@persistent
         private Long idUsuarioFecha;
        �...@persistent
         private Long idFechaOriginal;

  And the exception is:

     Error in meta-data for model.RegFechaUsuario: More than one
  primary key field.

  Caused by:

  Error in meta-data for model.RegFechaUsuario: More than one primary
  key field.
  org.datanucleus.store.appengine.MetaDataValidator
  $DatastoreMetaDataException: Error in meta-data for
  model.RegFechaUsuario: More than one primary key field.
         at

  org.datanucleus.store.appengine.MetaDataValidator.validatePrimaryKey(MetaDataValidator.java:
  416)
         at

  org.datanucleus.store.appengine.MetaDataValidator.validate(MetaDataValidator.java:
  120)
         at

  org.datanucleus.store.appengine.DatastoreManager.validateMetaDataForClass(DatastoreManager.java:
  766)
         at

  org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:
  328)
          at

  org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:
  251)
         at

  org.datanucleus.store.appengine.BatchPutManager.processBatchState(BatchPutManager.java:
  35)
         at
  org.datanucleus.store.appengine.BatchManager.finish(BatchManager.java:
  54)
         at
  org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
  $BatchManagerWrapper.call(DatastoreJDOPersistenceManager.java:127)
         at
  org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager
  $BatchManagerWrapper.access$200(DatastoreJDO

  On 23 sep, 05:25, Cyrille Vincey crll...@gmail.com wrote:
   There is no primary key in your child class.
   Add one.

   On 23/09/10 04:40, lisandrodc lisandr...@gmail.com wrote:

Hi ! I have a problem when persist a chid class.
The parent class:

@PersistenceCapable

@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
public  abstract class Fecha   {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
private String nombre;
@Persistent
private Date fechaIni;
@Persistent
private Date fechaFin;

@Persistent(defaultFetchGroup = true)
ListPartido partidos;

private Long id2;

private Long kind;

The child class:
@PersistenceCapable(identityType =
IdentityType.APPLICATION,detachable=true)
public class RegFechaUsuario extends Fecha  {

@Persistent
private int puntos;
@Persistent
private Long idUsuarioFecha;
@Persistent
private Long idFechaOriginal;

The method at persist:

public void crearRegFechaUsuario(RegFechaUsuario regFechaUsuario) {
        //regFechaUsuario is an object initialized
Transaction tx = pm.currentTransaction();
try {
tx.begin();

pm.makePersistentAll(regFechaUsuario);
                       //here is the exception
tx.commit();
} finally {
// pm.close();
if (tx.isActive()) {
tx.rollback();
}
}

}

And the exception is (internal error of the library of google apps or
datanucleus), the cast:

Problem accessing /Prode/JugarFecha.action. Reason:

    java.lang.Long cannot be cast to java.lang.String

Caused by:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String
at

  org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSw
itch(DatastoreRelationFieldManager.java:
202)
at 

Re: [appengine-java] Problem with persist a child class

2010-09-24 Thread andy stevko
I've managed to make class inheritance work for me using JDO.
The only difference I see between my annotations and yours is I'm using
@Inheritance(customStrategy = complete-table)

InheritanceStrategyhttp://www.datanucleus.org/javadocs/core/1.1/org/datanucleus/metadata/InheritanceStrategy.html
*COMPLETE_TABLEhttp://www.datanucleus.org/javadocs/core/1.1/org/datanucleus/metadata/InheritanceStrategy.html#COMPLETE_TABLE
*
Another idea is to trim your class members down to see exactly which one(s)
is producing the type conflict.

Lastly, I'm not sure that class inheritance is the problem at all...
Are you working with a totally empty datastore?
Did you change the type of a member from String to Long?


On Sun, Sep 19, 2010 at 7:22 AM, lisandrodc lisandr...@gmail.com wrote:

 Hi! I have a problem with persist a child class.
 The classes are:

 The parent class:


 @PersistenceCapable

 @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
 public  abstract class Fecha   {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key id;
@Persistent
private String nombre;
@Persistent
private Date fechaIni;
@Persistent
private Date fechaFin;

@Persistent(defaultFetchGroup = true)
ListPartido partidos;

 The child class:

 @PersistenceCapable

 public class RegFechaUsuario extends Fecha  {

@Persistent
private int puntos;
@Persistent
private Long idUsuarioFecha;
@Persistent
private Long idFechaOriginal;


 And the code of run the exception is:
 Transaction tx = pm.currentTransaction();
try {
tx.begin();

pm.makePersistentAll(regFechaUsuario);
  //here is the exception
tx.commit();

 And the regFechaUsuario is created with the build:

 public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
 Long idUsuarioFecha, Long idFechaOriginal,
 ListPartidopartidos)
 {
//super(nombre,fechaIni,fechaFin,partidos);
this.puntos = 0;
this.idUsuarioFecha = idUsuarioFecha;
this.idFechaOriginal = idFechaOriginal;
this.partidos=partidos;
}

 The exception is:
 Problem accessing /Prode/JugarFecha.action. Reason:

java.lang.Long cannot be cast to java.lang.String

 Caused by:

 java.lang.ClassCastException: java.lang.Long cannot be cast to
 java.lang.String
at

 org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
 202)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
 $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
 $1.apply(DatastoreRelationFieldManager.java:112)
at

 org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:
 81)
at

 org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:
 955)
at

 org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:
 546)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.

 Regards
 Lisandro

 --
 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: Sharded Counters in Java not using Transactions?

2010-09-24 Thread Doug Daniels
I posted the question on Stackoverflow and the consensus is that it
should be wrapped in a transaction.
http://stackoverflow.com/questions/3782296/java-google-appengine-sharded-counters-without-transactions

I also opened an Appengine issue (is this the right way to report
issues in documentation?):
http://code.google.com/p/googleappengine/issues/detail?id=3778q=shardedcolspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component


On Sep 21, 12:24 pm, Doug Daniels daniels.doug...@gmail.com wrote:
 I'm going through the Sharded Counters example in 
 Java:http://code.google.com/appengine/articles/sharding_counters.html

 I have a question about the implementation of the increment method. In
 python it explicitly wraps the get() and increment in a transaction.
 In the Java example it just retrieves it and sets it. I'm not sure I
 fully understand the Datastore and transactions but it seems like the
 critical update section should be wrapped in a datastore transaction.
 Am I missing something?

 Original code:
 public void increment() {
     PersistenceManager pm = PMF.get().getPersistenceManager();

     Random generator = new Random();
     int shardNum = generator.nextInt(NUM_SHARDS);

     try {
       Query shardQuery = pm.newQuery(SimpleCounterShard.class);
       shardQuery.setFilter(shardNumber == numParam);
       shardQuery.declareParameters(int numParam);

       ListSimpleCounterShard shards =
           (ListSimpleCounterShard) shardQuery.execute(shardNum);
       SimpleCounterShard shard;

       // If the shard with the passed shard number exists, increment
 its count
       // by 1. Otherwise, create a new shard object, set its count to
 1, and
       // persist it.
       if (

 Transactional code:

 public void increment() {
     PersistenceManager pm = PMF.get().getPersistenceManager();

     Random generator = new Random();
     int shardNum = generator.nextInt(NUM_SHARDS);

     try {
       Query shardQuery = pm.newQuery(SimpleCounterShard.class);
       shardQuery.setFilter(shardNumber == numParam);
       shardQuery.declareParameters(int numParam);

       ListSimpleCounterShard shards =
           (ListSimpleCounterShard) shardQuery.execute(shardNum);
       SimpleCounterShard shard;

       // If the shard with the passed shard number exists, increment
 its count
       // by 1. Otherwise, create a new shard object, set its count to
 1, and
       // persist it.
       if (shards != null  !shards.isEmpty()) {
             Transaction tx = pm.currentTransaction();

         try {
             tx.begin();
                         //I believe in a transaction objects need to be 
 loaded by ID (can't
 use the outside queried entity)
                         Key shardKey =
 KeyFactory.Builder(SimpleCounterShard.class.getSimpleName(),
 shards.get(0).getID())
                         shard =  pm.getObjectById(SimpleCounterShard.class, 
 shardKey);
                         shard.setCount(shard.getCount() + 1);
             tx.commit();
         } finally {
             if (tx.isActive()) {
                 tx.rollback();
             }
         }

       } else {
         shard = new SimpleCounterShard();
         shard.setShardNumber(shardNum);
         shard.setCount(1);
       }

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







 }

-- 
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] simultaneous user request failures

2010-09-24 Thread tomkarren
Hi,  I have an application which normally responds to user requests in
the 100 -200 ms range with nominal API/CPU utilization, but
occasionally will have a request simply time out. (infrequently and
randomly).

Even more interesting, I have noticed in testing simulating 9-10
simultaneous users making simultaneous requests that groups of those
users will get failures at the same time!

It's been difficult to interpret the problems as it seems the requests
are sometimes timing out in my servlet, and other times not being
processed by front side. The requests that fail are writing a simple
object or deleting a simple object from the DS.  The objects are each
in their on Entity Groups, so I can't see how the rate of writing or
deleting (1/req) could be an issue.

As I said, the errors are intermittent and infrequent, but when they
do happen, it really screws up my sync protocol.  Is there a
possibility this is happening when my app is being launched on a new
server or process?  What can I do to debug this problem?

I should say from a data model perspective, each of these users
operates in a unique namespace.

Thanks in advance.

-Tom

-- 
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] Question about logging rates

2010-09-24 Thread tomkarren
I have an application that writes a lot of log entries at the INFO
level.  The application has a lot of requests to very quickly
operating servlets.  Is it possible that the logging can get behind
the requests, or cause my application to suffer performance
degradation?

Should I be worried about cutting back in my log output for a highly
scalable high request level type application?

Thanks,
-Tom

-- 
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: PayPal Payflow Pro Connection Error

2010-09-24 Thread Shaun
I am using Java, are you talking PayPalX? Doesn't that only support
paypal accounts, i.e. not credit cards? If your code does work with
credit cards can you post a basic example of your pay method? Thanks
for the help!

On Sep 23, 10:13 pm, nischalshetty nischalshett...@gmail.com wrote:
 Are you on Python or Java?

 I have my app on Java and PayPal provides an official java API for
 Google Appengine. It works great for me!

 -N

 On Sep 23, 6:42 pm, Shaun shaunc...@gmail.com wrote:



  I think that this is due to Google's limitation for allowing
  connections to port 443. But when I try to connect to PayPal for a
  payment I get the error:

  Transaction Context Errors: Message 1::
  [FATAL]RESULT=-1RESPMSG=Failed to connect to host Input Server 
  Uri=https://pilot-payflowpro.paypal.com:443;

  Is there anyway around this or will this feature be available when
  Business Edition goes live? Any help is much appreciate it!

  Thanks,

  Shaun

-- 
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] Java Adwords API not compatible with AppEngine

2010-09-24 Thread Shaun
I just heard back from the AdWords team:

Currently the Java client library is not supported on AppEngine. The
classes that the library uses are blacklisted by the AppEngine runtime
(so
while it may work locally, it will not work when your run it).

We are hoping to look at official AppEngine support sometime in the
next
few quarters but do not have an ETA as of yet.

Any idea when you might be working on this? It's nice to be able to
access all of Google's services from App Engine. Thanks!

Shaun

-- 
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] How to make GWT + App Engine application crawlable?

2010-09-24 Thread hezjing
I'm still not able to retrieve the query string from my servlet filter.

For example after application is deployed to Google App Engine, and then
browse X.appspot.com/X.html?a=b. The query string is null.


Can you help me on this, please?


On Thu, Sep 23, 2010 at 1:21 PM, hezjing hezj...@gmail.com wrote:

 Probably that was a bad query string, but the servlet filter is not able to
 retrieve the query string from
 http://127.0.0.1:/Hello.html?A=Bgwt.codesvr=127.0.0.1:9997 too!
  http://127.0.0.1:/Hello.html?A=Bgwt.codesvr=127.0.0.1:9997

 On Thu, Sep 23, 2010 at 10:04 AM, John Patterson jdpatter...@gmail.comwrote:


 On 23 Sep 2010, at 07:47, hezjing wrote:


 When run in the GWT development mode, e.g.
 http://127.0.0.1:/X.html?_escaped_fragment_=gwt.codesvr=127.0.0.1:9997, 
 the
 application without App Engine is able to retrieve the query string as
 _escaped_fragment_=gwt.codesvr=127.0.0.1:9997.

 The problem is, the application with App Engine is always getting the null
 query string!


 You need to encode the query string - the  character is not allowed in a
 value.

 http://download.oracle.com/javase/1.4.2/docs/api/java/net/URLEncoder.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-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.




 --

 Hez




-- 

Hez

-- 
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: JSF2 f:ajax does not work for me... Any Ideas Why?

2010-09-24 Thread Daniel
seems to be solved by removing primefaces-2.2.M1.jar

weird???

but works now...


On Sep 24, 7:56 pm, Daniel vedm...@gmail.com wrote:
 I tried this too... but its the same.. does not work :/

 On Sep 24, 6:15 pm, Chris (Google Employee) api.ch...@google.com
 wrote:

  Hi Daniel,

  For a possible workaround, have you tried manually coding the
  JavaScript for the Ajax request call?

  For example, instead of:
  h:commandButton
    f:ajax render=foo/
  /h:commandButton

  ... manually coding the JavaScript for the Ajax request call would be:

  h:commandButton onclick=jsf.ajax.request(this,event,
  {render:'foo'});return false;/

  This was taken 
  from:http://andyschwartz.wordpress.com/2009/07/31/whats-new-in-jsf-2/#ajax...

  Also, is this the only JSF2 tag that you've encountered that does't
  appear to be working in App Engine?
  -Chris

  On Sep 24, 8:31 am, Daniel vedm...@gmail.com wrote:

   I tried also mojarra-2.0.3-FCS-binary.zip but without any luck also..
   no ajax for me :/

   On Sep 23, 9:22 pm, Daniel vedm...@gmail.com wrote:

Hi
this does not help... same behavior...

i got my jsf jars from here 
:http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-goog...
and followed the setting of web.xml from 
herehttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...

maybe you used different sources? if you do please let me know, also
maybe you can post your web.xml ? might be i missed something...

any other ideas are welcomed.

Thanks ahead

Daniel

On Sep 23, 3:24 pm, Jaziel Leandro jaziel...@gmail.com wrote:

 I have the same error few times ago.
 Try this, make you Bean implements Serializable.

 2010/9/23 Daniel vedm...@gmail.com

  I'm want to use the f:ajax tag of the JSF 2 on app engine... but
  without any luck

  I tried some very simple examples taken from

 http://mkblog.exadel.com/2010/04/learning-jsf-2-ajax-in-jsf-using-faj...

  all of them works perfectly on local Tomcat (not GAE)

  But when i try the same on GAE, nothing works, im not getting any
  errors.. its just do nothing...
  Here the simplest example

  On each char type I'm supposed to sea the same char typed beneath 
  and
  beneath it a counter of chars (text length) - again.. this works
  perfectly on tomcat server... (not GAE)

  Any ideas what am i missing?

  h:form
    h:panelGrid
       h:inputText value=#{bean.text} 
          f:ajax event=keyup render=text count
  listener=#{bean.countListener}/
       /h:inputText
       h:outputText id=text value=#{bean.text} /
       h:outputText id=count value=#{bean.count} /
    /h:panelGrid
  /h:form

  java code:
  package general;

  import javax.faces.bean.ManagedBean;
  import javax.faces.event.AjaxBehaviorEvent;

  @ManagedBean(name = bean)
  public class Bean {
    private String text; // getter and setter
    private Integer count;

     public void countListener(AjaxBehaviorEvent event) {
            count = text.length();
         }

         public String getText() {
                 return text;
         }

         public void setText(String text) {
                 this.text = text;
         }

         public Integer getCount() {
                 return count;
         }

         public void setCount(Integer count) {
                 this.count = count;
         }

  }

  Thanks ahead.

  Daniel

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



[appengine-java] Updating multiple entities (in different entity groups) with transaction

2010-09-24 Thread Prashant
Hi,

I want to update 2 different entities of same type but in different entity
groups with transaction
i.e. either both entities should get updated or none.

Can we make 2 transaction instances (tx), one for each entity, update each
entity separately, if one transaction fails, rollback the other one ?


-- 
Prashant
www.claymus.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 at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] what if tx.commit() fails ?

2010-09-24 Thread Prashant
Hi,

I have a small doubt with transactions.

Suppose I am trying to update an entity using transaction and before I
commit my transaction, someone else updates the entity. Now what will happen
? Any exception will be thrown on tx.commit() call ?

-- 
Prashant
www.claymus.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 at 
http://groups.google.com/group/google-appengine-java?hl=en.