[appengine-java] Re: GAE Eclipse plugin - "Uploading 0 files."

2009-09-01 Thread barak

Not sure what each line in the output states, but after changing some
files, the "Cloning N static files.
" was increased by one, the file indeed uploaded, but still I saw
"Uploading 0 files."

On Aug 31, 6:21 pm, Jason Parekh  wrote:
> Hi Barak,
> Could you verify the file has not been uploaded already?  I'm pretty sure
> the uploader only uploads modified files.
>
> I tried this in a new project "SimpleProject" with a file
> /war/test/test.html.  The first deploy uploaded 22 files.  The second deploy
> uploaded 0 files.  I hit the appspot URL, and my file was indeed uploaded
> during the first deploy.
>
> jason
>

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



[appengine-java] Re: Exception on creation of java.io.File in GAE

2009-09-01 Thread barak

10x :-)

On Aug 31, 6:57 pm, Toby Reyelts  wrote:
> It looks like compass is reading the System property, java.io.tmpdir and
> eventually it gets passed into a File constructor call. App Engine doesn't
> have a temp directory (we don't allow the writing of any files to disk), so
> this system property is set to null. If you need to set this system property
> for compass, you can configure it in your appengine-web.xml. For example,
>
> 
>   
> 
>
>
>
> On Mon, Aug 31, 2009 at 4:05 AM, barak  wrote:
>
> > Hello all,
>
> > I'm trying to upload an application that using Lucene and compass. The
> > Lucene files are stored under the war directory and should be open to
> > read access only. When booting the application, the files are opened
> > by the lucene (wrapped with compass). All works ok in the developmemt
> > server, when deployed in GAE, the following exception raised:
>
> > java.lang.NullPointerException
> >        at java.io.File.(File.java:276)
> >        at
> > org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:
> > 139)
> >        at org.compass.core.lucene.engine.store.FSDirectoryStore.configure
> > (FSDirectoryStore.java:55)
> >        at
> > org.compass.core.lucene.engine.store.DefaultLuceneSearchEngineStore.
> > (DefaultLuceneSearchEngineStore.java:144)
> >        at org.compass.core.lucene.engine.LuceneSearchEngineFactory.
> > (LuceneSearchEngineFactory.java:122)
> >        at org.compass.core.impl.DefaultCompass.(DefaultCompass.java:
> > 123)
> >        at org.compass.core.impl.DefaultCompass.(DefaultCompass.java:
> > 116)
> >        at org.compass.core.config.CompassConfiguration.buildCompass
> > (CompassConfiguration.java:288)
> >        at com.me.store.DataAccessObject.(DataAccessObject.java:76)
> >        at com.me.store.DataAccessObject.getInstance(DataAccessObject.java:
> > 53)
> >        at com.me.jsf.LargeDataModelBeanSample$Model.fetchPage
> > (LargeDataModelBeanSample.java:192)
> >        at com.me.jsf.PagedListDataModel.fetchPageInternal
> > (PagedListDataModel.java:178)
> >        at
> > com.me.jsf.PagedListDataModel.getPage(PagedListDataModel.java:107)
> >        at com.me.jsf.PagedListDataModel.isRowAvailable
> > (PagedListDataModel.java:201)
> >        at
> > org.apache.myfaces.component.html.ext.HtmlDataTableHack.isRowAvailable
> > (HtmlDataTableHack.java:88)
> >        at
> > org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex
> > (HtmlDataTableHack.java:297)
> >        at
> > org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex
> > (AbstractHtmlDataTable.java:276)
> >        at javax.faces.component.UIData.processColumnChildren(UIData.java:
> > 725)
> >        at javax.faces.component.UIData.processDecodes(UIData.java:613)
> >        at
> > org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.processDecodes
> > (AbstractHtmlDataTable.java:306)
> >        at javax.faces.component.UIForm.processDecodes(UIForm.java:61)
> >        at javax.faces.component.UIComponentBase.processDecodes
> > (UIComponentBase.java:844)
> >        at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:
> > 158)
> >        at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute
> > (ApplyRequestValuesExecutor.java:32)
> >        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase
> > (LifecycleImpl.java:105)
> >        at org.apache.myfaces.lifecycle.LifecycleImpl.execute
> > (LifecycleImpl.java:80)
> >        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:143)
> >        at
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 487)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1093)
> >        at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
> > (SaveSessionFilter.java:35)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >        at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >        at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >        at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >        at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >        at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> > (AppVersionHandlerMap.java:237)
> >        at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >        at org.mortbay.jetty.Server.handle(Server.java:313)
> >        at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 

[appengine-java] appspot-china.l.google.com ??

2009-09-01 Thread Capsicum annuum

Old CNAME ghs.google.com //does not work
appspot-china.google.com //does not work

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



[appengine-java] bigtable allow external connection?

2009-09-01 Thread asianCoolz

possible to only utitlieze bigtable for storing data ? may i know is
it possible to connect to certain port on google app engine to query
for database in bigtable? let say i deployed my app in amazon and i
want to use google app engine's bigtable
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Unowned relationships

2009-09-01 Thread leszek

You can follow something like that

class Parent {
  
  @Persistent
  private List childList;

  // non Persistent
  private List list;
  ...
}

class Child {

   @PrimaryKey
   private Long/Key key;
   ...
}

// before save Parent
  private void beforeSave(EntityManager em,Parent pa) {
 if (pa.getList() != null) {
   List chList = new ArrayList();
   for (Child ch : pa.getList) {
 pm.makePersistent(ch);
 pm.flush();
 chList.add(ch.getKey());
   }
   pa.setChildList(chList);
}
  }

  private void afterLoad(EntityManager em,Parent pa)  {
List chList = new ArrayList();
for (Long key : pa.getChildList()) {
   Child ch = pm.getObjectById(Child.class,key);
   chList.add(ch);
}
pa.setList(chList);
  }


  PersistenManager pm;
  

  // main service
  Parent pa = pm..getObjectById(...)
  afterLoad(pm,pa);
  ...
  ...
  beforeSave(pm,pa);
  pm.makePersistent(pa);

  List pList = pm.queryExecute();
  for (Parent pa : pList) {
afterLoad(pm,pa);
  }
  ...
  // etc

In order to avoid repeating the same beforeSave and afterLoad for all
Entity classes having "onowned" relationship you can apply Annotation
and, by  the use of reflection, develop generic approach for all
classes having this feature.




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



[appengine-java] Re: how to use Multi-parameter in Query

2009-09-01 Thread leszek

http://www.datanucleus.org/products/accessplatform_1_1/jdo/jdoql.html

Read also about GAE limitations on queries:

http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html

Multi-parameters (more than one): query.declareParameters("Date dFrom,
Date pTo");

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



[appengine-java] i have create a gwt project ,now when deploy the project with gae ,some problem has appear

2009-09-01 Thread tom

I have a javabean like :

package com.icsc.zzjj.client.bean;

import java.io.Serializable;
import java.lang.Float;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class EmailBean implements Serializable {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String recMail;
@Persistent
private String sendMail;
@Persistent
private String sendDate;
@Persistent
private String sendTime;
@Persistent
private String recDate;
@Persistent
private String recTime;
@Persistent
private String sendName;
@Persistent
private String recName;
@Persistent
private String subject;
@Persistent
private String attachment;
@Persistent
private String context;
@Persistent
private String status;

public Long getId() {
return id;
}

public String getRecMail() {
return recMail;
}

public void setRecMail(String recMail) {
this.recMail = recMail;
}

public String getSendMail() {
return sendMail;
}

public void setSendMail(String sendMail) {
this.sendMail = sendMail;
}

public String getSendDate() {
return sendDate;
}

public void setSendDate(String sendDate) {
this.sendDate = sendDate;
}

public String getSendTime() {
return sendTime;
}

public void setSendTime(String sendTime) {
this.sendTime = sendTime;
}

public String getRecDate() {
return recDate;
}

public void setRecDate(String recDate) {
this.recDate = recDate;
}

public String getRecTime() {
return recTime;
}

public void setRecTime(String recTime) {
this.recTime = recTime;
}

public String getSendName() {
return sendName;
}

public void setSendName(String sendName) {
this.sendName = sendName;
}

public String getRecName() {
return recName;
}

public void setRecName(String recName) {
this.recName = recName;
}

public String getSubject() {
return subject;
}

public void setSubject(String subject) {
this.subject = subject;
}



public String getAttachment() {
return attachment;
}

public void setAttachment(String attachment) {
this.attachment = attachment;
}



public String getContext() {
return context;
}

public void setContext(String context) {
this.context = context;
}

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

}

my Service-
GmailServiceImpl:

public List findMail(String key) {
PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(EmailBean.class);
query.setFilter("status == statusParam && recMail == recMailParam
");
query.setOrdering("id asc");
query.declareParameters("String statusParam,String
recMailParam");
Map args = new HashMap();
args.put("statusParam", key);
args.put("recMailParam", "jiejie111...@163.com");
List results = (List) query.executeWithMap
(args);
return results;
}

for gwt rule, the bean must be  implements Serializable
but when GmailServiceImpl. findMail is called ,the exception throw as
follow:


javax.servlet.ServletContext log: Exception while dispatching incoming
RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
included in the set of types which can be serialized by this
SerializationPolicy or its Class object could not be loaded. For
security purposes, this type will not be serialized.
at
com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize
(StandardSerializationPolicy.java:83)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize
(ServerSerializationStreamWriter.java:591)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.wri

[appengine-java] Re: i have create a gwt project ,now when deploy the project with gae ,some problem has appear

2009-09-01 Thread leszek

It is a common problem. Read this thread:

http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/bce6630a3f01f23a/62cb1c4d38cc06c7?lnk=gst&q=com.google.gwt.user.client.rpc.SerializationException%3A+Type+%27org.datanucleus.store.appengine.query.StreamingQueryResult%27+was+not+included+in+the+set+of+types+which+can+be+serialized+by+this+SerializationPolicy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] polling technique

2009-09-01 Thread asianCoolz

may i know what polling technique that you folks use to minimize hit
to servers? i know it's bad ideas. but there is no other way besides
waiting for comet support in app engine
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Using external jars

2009-09-01 Thread Tomer Weller

Hi
I'm using eclipse with gwt and App Engine.
I'm trying to build a servlet that sends out data encoded in JSON
format. For that I'm trying to use the flexjson external library for
JSON serializing (is there anything better already within gwt/
appengine?) - which causes a java.lang.NoClassDefFoundError exception.

I Was under the impression that on the server side I can use any
external jars without further settings. What did I get wrong?

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



[appengine-java] Re: Unowned relationships

2009-09-01 Thread funkforce

Hi,

First of all, thanks for posting, it really helps me.

objectuser  : Good post and the link was really nice.
Albert Attard  : Thanks for the examples, it shows that you have to
wright lots of code to manage your own relationships (which I was
trying to avoid).
leszek: This is what I did and I was trying to avoid to handle
persistence issues as much as I could.

I will re-model and start over and see how I should go on.

Thanks.

FF


On Sep 1, 9:52 am, leszek  wrote:
> You can follow something like that
>
> class Parent {
>   
>   @Persistent
>   private List childList;
>
>   // non Persistent
>   private List list;
>   ...
>
> }
>
> class Child {
>
>   �...@primarykey
>    private Long/Key key;
>    ...
>
> }
>
> // before save Parent
>   private void beforeSave(EntityManager em,Parent pa) {
>      if (pa.getList() != null) {
>        List chList = new ArrayList();
>        for (Child ch : pa.getList) {
>          pm.makePersistent(ch);
>          pm.flush();
>          chList.add(ch.getKey());
>        }
>        pa.setChildList(chList);
>     }
>   }
>
>   private void afterLoad(EntityManager em,Parent pa)  {
>     List chList = new ArrayList();
>     for (Long key : pa.getChildList()) {
>        Child ch = pm.getObjectById(Child.class,key);
>        chList.add(ch);
>     }
>     pa.setList(chList);
>   }
>
>   PersistenManager pm;
>   
>
>   // main service
>   Parent pa = pm..getObjectById(...)
>   afterLoad(pm,pa);
>   ...
>   ...
>   beforeSave(pm,pa);
>   pm.makePersistent(pa);
>
>   List pList = pm.queryExecute();
>   for (Parent pa : pList) {
>     afterLoad(pm,pa);
>   }
>   ...
>   // etc
>
> In order to avoid repeating the same beforeSave and afterLoad for all
> Entity classes having "onowned" relationship you can apply Annotation
> and, by  the use of reflection, develop generic approach for all
> classes having this feature.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Using external jars

2009-09-01 Thread leszek

But what class cannot be found ? Are you sure that you have put
flexjson and all necessary jars in WEB-INF/lib directory of your
project ?


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



[appengine-java] Re: i have create a gwt project ,now when deploy the project with gae ,some problem has appear

2009-09-01 Thread 郑杰
thank you,leszek,you are a good men!

2009/9/1 leszek 

>
> It is a common problem. Read this thread:
>
>
> http://groups.google.co.uk/group/google-appengine-java/browse_frm/thread/bce6630a3f01f23a/62cb1c4d38cc06c7?lnk=gst&q=com.google.gwt.user.client.rpc.SerializationException%3A+Type+%27org.datanucleus.store.appengine.query.StreamingQueryResult%27+was+not+included+in+the+set+of+types+which+can+be+serialized+by+this+SerializationPolicy
> >
>

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



[appengine-java] Re: java.io.IOException: Unknown - using URLFetch

2009-09-01 Thread Spanishgringo

Please see this thread as well
http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/e9ae541d3243f3a5/d9540b7e5ecc2ce5?lnk=gst&q=timeout#d9540b7e5ecc2ce5

On Aug 31, 12:16 pm, Spanishgringo  wrote:
> > Is Analytics the only Google Data API that you have this issue with?
>
> Yes.
>
> > Have you tried making requests from outside of App Engine (e.g. a local 
> > Tomcat
> > server) to see if the responses come faster?
>
> Yes and it works fine with tomcat locally.  I am positive the issue is
> the AppEngine's short timeout limit for responses.  The problem in my
> opinion is that Google Analytics cannot normally respond that quickly
> to a request. It needs more time to crunch and prepare the numbers for
> the response.
>
> -Michael
>
> On Aug 28, 7:28 pm, "Jason (Google)"  wrote:
>
>
>
> > Hi. Sorry for the lapse. At present, your options are limited. The current
> > release of the Java SDK does not support configurable deadlines, and I'll
> > have to follow up to see when this will be available.
> > Is Analytics the only Google Data API that you have this issue with? Have
> > you tried making requests from outside of App Engine (e.g. a local Tomcat
> > server) to see if the responses come faster?
>
> > - Jason
>
> > On Fri, Aug 28, 2009 at 5:00 AM, Spanishgringo  wrote:
>
> > > ping
>
> > > On Aug 18, 3:13 pm, Spanishgringo  wrote:
> > > > I am having a problem using GData Client for Google Analytics because
> > > > most queries take longer than 5 seconds for the servers to process.
> > > > As is, I usually get a networktimeoutbecause App Engine URLFetch is
> > > > capped at 5 seconds.
>
> > > > Please coordinate with the GData team (Especially for Analytics) to
> > > > work out a solution.  The apps should work well together but today it
> > > > is impossible to support any meaningful application in App Engine
> > > > using the Analytics API for Java.
>
> > > > Thanks,
> > > > Michael
>
> > > > On Jul 16, 11:04 pm, "Jason (Google)"  wrote:
>
> > > > > Typically, when you hit the URL Fetchtimeout, you will see a more
> > > helpful
> > > > > and explanatory exception as opposed to "Unknown." The answer to your
> > > > > question is "not yet" -- the URL Fetch deadline is fixed at 5 seconds
> > > but
> > > > > will be configurable in a later release --- but I don't think this is
> > > the
> > > > > issue here. Can you share the URL that you're trying to fetch?
> > > > > - Jason
>
> > > > > On Wed, Jul 15, 2009 at 1:43 AM, BarberNet 
> > > wrote:
>
> > > > > > Looking more into this, I suspect it is thetimeoutof 5 seconds that
> > > > > > is preventing app engine receiving the response.
> > > > > > Can thetimeoutbe made configuarable as in the Python SDK? (up to 10
> > > > > > sec)
>
> > > > > > On Jul 15, 12:13 am, BarberNet  wrote:
> > > > > > > Get following error ONLY when deployed to google apps not on local
> > > > > > > development server.
>
> > > com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler
> > > > > > > $Connection.getHeaderField(URLFetchServiceStreamHandler.java:196)
> > > > > > >         at java.net.URLConnection.getContentType(Unknown Source)
> > > > > > >         at com.saucysounds.payment.MobilePayPalAPI.httpcall
> > > > > > > (MobilePayPalAPI.java:166)
> > > > > > >         ... 43 more
> > > > > > > Caused by: java.io.IOException: Unknown
> > > > > > >         at
>
> > > > > > > line producing error is:
> > > > > > >                         int rc = conn.getResponseCode();
>
> > > > > > > taken from the following code snippet:
>
> > > > > > > postURL = new URL(gv_APIEndpoint);
> > > > > > >                         conn = (HttpURLConnection)
> > > > > > postURL.openConnection();
> > > > > > >                         logger.info(postURL.toString());
> > > > > > >                         conn.setDoInput(true);
> > > > > > >                         conn.setDoOutput(true);
>
> > > > > > >                         conn.setRequestProperty("Content-Type",
> > > > > > "application/x-www-form-
> > > > > > > urlencoded");
> > > > > > >                         conn.setRequestProperty("User-Agent",
> > > agent);
> > > > > > >                         conn.setRequestProperty("Content-Length",
> > > String
>
> > > .valueOf(encodedData.length()));
> > > > > > >                         conn.setRequestMethod("POST");
>
> > > > > > >                         output = new
> > > > > > DataOutputStream(conn.getOutputStream());
> > > > > > >                         logger.info(encodedData);
> > > > > > >                         output.writeBytes(encodedData);
> > > > > > >                         output.flush();
> > > > > > >                         output.close();
>
> > > > > > >                         int rc = conn.getResponseCode();
> > > > > > >                         logger.info("response code: "+rc);
> > > > > > >                         if (rc != -1) {
> > > > > > >                                 BufferedReader reader = new
> > > > > > BufferedReader(

[appengine-java] Re: is not persistable

2009-09-01 Thread Bob L.

1. It is in CLASSPATH as all classes are in the project.
2. I basically copied from the example, so it should not be a problem
about annotations.

I don't know how to check "hidden by an unenhanced version". Someone
said I can find the clues in the debug-level logging, but how can I
view them?

On Sep 1, 4:14 am, datanucleus  wrote:
> > The class "The class "x.Category" 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.
>
> And when you've checked those 3 things ... you can conclude that one
> of them is the cause.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: is not persistable

2009-09-01 Thread Bob L.

What a shame! I forgot this line on the class: @PersistenceCapable
(identityType = IdentityType.APPLICATION)

Thx.

On Sep 1, 10:20 pm, "Bob L."  wrote:
> 1. It is in CLASSPATH as all classes are in the project.
> 2. I basically copied from the example, so it should not be a problem
> about annotations.
>
> I don't know how to check "hidden by an unenhanced version". Someone
> said I can find the clues in the debug-level logging, but how can I
> view them?
>
> On Sep 1, 4:14 am, datanucleus  wrote:
>
>
>
> > > The class "The class "x.Category" 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.
>
> > And when you've checked those 3 things ... you can conclude that one
> > of them is the cause.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Quota Details show calls made to Memcahe and Datastore, even though I'm not using that

2009-09-01 Thread barak

Hello,

I've deployed an application into GAE (that uses compass). After few
invocations, I've checked the Quota Details screen. It show that calls
made to Datastore and Memcache, but I'm pretty sure that MY
application doesn't use these services :-)

Can someone explains please why these calls are made and in which use
cases?

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



[appengine-java] Re: Unowned relationships

2009-09-01 Thread funkforce

Hi,

Regarding generic methods for presistance, has anybody been doing
that?
Like this for example:

public static  T readDataObject(Class type, Long id) {
Object object = null;
PersistenceManager pm = PMF.get().getPersistenceManager();
pm.setDetachAllOnCommit(true);
try {
object = pm.getObjectById(type,id);
} finally {
pm.close();
}
return type.cast(object);
}

You call it like this:

Beverage b =  PersistenceHandler.readDataObject(Beverage.class,
beverageId);

Will this kind of code work?

Thanks.
FF

On Sep 1, 11:54 am, funkforce  wrote:
> Hi,
>
> First of all, thanks for posting, it really helps me.
>
> objectuser  : Good post and the link was really nice.
> Albert Attard  : Thanks for the examples, it shows that you have to
> wright lots of code to manage your own relationships (which I was
> trying to avoid).
> leszek: This is what I did and I was trying to avoid to handle
> persistence issues as much as I could.
>
> I will re-model and start over and see how I should go on.
>
> Thanks.
>
> FF
>
> On Sep 1, 9:52 am, leszek  wrote:
>
>
>
> > You can follow something like that
>
> > class Parent {
> >   
> >   @Persistent
> >   private List childList;
>
> >   // non Persistent
> >   private List list;
> >   ...
>
> > }
>
> > class Child {
>
> >   �...@primarykey
> >    private Long/Key key;
> >    ...
>
> > }
>
> > // before save Parent
> >   private void beforeSave(EntityManager em,Parent pa) {
> >      if (pa.getList() != null) {
> >        List chList = new ArrayList();
> >        for (Child ch : pa.getList) {
> >          pm.makePersistent(ch);
> >          pm.flush();
> >          chList.add(ch.getKey());
> >        }
> >        pa.setChildList(chList);
> >     }
> >   }
>
> >   private void afterLoad(EntityManager em,Parent pa)  {
> >     List chList = new ArrayList();
> >     for (Long key : pa.getChildList()) {
> >        Child ch = pm.getObjectById(Child.class,key);
> >        chList.add(ch);
> >     }
> >     pa.setList(chList);
> >   }
>
> >   PersistenManager pm;
> >   
>
> >   // main service
> >   Parent pa = pm..getObjectById(...)
> >   afterLoad(pm,pa);
> >   ...
> >   ...
> >   beforeSave(pm,pa);
> >   pm.makePersistent(pa);
>
> >   List pList = pm.queryExecute();
> >   for (Parent pa : pList) {
> >     afterLoad(pm,pa);
> >   }
> >   ...
> >   // etc
>
> > In order to avoid repeating the same beforeSave and afterLoad for all
> > Entity classes having "onowned" relationship you can apply Annotation
> > and, by  the use of reflection, develop generic approach for all
> > classes having this feature.- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Log4J vs. java.util.logging in App Engine projects

2009-09-01 Thread Bill Higgins

Thanks much for the response Rajeev. Let me see if I can repeat and
reduce it to make sure I understand the formula.

1) DataNucleus will use EITHER log4j OR java.util.logging. It never
uses both.
2) DataNucleus will use log4j if it detects log4j classes on the
classpath, otherwise it will use java.util.logging
3) If my app doesn't use log4j, then I can safely delete the default
log4j.properties file and DataNucleus will happily use
java.util.logging

Is this correct?

On Aug 31, 5:22 pm, Rajeev Dayal  wrote:
> +[tobyr]
>
> Hi Bill,
>
> We include both logging files due to the implementation of Datanucleus. If
> you have log4j on your classpath (or if you have any jars which bundle the
> log4j classes), then Datanucleus will use the log4j logging system. If you
> don't have a configuration file for log4j, then none of the information will
> be displayed. That is why we include one by default. If you do not have
> log4j on your classpath, then the log4j system is not used, and neither is
> the log4j.properties file which we include.
>
> If you are sure that you do not have any log4j classes on your classpath,
> then you can safely remove the log4j.properties file, and control all of
> your logging via the logging.properties file. If you're using log4j, you can
> get rid of the logging.properties file.
>
> My recommendation would be to keep both files, and only update the one for
> the logging system that you're using. You don't need to keep both of them in
> sync unless you adjust the Datanucleus logging levels.
>
> Let me know if you have any questions - I know that this is somewhat
> confusing.
>
> Rajeev
>
>
>
> On Sun, Aug 30, 2009 at 7:51 AM, Bill Higgins  wrote:
>
> > Hi, I'm new to App Engine development, and am a bit confused by the
> > logging configuration files that the Google Eclipse project produces
> > in a new web application project.
>
> > When you create a new web app project, the new project includes two
> > logging configuration files:
>
> > /src/log4j.properties
> > /war/WEB-INF/logging.properties
>
> > I understand that the first is for log4j and the second for
> > java.util.logging but I'm not sure why one would need both and how
> > each affect logging determinations. If I make changes to one should I
> > make changes to another? Is there a safe way to delete one and simply
> > use the other? If so which one is the keeper?
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Quota Details show calls made to Memcahe and Datastore, even though I'm not using that

2009-09-01 Thread Don Schwarz
Do you have HTTP sessions enabled?  HTTP Sessions are stored in the
datastore behind the scenes, and cached in memcache.

On Tue, Sep 1, 2009 at 8:12 AM, barak  wrote:

>
> Hello,
>
> I've deployed an application into GAE (that uses compass). After few
> invocations, I've checked the Quota Details screen. It show that calls
> made to Datastore and Memcache, but I'm pretty sure that MY
> application doesn't use these services :-)
>
> Can someone explains please why these calls are made and in which use
> cases?
>
> Thanks!
> >
>

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



[appengine-java] Re: Quota Details show calls made to Memcahe and Datastore, even though I'm not using that

2009-09-01 Thread barak

Ok, its my bad - I've forgotten some jdo annototaions in some old
beans I'm not using anymore... Will be removed.

On Sep 1, 4:12 pm, barak  wrote:
> Hello,
>
> I've deployed an application into GAE (that uses compass). After few
> invocations, I've checked the Quota Details screen. It show that calls
> made to Datastore and Memcache, but I'm pretty sure that MY
> application doesn't use these services :-)
>
> Can someone explains please why these calls are made and in which use
> cases?
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Quota Details show calls made to Memcahe and Datastore, even though I'm not using that

2009-09-01 Thread barak

10x for that! :-) Indeed after removed the annotations I could still
see the calls; after disabling the session use - the calls
disappear :-)

Is this documented somewhere?


On Sep 1, 5:02 pm, Don Schwarz  wrote:
> Do you have HTTP sessions enabled?  HTTP Sessions are stored in the
> datastore behind the scenes, and cached in memcache.
>
>
>
> On Tue, Sep 1, 2009 at 8:12 AM, barak  wrote:
>
> > Hello,
>
> > I've deployed an application into GAE (that uses compass). After few
> > invocations, I've checked the Quota Details screen. It show that calls
> > made to Datastore and Memcache, but I'm pretty sure that MY
> > application doesn't use these services :-)
>
> > Can someone explains please why these calls are made and in which use
> > cases?
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Quota Details show calls made to Memcahe and Datastore, even though I'm not using that

2009-09-01 Thread Don Schwarz
http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions

On Tue, Sep 1, 2009 at 9:19 AM, barak  wrote:

>
> 10x for that! :-) Indeed after removed the annotations I could still
> see the calls; after disabling the session use - the calls
> disappear :-)
>
> Is this documented somewhere?
>
>
> On Sep 1, 5:02 pm, Don Schwarz  wrote:
> > Do you have HTTP sessions enabled?  HTTP Sessions are stored in the
> > datastore behind the scenes, and cached in memcache.
> >
> >
> >
> > On Tue, Sep 1, 2009 at 8:12 AM, barak  wrote:
> >
> > > Hello,
> >
> > > I've deployed an application into GAE (that uses compass). After few
> > > invocations, I've checked the Quota Details screen. It show that calls
> > > made to Datastore and Memcache, but I'm pretty sure that MY
> > > application doesn't use these services :-)
> >
> > > Can someone explains please why these calls are made and in which use
> > > cases?
> >
> > > Thanks!- Hide quoted text -
> >
> > - Show quoted text -
> >
>

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



[appengine-java] Re: Errors while uploading the application

2009-09-01 Thread Mita Sakhalkar

Hi barak,
This is my applications appengine-web.xml and web.xml  respectively


http://appengine.google.com/ns/1.0";>
example
1











http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/javaee";
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; version="2.5">

Example
example.ExampleServlet


Example
/examples


index.html







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



[appengine-java] Re: GAE Eclipse plugin - "Uploading 0 files."

2009-09-01 Thread Jason Parekh
Hm, and when you hit your web app on app engine, it was still the old
version?
jason

On Tue, Sep 1, 2009 at 3:02 AM, barak  wrote:

>
> Not sure what each line in the output states, but after changing some
> files, the "Cloning N static files.
> " was increased by one, the file indeed uploaded, but still I saw
> "Uploading 0 files."
>
> On Aug 31, 6:21 pm, Jason Parekh  wrote:
> > Hi Barak,
> > Could you verify the file has not been uploaded already?  I'm pretty sure
> > the uploader only uploads modified files.
> >
> > I tried this in a new project "SimpleProject" with a file
> > /war/test/test.html.  The first deploy uploaded 22 files.  The second
> deploy
> > uploaded 0 files.  I hit the appspot URL, and my file was indeed uploaded
> > during the first deploy.
> >
> > jason
> >
>
> >
>

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



[appengine-java] Bulk Uploading Data

2009-09-01 Thread mscwd01

I have some 30,000 files consisting of 800kb that I want to upload and
save in the data store. As us java users dont have an easy way of
uploading data I am resorting to using http POST requests to upload
the files. This is painfully slow, each file takes about 2 minutes.

Has anyone come up with a better solution to uplaoding data?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Log4J vs. java.util.logging in App Engine projects

2009-09-01 Thread Rajeev Dayal
Yes, I think you've got it exactly right. If you notice any deviations from
this behavior, please post back on this thread and let us know.

On Tue, Sep 1, 2009 at 9:31 AM, Bill Higgins  wrote:

>
> Thanks much for the response Rajeev. Let me see if I can repeat and
> reduce it to make sure I understand the formula.
>
> 1) DataNucleus will use EITHER log4j OR java.util.logging. It never
> uses both.
> 2) DataNucleus will use log4j if it detects log4j classes on the
> classpath, otherwise it will use java.util.logging
> 3) If my app doesn't use log4j, then I can safely delete the default
> log4j.properties file and DataNucleus will happily use
> java.util.logging
>
> Is this correct?
>
> On Aug 31, 5:22 pm, Rajeev Dayal  wrote:
> > +[tobyr]
> >
> > Hi Bill,
> >
> > We include both logging files due to the implementation of Datanucleus.
> If
> > you have log4j on your classpath (or if you have any jars which bundle
> the
> > log4j classes), then Datanucleus will use the log4j logging system. If
> you
> > don't have a configuration file for log4j, then none of the information
> will
> > be displayed. That is why we include one by default. If you do not have
> > log4j on your classpath, then the log4j system is not used, and neither
> is
> > the log4j.properties file which we include.
> >
> > If you are sure that you do not have any log4j classes on your classpath,
> > then you can safely remove the log4j.properties file, and control all of
> > your logging via the logging.properties file. If you're using log4j, you
> can
> > get rid of the logging.properties file.
> >
> > My recommendation would be to keep both files, and only update the one
> for
> > the logging system that you're using. You don't need to keep both of them
> in
> > sync unless you adjust the Datanucleus logging levels.
> >
> > Let me know if you have any questions - I know that this is somewhat
> > confusing.
> >
> > Rajeev
> >
> >
> >
> > On Sun, Aug 30, 2009 at 7:51 AM, Bill Higgins 
> wrote:
> >
> > > Hi, I'm new to App Engine development, and am a bit confused by the
> > > logging configuration files that the Google Eclipse project produces
> > > in a new web application project.
> >
> > > When you create a new web app project, the new project includes two
> > > logging configuration files:
> >
> > > /src/log4j.properties
> > > /war/WEB-INF/logging.properties
> >
> > > I understand that the first is for log4j and the second for
> > > java.util.logging but I'm not sure why one would need both and how
> > > each affect logging determinations. If I make changes to one should I
> > > make changes to another? Is there a safe way to delete one and simply
> > > use the other? If so which one is the keeper?
> >
> > > Thanks in advance.
> >
>

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



[appengine-java] Re: Bulk Uploading Data

2009-09-01 Thread mscwd01

Hmm, thats an idea. May give that a try.

Still, its rather pathetic we aren't provided with an upload utility.

On Sep 1, 4:30 pm, stumpy  wrote:
> You could compress the files before uploading and decompress them on
> the server.
>
> On Sep 1, 3:46 pm, mscwd01  wrote:
>
> > I have some 30,000 files consisting of 800kb that I want to upload and
> > save in the data store. As us java users dont have an easy way of
> > uploading data I am resorting to using http POST requests to upload
> > the files. This is painfully slow, each file takes about 2 minutes.
>
> > Has anyone come up with a better solution to uplaoding data?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Bulk Uploading Data

2009-09-01 Thread stumpy

You could compress the files before uploading and decompress them on
the server.


On Sep 1, 3:46 pm, mscwd01  wrote:
> I have some 30,000 files consisting of 800kb that I want to upload and
> save in the data store. As us java users dont have an easy way of
> uploading data I am resorting to using http POST requests to upload
> the files. This is painfully slow, each file takes about 2 minutes.
>
> Has anyone come up with a better solution to uplaoding data?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] When create a multiple module entry in a project?

2009-09-01 Thread Xavier Pegenaute

Hi,

I am not used to develop web apps and I have no a clear idea about
when use more than one module entry in my project. Any one could me
explain me when could be a better solution?

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



[appengine-java] Inco

2009-09-01 Thread Cornel

Hello!

I ran over this problem. I was retrieving a data set ordered by
encodekey ascending:

[(key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYm0gMCxIJRGJDb250YWN0GJxIDA
name EUROTRIM)
, (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA
name ANCA ELECTRIC SYSTEMS)
, (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA
name TWIN TRADING)
...

So "agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA" <
"agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA"

But
"agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA".compareTo
("agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA") =
37 > 0

The encodedKey is defined as:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DbContact extends DbEntity {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
private String encodedKey;

@Persistent
private DbCustomer customer;
...

Also:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DbCustomer extends DbEntity {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
private String encodedKey;

@Persistent(mappedBy = "customer")
@Order(extensions = @Extension(vendorName="datanucleus",
key="list-
ordering", value="customerProfile desc"))
private List contacts;

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



[appengine-java] Inconsistence between how app-engine sorts string encoded-keys and java method String.compareTo()

2009-09-01 Thread Cornel

Hello!

I ran over this problem. I was retrieving a "DbContact" data set
simply ordered by
encodedKey ascending, and i got this list:

[(key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYm0gMCxIJRGJDb250YWN0GJxIDA
name EUROTRIM)
, (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA
name ANCA ELECTRIC SYSTEMS)
, (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA
name TWIN TRADING)
...

So, apparently
"agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA" <
"agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA" (the
second and the third entries in the above list)

But
"agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA".compareTo
("agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA") =
37 > 0, which is opposite!

The encodedKey field is defined in the DbContact class as:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DbContact extends DbEntity {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
private String encodedKey;

@Persistent
private DbCustomer customer;
...

Also, i have a DbCustomer class which is the parent of a DbContact
class, defined as:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DbCustomer extends DbEntity {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName="datanucleus", key="gae.encoded-
pk",value="true")
private String encodedKey;

@Persistent(mappedBy = "customer")
@Order(extensions = @Extension(vendorName="datanucleus",
key="list-ordering", value="customerProfile desc"))
private List contacts;
..

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



[appengine-java] how to serialize correctly the Vector member in @PersistenceCapable class

2009-09-01 Thread Dmitry Anipko

Hi,

I'm stuck with an issue I hope someone can help with (googling doesn't
produce much useful results)

I have Java class MyClassA declared with @PersistenceCapable and that
has all its members declared with @Persistent.

One of the members is of type Vector myClassBVectorMember,
declared with @Persistent(serialized="true").

I want the POJO XML serialization to happen for the
myClassBVectorMember when I serialize the object of MyClassA using
JDO.

MyClassB implements Serializable.

Now, what happens, is that serialization and deserialization of all
the other fields (of core types) in MyClassA works fine, but the
vector isn't serialized correctl - when the object is serialized and
deserialized, the vector is always re-created empty.

If someone can give any hints or references to what attributes I need
to use in both MyClassA and MyClassB to achieve the correct POJO XML
serialization within a GAE datastore object, I'd appreciate it.

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



[appengine-java] Re: issues with compass for GAE apps

2009-09-01 Thread Vik
anyone any updates on this please?
Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Sun, Aug 30, 2009 at 8:51 PM, Vik  wrote:

> Hie
> Any one using compass on his GAE app?
>
> I am frequently getting error cannot initialize PMF where there is static
> code to initialize compass apis.
> Any idea how to resolve?
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> 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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Exception while deploying JSP Tag Lib Files

2009-09-01 Thread Klaus

No, sorry, that does not work. I have a JDK (not a JRE) configured.
The point is, that JSPs will be compiled while developing them using
the development environment - it's the deployment that fails!

You easily can try it by your own with the two small test files below.

File 1 ("world.tagx") is the JSP Tag file, located in WEB-INF/tags
(according to JSP spec; no choice for dir name). Derived from the file
name, this file offers a tag named "world".

File 2 ("hello.jspx") is a simple, regular JSP file, any location or
name is ok. It uses the new tag "world".

==> Requesting "hello.jspx" with a browser gives the expected result
(the text "Hello world" shows up).

==> But: Deploying these two files will lead to the error stated in my
first comment.


- File 1: war/WEB-INF/tags/world.tagx
--



http://www.w3.org/1999/xhtml";
xmlns:jsp="http://java.sun.com/JSP/Page";>

  
  

  world!



- File 2: hello.jspx
--



http://www.w3.org/1999/xhtml";
xmlns:jsp="http://java.sun.com/JSP/Page"; xmlns:mytag="urn:jsptagdir:/
WEB-INF/tags">

  
  

  






  
Hello 
  



  






On 30 Aug., 23:28, Albert Attard  wrote:
> Hi:
> If you're using Eclipse, please check your installed JDK. Follow this blog
> for 
> details:http://albertattard.blogspot.com/2009/08/jsp-compile-error-in-eclipse...
>
> Hope
> this helps,
> Albert Attard
>
> Ogden Nash   -
> "The trouble with a kitten is that when it grows up, it's always a cat."
>
> 2009/8/30 Klaro 
>
>
>
> > I'm trying to use Tag Libs that are expressed as JSP file (as
> > explained in JSP Spec V2.1, §8 and §8.5). Those JSP Tag Lib files need
> > to be placed in a subdir of WEB-INF/tags - usually with the file name
> > extension ".tag" or "tagx" insetad of ".jsp" or "jspx".
>
> > Creating & using them on the dev system works fine and as expected,
> > but when I deploy them, I get the exception below - no matter how
> > simple the content is.
>
> > There is a message saying "Unable to find a javac compiler" and
> > "Perhaps JAVA_HOME does not point to the JDK". Since compiling of
> > regular JPS files works fine during deployment this cannot be the real
> > reason (BTW, JAVA_HOME *is* set properly).
>
> > Any ideas? Fixes needed?
>
> > Regards,
>
> > Klaus
>
> > -- snip  snap 
> > Creating staging directory
> > Scanning for jsp files.
> > Compiling jsp files.
> > com.google.appengine.tools.admin.JspCompilationException: Failed to
> > compile jsp files.
> > 30.08.2009 22:39:37 org.apache.jasper.JspC processFile
> > INFO: Built File: \test.jsp
> > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > SCHWERWIEGEND: Error compiling file: /E:/Temp/Windows/appcfg35419.tmp/
> > WEB-INF/classes//org/apache/jsp/tag/web/utils\clearcache_tagx.java
> > [javac] Compiling 1 source file
>
> > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > SCHWERWIEGEND: Javac exception
> > Unable to find a javac compiler;
> > com.sun.tools.javac.Main is not on the classpath.
> > Perhaps JAVA_HOME does not point to the JDK
> >        at
> > org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler
> > (CompilerAdapterFactory.java:105)
> >        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)
> >        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
> >        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:
> > 382)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> >        at org.apache.jasper.JspCompilationContext.compile
> > (JspCompilationContext.java:511)
> >        at org.apache.jasper.servlet.JspServletWrapper.loadTagFile
> > (JspServletWrapper.java:201)
> >        at org.apache.jasper.compiler.TagFileProcessor.loadTagFile
> > (TagFileProcessor.java:514)
> >        at org.apache.jasper.compiler.TagFileProcessor.access$000
> > (TagFileProcessor.java:47)
> >        at org.apache.jasper.compiler.TagFileProcessor
> > $TagFileLoaderVisitor.visit(TagFileProcessor.java:565)
> >        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
> >        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> >        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> >        at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2224)
> >        at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:525)
> >        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> >        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> >        at org.apa

[appengine-java] Re: Exception while deploying JSP Tag Lib Files

2009-09-01 Thread Klaus

I forgot to point out that the deployment works fine for *regular* JSP
file. Everything works fine if you *don't* have JSP Tag files, so if
you don't make use of the tag "world" (resp. if you delet the file
"world.tagx") in the above example. It' not a general failure of the
deployment process, and I successfully had deployed JSP files before.



On 30 Aug., 23:28, Albert Attard  wrote:
> Hi:
> If you're using Eclipse, please check your installed JDK. Follow this blog
> for 
> details:http://albertattard.blogspot.com/2009/08/jsp-compile-error-in-eclipse...
>
> Hope
> this helps,
> Albert Attard
>
> Ogden Nash   -
> "The trouble with a kitten is that when it grows up, it's always a cat."
>
> 2009/8/30 Klaro 
>
>
>
> > I'm trying to use Tag Libs that are expressed as JSP file (as
> > explained in JSP Spec V2.1, §8 and §8.5). Those JSP Tag Lib files need
> > to be placed in a subdir of WEB-INF/tags - usually with the file name
> > extension ".tag" or "tagx" insetad of ".jsp" or "jspx".
>
> > Creating & using them on the dev system works fine and as expected,
> > but when I deploy them, I get the exception below - no matter how
> > simple the content is.
>
> > There is a message saying "Unable to find a javac compiler" and
> > "Perhaps JAVA_HOME does not point to the JDK". Since compiling of
> > regular JPS files works fine during deployment this cannot be the real
> > reason (BTW, JAVA_HOME *is* set properly).
>
> > Any ideas? Fixes needed?
>
> > Regards,
>
> > Klaus
>
> > -- snip  snap 
> > Creating staging directory
> > Scanning for jsp files.
> > Compiling jsp files.
> > com.google.appengine.tools.admin.JspCompilationException: Failed to
> > compile jsp files.
> > 30.08.2009 22:39:37 org.apache.jasper.JspC processFile
> > INFO: Built File: \test.jsp
> > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > SCHWERWIEGEND: Error compiling file: /E:/Temp/Windows/appcfg35419.tmp/
> > WEB-INF/classes//org/apache/jsp/tag/web/utils\clearcache_tagx.java
> > [javac] Compiling 1 source file
>
> > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > SCHWERWIEGEND: Javac exception
> > Unable to find a javac compiler;
> > com.sun.tools.javac.Main is not on the classpath.
> > Perhaps JAVA_HOME does not point to the JDK
> >        at
> > org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler
> > (CompilerAdapterFactory.java:105)
> >        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)
> >        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
> >        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:
> > 382)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> >        at org.apache.jasper.JspCompilationContext.compile
> > (JspCompilationContext.java:511)
> >        at org.apache.jasper.servlet.JspServletWrapper.loadTagFile
> > (JspServletWrapper.java:201)
> >        at org.apache.jasper.compiler.TagFileProcessor.loadTagFile
> > (TagFileProcessor.java:514)
> >        at org.apache.jasper.compiler.TagFileProcessor.access$000
> > (TagFileProcessor.java:47)
> >        at org.apache.jasper.compiler.TagFileProcessor
> > $TagFileLoaderVisitor.visit(TagFileProcessor.java:565)
> >        at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
> >        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> >        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> >        at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2224)
> >        at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:525)
> >        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> >        at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> >        at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
> >        at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
> >        at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> >        at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles
> > (TagFileProcessor.java:583)
> >        at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:
> > 226)
> >        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
> >        at org.apache.jasper.JspC.processFile(JspC.java:779)
> >        at org.apache.jasper.JspC.execute(JspC.java:908)
> >        at com.google.appengine.tools.development.LocalJspC.main
> > (LocalJspC.java:17)
>
> >   [...rest of messages omitted...]
>
> > - end of stacktrace ---
>
> > - A few lines further below --
>
> > Generated servlet error:
> >    extension d

[appengine-java] Re: Max Read / Queries per Second in Datastore?

2009-09-01 Thread Jason (Google)
Hi David. There is a higher limit on write throughput because of the
journals and other metadata for concurrency control, etc. There are no
analogous limitations for reads which can be performed in parallel, so you
shouldn't see any "bottlenecks" caused by concurrent reads.
- Jason

On Sun, Aug 30, 2009 at 6:16 AM, David Fuelling  wrote:

>
> Hi,
>
> In other threads on this forum I've read that the Datastore can handle
> between 1 and 10 Writes per Second for an Entity (or Entity Group).
>
> I'm wondering if there's a similar bottleneck for reads-ueries in the
> datastore.  Does anyone know what the max number of Reads I should
> expect is?
>
> Thanks!
>
> David
> >
>

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



[appengine-java] Re: JPA on App Engine ... how hard can it be?

2009-09-01 Thread Jason (Google)
If you use a Long, App Engine will try to create the ID for you, and it will
throw the error above if you try to set it yourself. The most
straightforward solution here is to use a String like you had originally and
add a constant prefix so it's guaranteed to not start with a number.

As an aside, JDO and JPA are both open standards for Java persistence. If
you're interested in code portability, you can use either standard. Given
the issues that you're having, you may want to experiment with the JDO
interface since it's better documented for App Engine.

- Jason

On Sun, Aug 30, 2009 at 5:38 PM, Larry Cable  wrote:

>
> the problem is simple:
>
> @Entity
> public class Company implements Serializable {
>// ...
>public Company(String irsEIN) {
>ein = irsEIN;
>// ...
>}
>
>@Id String ein; // the IRS EIN for the company ... this is a
> unique id and a good one to use for PK?
>
>   // ...
> }
>
>
> ... no it isn't because you get an exception when you commit one of
> these suckers:
>
> WARNING: java.lang.IllegalArgumentException: Name may not start with a
> digit.
>at com.google.appengine.api.datastore.Key.(Key.java:112)
>at com.google.appengine.api.datastore.Key.(Key.java:89)
>at com.google.appengine.api.datastore.KeyFactory.createKey
> (KeyFactory.java:72)
>at com.google.appengine.api.datastore.KeyFactory.createKey
> (KeyFactory.java:57)
>at com.google.appengine.api.datastore.Entity.(Entity.java:114)
>at
> org.datanucleus.store.appengine.DatastoreFieldManager.storeStringPKField
> (DatastoreFieldManager.java:511)
>at
> org.datanucleus.store.appengine.DatastoreFieldManager.storeStringField
> (DatastoreFieldManager.java:421)
>at org.datanucleus.state.AbstractStateManager.providedStringField
> (AbstractStateManager.java:1023)
>at com.charityblossom.dao.entities.Charity.jdoProvideField
> (Charity.java)
>at com.charityblossom.dao.entities.Charity.jdoProvideFields
> (Charity.java)
>at org.datanucleus.state.JDOStateManagerImpl.provideFields
> (JDOStateManagerImpl.java:2715)
>at
> org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
> (DatastorePersistenceHandler.java:180)
>at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
> (JDOStateManagerImpl.java:3185)
>at org.datanucleus.state.JDOStateManagerImpl.flush
> (JDOStateManagerImpl.java:4513)
>at org.datanucleus.ObjectManagerImpl.flushInternal
> (ObjectManagerImpl.java:2814)
>at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:
> 2754)
>at
> org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:
> 2893)
>at org.datanucleus.TransactionImpl.internalPreCommit
> (TransactionImpl.java:369)
>at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256)
>at org.datanucleus.jpa.EntityTransactionImpl.commit
> (EntityTransactionImpl.java:104)
>
> ...
>
> So, you think, "no problem I actually want it as a number anyway..."
> so you change the code like so:
>
> @Entity
> public class Company implements Serializable {
>// ...
>public Company(Long irsEIN) {
>ein = irsEIN;
>// ...
>}
>
>@Id Long ein; // the IRS EIN for the company ... this is a unique
> id and a good one to use for PK?
>
>   // ...
> }
>
> Problem solved? 
>
> WARNING: javax.persistence.PersistenceException: Attempt was made to
> manually set the id component of a Key primary key.  If you want to
> control the value of the primary key, set the name component instead.
>at
> org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException
> (NucleusJPAHelper.java:264)
>at org.datanucleus.jpa.EntityTransactionImpl.commit
> (EntityTransactionImpl.java:122)
>
> Nope! ...
>
> Now I want to use JPA because I want my code to be portable, so I
> really dont want to care about JDO,
> DataNucleus or the App Engine Datastore ...
>
> This exception error message is meaningless to me ... even after
> reading the App Engine and DataNucleus
> documentation ...
>
> Also, on a slightly related issue, should I have to obtain an
> EntityManager transaction for each instance
> of this class I wish to persist?
>
> I'd appreciate any suggestions anyone might have?
>
> >
>

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



[appengine-java] Re: issues with compass for GAE apps

2009-09-01 Thread Toby Reyelts
Vik,

Do you have some sample code to reproduce this? By default, we throw an
exception if you try to create more than one PersistenceManagerFactory. Are
you using a singleton class to prevent more than one from being created? If
so, are you maybe loading that singleton class in different classloaders?
(Try logging the classloader object reference that tries to create the
PersistenceManagerFactory).

Lastly, you can disable the exception if you want (details should be in the
exception message), but it will be a performance problem for you if you're
creating more than a few PersistenceManagerFactory's.

On Tue, Sep 1, 2009 at 1:51 PM, Vik  wrote:

> anyone any updates on this please?
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
>
> On Sun, Aug 30, 2009 at 8:51 PM, Vik  wrote:
>
>> Hie
>> Any one using compass on his GAE app?
>>
>> I am frequently getting error cannot initialize PMF where there is static
>> code to initialize compass apis.
>> Any idea how to resolve?
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> 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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Serving Large Files Question

2009-09-01 Thread Nick

Hi Guys,

The application I'm working on needs to be able to serve and upload
large files (10 - 20MB).  Since the max request size is 10MB, I'm not
seeing a way to accomplish this.

Is there any way that I can do this using App Engine?  Does anyone
have any suggestions?

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



[appengine-java] Re: Serving Large Files Question

2009-09-01 Thread Nick

Hey Guys,

I noticed that support for uploading/serving large files is on the
road map.  Can someone at Google speak to when this might be released
(approximately)?

I really want to use App Engine for my current project, but this may
be a show-stopper issue if support for this is not released in time.

Thanks!
Nick

On Sep 1, 12:30 pm, Nick  wrote:
> Hi Guys,
>
> The application I'm working on needs to be able to serve and upload
> large files (10 - 20MB).  Since the max request size is 10MB, I'm not
> seeing a way to accomplish this.
>
> Is there any way that I can do this using App Engine?  Does anyone
> have any suggestions?
>
> Thanks,
> Nick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: cant create temporary file

2009-09-01 Thread sandeep

Thanks jason. I wanted to run a public webservice which could convert
pdf to text online using PDFBox library. Because of this limitation
(not able to create temp file) this was a failure. :(

On Aug 31, 7:43 pm, "Jason (Google)"  wrote:
> You're correct that App Engine's filesystem is not writable. This is not
> likely to change soon, so any libraries that you depend on which assume a
> writable file system will have to be updated to use a supported mechanism.
> As you can see from the following wiki page, a growing number of libraries
> and frameworks are compatible with App Engine, Hibernate 
> notwithstanding.http://groups.google.com/group/google-appengine-java/web/will-it-play...
>
> Regarding your third point, App Engine does include a URL Fetch service
> which should allow you to issue HTTP requests (including POSTs) to other
> websites running on ports 80 or 443. In addition to the low-level API, a
> java.net-based wrapper is available:
>
> http://code.google.com/appengine/docs/java/urlfetch/
>
> - Jason
>
>
>
> On Sat, Aug 29, 2009 at 4:15 AM, sandeep  wrote:
>
> > Google app engine is good but it has limitations like:
> > 1. You cant create temporary files. Most java libraries rely on a
> > temporary folder for scratchpad. As GAE doesnt support filesystem
> > operations, all these go for a toss?
>
> > You cant upload files on to a file system. How does one expect to
> > manage static content then?
>
> > Any plans for temp files support atleast??
>
> > 2. Also had GAE supported hibernate it would have been a super boost
> > as most apps run today with spring + hibernate.
>
> > 3. Also you cant crawl other websites as http port is blocked that
> > means you can't do anything like HTTP post?.
>
> > Any suggestions on these esp point 1 ?Please help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: JPA on App Engine ... how hard can it be?

2009-09-01 Thread Larry Cable

Yep that is eventually what I ended up doing and it seems to work
relatively
well!

Having some problems with queries on embedded objects such as:

SELECT c FROM Company where c.address.state='CA'

where Address is an @Embedded/@Embeddable with a String 'state' field
therein ...

The query runs but returns no matches

a similar query

select c from Company where c.address.state like 'WY' throws an
exception that suggests JPA thinks 'state' is a class ...

any thoughts?

thanks


On Sep 1, 11:58 am, "Jason (Google)"  wrote:
> If you use a Long, App Engine will try to create the ID for you, and it will
> throw the error above if you try to set it yourself. The most
> straightforward solution here is to use a String like you had originally and
> add a constant prefix so it's guaranteed to not start with a number.
>
> As an aside, JDO and JPA are both open standards for Java persistence. If
> you're interested in code portability, you can use either standard. Given
> the issues that you're having, you may want to experiment with the JDO
> interface since it's better documented for App Engine.
>
> - Jason
>
>
>
> On Sun, Aug 30, 2009 at 5:38 PM, Larry Cable  wrote:
>
> > the problem is simple:
>
> > @Entity
> > public class Company implements Serializable {
> >    // ...
> >    public Company(String irsEIN) {
> >        ein = irsEIN;
> >        // ...
> >    }
>
> >   �...@id String ein; // the IRS EIN for the company ... this is a
> > unique id and a good one to use for PK?
>
> >   // ...
> > }
>
> > ... no it isn't because you get an exception when you commit one of
> > these suckers:
>
> > WARNING: java.lang.IllegalArgumentException: Name may not start with a
> > digit.
> >        at com.google.appengine.api.datastore.Key.(Key.java:112)
> >        at com.google.appengine.api.datastore.Key.(Key.java:89)
> >        at com.google.appengine.api.datastore.KeyFactory.createKey
> > (KeyFactory.java:72)
> >        at com.google.appengine.api.datastore.KeyFactory.createKey
> > (KeyFactory.java:57)
> >        at com.google.appengine.api.datastore.Entity.(Entity.java:114)
> >        at
> > org.datanucleus.store.appengine.DatastoreFieldManager.storeStringPKField
> > (DatastoreFieldManager.java:511)
> >        at
> > org.datanucleus.store.appengine.DatastoreFieldManager.storeStringField
> > (DatastoreFieldManager.java:421)
> >        at org.datanucleus.state.AbstractStateManager.providedStringField
> > (AbstractStateManager.java:1023)
> >        at com.charityblossom.dao.entities.Charity.jdoProvideField
> > (Charity.java)
> >        at com.charityblossom.dao.entities.Charity.jdoProvideFields
> > (Charity.java)
> >        at org.datanucleus.state.JDOStateManagerImpl.provideFields
> > (JDOStateManagerImpl.java:2715)
> >        at
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
> > (DatastorePersistenceHandler.java:180)
> >        at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
> > (JDOStateManagerImpl.java:3185)
> >        at org.datanucleus.state.JDOStateManagerImpl.flush
> > (JDOStateManagerImpl.java:4513)
> >        at org.datanucleus.ObjectManagerImpl.flushInternal
> > (ObjectManagerImpl.java:2814)
> >        at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:
> > 2754)
> >        at
> > org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:
> > 2893)
> >        at org.datanucleus.TransactionImpl.internalPreCommit
> > (TransactionImpl.java:369)
> >        at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256)
> >        at org.datanucleus.jpa.EntityTransactionImpl.commit
> > (EntityTransactionImpl.java:104)
>
> > ...
>
> > So, you think, "no problem I actually want it as a number anyway..."
> > so you change the code like so:
>
> > @Entity
> > public class Company implements Serializable {
> >    // ...
> >    public Company(Long irsEIN) {
> >        ein = irsEIN;
> >        // ...
> >    }
>
> >   �...@id Long ein; // the IRS EIN for the company ... this is a unique
> > id and a good one to use for PK?
>
> >   // ...
> > }
>
> > Problem solved? 
>
> > WARNING: javax.persistence.PersistenceException: Attempt was made to
> > manually set the id component of a Key primary key.  If you want to
> > control the value of the primary key, set the name component instead.
> >        at
> > org.datanucleus.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException
> > (NucleusJPAHelper.java:264)
> >        at org.datanucleus.jpa.EntityTransactionImpl.commit
> > (EntityTransactionImpl.java:122)
>
> > Nope! ...
>
> > Now I want to use JPA because I want my code to be portable, so I
> > really dont want to care about JDO,
> > DataNucleus or the App Engine Datastore ...
>
> > This exception error message is meaningless to me ... even after
> > reading the App Engine and DataNucleus
> > documentation ...
>
> > Also, on a slightly related issue, should I have to obtain an
> > EntityManager transaction for each instance
> > of this class I wish 

[appengine-java] Re: test unit doesn't work more

2009-09-01 Thread OliBye

I also had this issue using the Eclipse plug-in.

This does not appear to be the original issue (http://code.google.com/
p/googleappengine/issues/detail?id=1876)

I think the documentation is correct. I think it's the Eclipse plug-in
that has the this new issue.
It appears that the Eclipse plug-in does not add appengine-api-
stubs.jar and appengine-local-runtime.jar to your class path (which
the JUnit documentation mentions 
http://code.google.com/appengine/docs/java/howto/unittesting.html).

These jars are distributed with the Eclipse 1.2.2-200907291526 plug-in
in the lib/impl directory. So to work around this issue I made an
eclipse user library with these two jars in and added it to my class
path.

This has solved my local issues.
I've not tried uploading this to GAE yet, nor checked for any
overlapping classpath issues with sealed jars etc.


On Jul 24, 5:18 pm, Jason Barnes  wrote:
> Hi,  I am new to App Engine for Java.  I just downloaded Eclipse 3.4.2
> and the latest Google plug-ins.  I cannot get any of the example code
> either here or in the official documentation to compile.  I seem to be
> hung up on that fact that Eclipse cannot import
> "com.google.appengine.tools.development.ApiProxyLocalImpl"?
>
> Any help is appreciated!
>
> Thanks,
> Jason
>
> On Jul 14, 1:22 pm, Max Ross  wrote:
>
> > Hi everyone, let's see if we can get this ironed out.
>
> > First off, the ApiProxy.Environment interface did change in 1.2.2.  There is
> > one new method (getAttributes()), and the existing methods now need to
> > return meaningful values in your tests.  If you're following the how-to
> > article on unit testing 
> > (http://code.google.com/appengine/docs/java/howto/unittesting.html) you'll
> > need to update your TestEnvironment class to look like this 
> > one:http://code.google.com/p/datanucleus-appengine/source/browse/branches...
> > (lines 34 - 66)
>
> > We're working on getting the docs updated right now.
>
> > If your TestEnvironment class looks exactly like this and your unit tests
> > are still failing, please post a complete example including model classes
> > and test code and I'll investigate.
>
> > Thanks, and sorry for the trouble.
>
> > Max
>
> > On Tue, Jul 14, 2009 at 8:08 AM, cmin  wrote:
>
> > > same here.. All requiree methods of TestAPIEnvironment are returning
> > > something relevant.
>
> > > Also verified, that hosted mode everything is ok , just tests fails.
>
> > > On Jul 14, 7:23 am, ivo  wrote:
> > > > +1 with all unit tests queries failing
> > > > every query returns empty / null
>
> > > > I tried to troubleshoot in the same ways described in the previous
> > > > messages and got the same results
>
> > > > On Jul 14, 2:43 pm, "Alejandro D. Garin"  wrote:
>
> > > > > I have the same TestEnvironment but my queries still fail.  what can I
> > > do?
>
> > > > > On Tue, Jul 14, 2009 at 10:18 AM, Ronald Mathies <
> > > ronaldmath...@gmail.com>wrote:
>
> > > > > > Oke, and again here i am (Man i shoult test further before
> > > > > > shouting :) )
>
> > > > > > My sollution:
>
> > > > > > In the class that implement ApiProxy.Environment make sure the
> > > > > > following methods return something meaningfull:
>
> > > > > > public class TestEnvironment  implements ApiProxy.Environment {
>
> > > > > >    public String getAppId() {
> > > > > >        return "Unit Tests";
> > > > > >    }
>
> > > > > >    public String getVersionId() {
> > > > > >        return "1.0";
> > > > > >     }
>
> > > > > >    public Map getAttributes() {
> > > > > >                Map map = new HashMap > > Object>();
> > > > > >                return map;
> > > > > >    }
>
> > > > > >     public String getRequestNamespace() {
> > > > > >        return "gmail.com";
> > > > > >    }
>
> > > > > >    // Rest of the methods contain iether null or false.
> > > > > > }
>
> > > > > > On Jul 14, 3:13 pm, Ronald Mathies  wrote:
> > > > > > > I also encountered this problem, using unit tests it fails.
> > > However,
> > > > > > > when i execute the same code
> > > > > > > in hosted mode it does work. I updated the appengine-api-stubs.jar
> > > and
> > > > > > > appengine-local-runtime.jar so this cannot be the problem. I also
> > > > > > > removed my current datastore from disk so this also can't cause 
> > > > > > > the
> > > > > > > problem.
>
> > > > > > > A few things i notice, in the log at one point i see the 
> > > > > > > following:
>
> > > > > > >  datastore URL="appengine" driver="" userName=""
>
> > > > > > > Is this correct?
>
> > > > > > > And, i the problems i am having are NullPointerExceptions. Every
> > > > > > > single test i have fails.
>
> > > > > > > On Jul 14, 1:47 pm, "Alejandro D. Garin"  wrote:
>
> > > > > > > > I have the same problem updating to 1.2.2
>
> > > > > > > > On Tue, Jul 14, 2009 at 7:57 AM, clanger <
> > > danielmcla...@gmail.com>
> > > > > > wrote:
>
> > > > > > > > > Actually, there seems to be a problem with the Query since
> > > 1.2.2, see
> > > > > > > > > example:
>
> > > > 

[appengine-java] Cache Control for Mobile apps

2009-09-01 Thread fvisticot

I'm developing a mobile application.
For performance purpose, i would like to cache some jsp files

I have made a test inserting the following lines in my JSPs:

response.setHeader("Cache-Control","max-age=66");
response.setHeader("Expires","Tue, 01 Sep 2009 23:15:00 GMT");

Each time, i reload the page with Safari or Chrome, the browser is
trigering the GAE server to generate a new page.

How to configure the JSP/GAE/Browser to have a cached version of the
JSP ?

I have seen a post regarding Cache-Control on this forum but it's not
very clear for me...


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



[appengine-java] Re: Exception while deploying JSP Tag Lib Files

2009-09-01 Thread Rajeev Dayal
Hey Klaus,

I think you may be running into the issue mentioned here:

http://groups.google.com/group/google-appengine-java/browse_thread/thread/175e70cc0c93ded9

This is a pretty bad hack, but can you try copying the tools.jar file from
your JDK's directory (the one which your project in Eclipse is using) over
to your App Engine SDK's lib/shared directory and see if that helps?


Rajeev

On Tue, Sep 1, 2009 at 2:20 PM, Klaus  wrote:

>
> I forgot to point out that the deployment works fine for *regular* JSP
> file. Everything works fine if you *don't* have JSP Tag files, so if
> you don't make use of the tag "world" (resp. if you delet the file
> "world.tagx") in the above example. It' not a general failure of the
> deployment process, and I successfully had deployed JSP files before.
>
>
>
> On 30 Aug., 23:28, Albert Attard  wrote:
> > Hi:
> > If you're using Eclipse, please check your installed JDK. Follow this
> blog
> > for details:
> http://albertattard.blogspot.com/2009/08/jsp-compile-error-in-eclipse...
> >
> >  .>Hope
> > this helps,
> > Albert Attard
> >
> > Ogden Nash 
>  -
> > "The trouble with a kitten is that when it grows up, it's always a cat."
> >
> > 2009/8/30 Klaro 
> >
> >
> >
> > > I'm trying to use Tag Libs that are expressed as JSP file (as
> > > explained in JSP Spec V2.1, §8 and §8.5). Those JSP Tag Lib files need
> > > to be placed in a subdir of WEB-INF/tags - usually with the file name
> > > extension ".tag" or "tagx" insetad of ".jsp" or "jspx".
> >
> > > Creating & using them on the dev system works fine and as expected,
> > > but when I deploy them, I get the exception below - no matter how
> > > simple the content is.
> >
> > > There is a message saying "Unable to find a javac compiler" and
> > > "Perhaps JAVA_HOME does not point to the JDK". Since compiling of
> > > regular JPS files works fine during deployment this cannot be the real
> > > reason (BTW, JAVA_HOME *is* set properly).
> >
> > > Any ideas? Fixes needed?
> >
> > > Regards,
> >
> > > Klaus
> >
> > > -- snip  snap 
> > > Creating staging directory
> > > Scanning for jsp files.
> > > Compiling jsp files.
> > > com.google.appengine.tools.admin.JspCompilationException: Failed to
> > > compile jsp files.
> > > 30.08.2009 22:39:37 org.apache.jasper.JspC processFile
> > > INFO: Built File: \test.jsp
> > > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > > SCHWERWIEGEND: Error compiling file: /E:/Temp/Windows/appcfg35419.tmp/
> > > WEB-INF/classes//org/apache/jsp/tag/web/utils\clearcache_tagx.java
> > > [javac] Compiling 1 source file
> >
> > > 30.08.2009 22:39:37 org.apache.jasper.compiler.Compiler generateClass
> > > SCHWERWIEGEND: Javac exception
> > > Unable to find a javac compiler;
> > > com.sun.tools.javac.Main is not on the classpath.
> > > Perhaps JAVA_HOME does not point to the JDK
> > >at
> > >
> org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler
> > > (CompilerAdapterFactory.java:105)
> > >at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)
> > >at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
> > >at
> org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:
> > > 382)
> > >at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
> > >at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
> > >at
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
> > >at org.apache.jasper.JspCompilationContext.compile
> > > (JspCompilationContext.java:511)
> > >at org.apache.jasper.servlet.JspServletWrapper.loadTagFile
> > > (JspServletWrapper.java:201)
> > >at org.apache.jasper.compiler.TagFileProcessor.loadTagFile
> > > (TagFileProcessor.java:514)
> > >at org.apache.jasper.compiler.TagFileProcessor.access$000
> > > (TagFileProcessor.java:47)
> > >at org.apache.jasper.compiler.TagFileProcessor
> > > $TagFileLoaderVisitor.visit(TagFileProcessor.java:565)
> > >at
> org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
> > >at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> > >at
> org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> > >at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2224)
> > >at org.apache.jasper.compiler.Node$JspRoot.accept(Node.java:525)
> > >at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> > >at
> org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
> > >at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
> > >at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
> > >at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
> > >at org.apac

[appengine-java] Re: Cache Control for Mobile apps

2009-09-01 Thread fvisticot

I have made some other tests with HTML pages ,configuring the
appengine-web.xml to serve HTML pages as static pages.
I can see in the header that expiration is 10 minutes as described in
the documentation.

The pb is that each time i reload the HTML page with Chrome or Safari
(by clicking the enter button in url zone) the GAE server is
trigered...

Is it due to the browsers configuration or to the server (GAE) ?

Any idea ?





On 2 sep, 01:22, fvisticot  wrote:
> I'm developing a mobile application.
> For performance purpose, i would like to cache some jsp files
>
> I have made a test inserting the following lines in my JSPs:
>
> response.setHeader("Cache-Control","max-age=66");
> response.setHeader("Expires","Tue, 01 Sep 2009 23:15:00 GMT");
>
> Each time, i reload the page with Safari or Chrome, the browser is
> trigering the GAE server to generate a new page.
>
> How to configure the JSP/GAE/Browser to have a cached version of the
> JSP ?
>
> I have seen a post regarding Cache-Control on this forum but it's not
> very clear for me...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Subversion client

2009-09-01 Thread tamsler

Has anybody tried to get a subversion client, such as svnkit, to work
on GAE?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: child of the same class

2009-09-01 Thread mar_novice

I filed the bug already, thanks.. hope that this bug will be fix
immediately and have an update with the sdk. I really need to
implement this..

On Aug 29, 2:12 am, "Jason (Google)"  wrote:
> My sample was using JDO. In JDO, this does not work, but I haven't tested
> with JPA yet.
> - Jason
>
> On Thu, Aug 27, 2009 at 1:34 PM, Michael Niu  wrote:
>
> > You can  implements   self one-to-many relationship  the tricky is
> > Dont define ManytoOne, for your  example your  class  will  look
> > like :
> > class  Mall{
> > ...
> > id and  other  properties
>
> > @OneToMany
> > ListsubMallList;
>
> > ...
>
> > }
>
> > remenber. dont add   parent  object to  the class!
>
> > cheers
>
> > Michael
>
> > On Aug 25, 11:03 pm, mar_novice  wrote:
> > > Is it possible to implement a parent-child relationship in the same
> > > class..
> > > for example
>
> > > parent Location has a child Location...
>
> > > for instance Mall class with fields name, longitude, latitude.
> > >  a big mall            name X, lat - 1.1  long- 2.3
> > >      sub mall          name A, lat - 1.01  long -2.1
> > >          sub mall      name B
> > >      sub mall
> > >      sub mall
> > >          submall
> > >               sub mall
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: appspot-china.l.google.com ??

2009-09-01 Thread 风笑雪
You can try google.dns.tancee.comI have used this CNAME for half an year,
and it keeps available behind GFW.

2009/9/1 Capsicum annuum 

>
> Old CNAME ghs.google.com //does not work
> appspot-china.google.com //does not work
>
> China...China..
> >
>

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



[appengine-java] Re: Log4J vs. java.util.logging in App Engine projects

2009-09-01 Thread Bill Higgins

Thanks again for the explanation Rajeev. I would politely suggest
beefing up the header comments in the log4j.properties file and the
logging.properties, explaining to the user that they may either use
Log4J or java.util.logging as they please.

On Sep 1, 11:09 am, Rajeev Dayal  wrote:
> Yes, I think you've got it exactly right. If you notice any deviations from
> this behavior, please post back on this thread and let us know.
>
>
>
> On Tue, Sep 1, 2009 at 9:31 AM, Bill Higgins  wrote:
>
> > Thanks much for the response Rajeev. Let me see if I can repeat and
> > reduce it to make sure I understand the formula.
>
> > 1) DataNucleus will use EITHER log4j OR java.util.logging. It never
> > uses both.
> > 2) DataNucleus will use log4j if it detects log4j classes on the
> > classpath, otherwise it will use java.util.logging
> > 3) If my app doesn't use log4j, then I can safely delete the default
> > log4j.properties file and DataNucleus will happily use
> > java.util.logging
>
> > Is this correct?
>
> > On Aug 31, 5:22 pm, Rajeev Dayal  wrote:
> > > +[tobyr]
>
> > > Hi Bill,
>
> > > We include both logging files due to the implementation of Datanucleus.
> > If
> > > you have log4j on your classpath (or if you have any jars which bundle
> > the
> > > log4j classes), then Datanucleus will use the log4j logging system. If
> > you
> > > don't have a configuration file for log4j, then none of the information
> > will
> > > be displayed. That is why we include one by default. If you do not have
> > > log4j on your classpath, then the log4j system is not used, and neither
> > is
> > > the log4j.properties file which we include.
>
> > > If you are sure that you do not have any log4j classes on your classpath,
> > > then you can safely remove the log4j.properties file, and control all of
> > > your logging via the logging.properties file. If you're using log4j, you
> > can
> > > get rid of the logging.properties file.
>
> > > My recommendation would be to keep both files, and only update the one
> > for
> > > the logging system that you're using. You don't need to keep both of them
> > in
> > > sync unless you adjust the Datanucleus logging levels.
>
> > > Let me know if you have any questions - I know that this is somewhat
> > > confusing.
>
> > > Rajeev
>
> > > On Sun, Aug 30, 2009 at 7:51 AM, Bill Higgins 
> > wrote:
>
> > > > Hi, I'm new to App Engine development, and am a bit confused by the
> > > > logging configuration files that the Google Eclipse project produces
> > > > in a new web application project.
>
> > > > When you create a new web app project, the new project includes two
> > > > logging configuration files:
>
> > > > /src/log4j.properties
> > > > /war/WEB-INF/logging.properties
>
> > > > I understand that the first is for log4j and the second for
> > > > java.util.logging but I'm not sure why one would need both and how
> > > > each affect logging determinations. If I make changes to one should I
> > > > make changes to another? Is there a safe way to delete one and simply
> > > > use the other? If so which one is the keeper?
>
> > > > Thanks in advance.

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



[appengine-java] who can help me

2009-09-01 Thread ada.young

Unable to upload:
com.google.apphosting.utils.config.AppEngineConfigException: Received
SAXException parsing the input stream for C:\DOCUME~1\ada\LOCALS~1\Temp
\appcfg18334.tmp\WEB-INF/web.xml
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode
(AbstractConfigXmlReader.java:214)
at com.google.apphosting.utils.config.AbstractConfigXmlReader.parse
(AbstractConfigXmlReader.java:228)
at com.google.apphosting.utils.config.WebXmlReader.processXml
(WebXmlReader.java:139)
at com.google.apphosting.utils.config.WebXmlReader.processXml
(WebXmlReader.java:22)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml
(AbstractConfigXmlReader.java:111)
at com.google.apphosting.utils.config.WebXmlReader.readWebXml
(WebXmlReader.java:70)
at com.google.appengine.tools.admin.Application.compileJsps
(Application.java:364)
at com.google.appengine.tools.admin.Application.createStagingDirectory
(Application.java:237)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:51)
at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy
(AppEngineBridgeImpl.java:271)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace
(DeployProjectJob.java:148)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run
(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xml.sax.SAXParseException: Invalid byte 3 of 3-byte
UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException
(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.mortbay.xml.XmlParser.parse(XmlParser.java:230)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode
(AbstractConfigXmlReader.java:206)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] memcache service down?

2009-09-01 Thread hansamann

Hi all,

I saw that most of my cron jobs which are using calls to memcache are
down, is this a known issue?

This is the exception I see in the logs:

com.google.appengine.api.memcache.LogAndContinueErrorHandler
handleServiceError: Service error in memcache
com.google.appengine.api.memcache.MemcacheServiceException: Memcache
getStatistics: exception
at com.google.appengine.api.memcache.MemcacheServiceImpl.makeSyncCall
(MemcacheServiceImpl.java:168)
at com.google.appengine.api.memcache.MemcacheServiceImpl.getStatistics
(MemcacheServiceImpl.java:582)
at com.google.appengine.api.memcache.stdimpl.GCache.getCacheStatistics
(GCache.java:110)
at com.google.appengine.api.memcache.stdimpl.GCache.size(GCache.java:
138)
at com.google.appengine.api.memcache.stdimpl.GCache.isEmpty
(GCache.java:142)
at
org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToBoolean
(DefaultTypeTransformation.java:157)
at
org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.booleanUnbox
(DefaultTypeTransformation.java:61)
at MemcacheService.getCache(MemcacheService.groovy:69)
at MemcacheService$getCache.callCurrent(Unknown Source)
at MemcacheService.containsKey(MemcacheService.groovy:32)
at MemcacheService$$FastClassByCGLIB$$9f2adf08.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at MemcacheService$$EnhancerByCGLIB$$2dbfd592.containsKey
()
at MemcacheService$containsKey.call(Unknown Source)
at TwitterService.getTweets(TwitterService.groovy:97)
at TwitterService$$FastClassByCGLIB$$e73568e2.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy
$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:149)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke
(TransactionInterceptor.java:106)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy
$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at TwitterService$$EnhancerByCGLIB$$d755a070.getTweets()
at TwitterService$getTweets.call(Unknown Source)
at org.groovytweets.CronController$_closure2.doCall
(CronController.groovy:47)
at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
$3.run(Method_.java:149)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke
(Method_.java:147)
at
com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke
(Method_.java:120)
at


The app was not changed since a couple of days (appid groovytweets),
so I cannot imagine this is an error on my side. Are there any know
issues right now, maybe because of the datacenter move?

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



[appengine-java] Re: memcache service down?

2009-09-01 Thread hansamann

Adding to that: I just saw the new version live for one 'request' - I
then thought it all works and changed the main version to the new
version. Upon testing groovytweets.org it did not work any more... so
I switched back but now the OLD version is also down... ? Soo
There must be something strange going on here I hope.

Cheers
Sven

On Sep 1, 8:13 pm, hansamann  wrote:
> Hi all,
>
> I saw that most of my cron jobs which are using calls to memcache are
> down, is this a known issue?
>
> This is the exception I see in the logs:
>
> com.google.appengine.api.memcache.LogAndContinueErrorHandler
> handleServiceError: Service error in memcache
> com.google.appengine.api.memcache.MemcacheServiceException: Memcache
> getStatistics: exception
>         at com.google.appengine.api.memcache.MemcacheServiceImpl.makeSyncCall
> (MemcacheServiceImpl.java:168)
>         at com.google.appengine.api.memcache.MemcacheServiceImpl.getStatistics
> (MemcacheServiceImpl.java:582)
>         at com.google.appengine.api.memcache.stdimpl.GCache.getCacheStatistics
> (GCache.java:110)
>         at com.google.appengine.api.memcache.stdimpl.GCache.size(GCache.java:
> 138)
>         at com.google.appengine.api.memcache.stdimpl.GCache.isEmpty
> (GCache.java:142)
>         at
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToBoolean
> (DefaultTypeTransformation.java:157)
>         at
> org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.booleanUnbox
> (DefaultTypeTransformation.java:61)
>         at MemcacheService.getCache(MemcacheService.groovy:69)
>         at MemcacheService$getCache.callCurrent(Unknown Source)
>         at MemcacheService.containsKey(MemcacheService.groovy:32)
>         at MemcacheService$$FastClassByCGLIB$$9f2adf08.invoke()
>         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
>         at org.springframework.aop.framework.Cglib2AopProxy
> $DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
>         at MemcacheService$$EnhancerByCGLIB$$2dbfd592.containsKey
> ()
>         at MemcacheService$containsKey.call(Unknown Source)
>         at TwitterService.getTweets(TwitterService.groovy:97)
>         at TwitterService$$FastClassByCGLIB$$e73568e2.invoke()
>         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
>         at org.springframework.aop.framework.Cglib2AopProxy
> $CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:149)
>         at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke
> (TransactionInterceptor.java:106)
>         at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> (ReflectiveMethodInvocation.java:171)
>         at org.springframework.aop.framework.Cglib2AopProxy
> $DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
>         at TwitterService$$EnhancerByCGLIB$$d755a070.getTweets()
>         at TwitterService$getTweets.call(Unknown Source)
>         at org.groovytweets.CronController$_closure2.doCall
> (CronController.groovy:47)
>         at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at
> com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_
> $3.run(Method_.java:149)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.privilegedInvoke
> (Method_.java:147)
>         at
> com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect.Method_.invoke
> (Method_.java:120)
>         at
>
> The app was not changed since a couple of days (appid groovytweets),
> so I cannot imagine this is an error on my side. Are there any know
> issues right now, maybe because of the datacenter move?
>
> Cheers
> Sven
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] dwr3 working example

2009-09-01 Thread asianCoolz

from http://www.nabble.com/DWR3RC1-threads-ts23074328.html#a23227051
, it showed that no working example just yet for dwr3.  have anyone
tried on this? why in"will it played" it showed its working?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] A matter in local time

2009-09-01 Thread le anh

I have a code in JSP using App Engine :
But have a bug in this :

<%
Date date=new Date();
SimpleDateFormat formatter = new SimpleDateFormat("EEE dd//
hh:mm:ss a");
String formattedDate = formatter.format(date);
String formattedDate = formatter.format(cal.getTime());

%>
<%=formattedDate%>

Run it on App Engine , it's show the Time not correct !!
AppEngine's set GMT=0 when in my local timeZone GMT=+7 .

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



[appengine-java] Re: child of the same class

2009-09-01 Thread mar_novice

Since it is not yet supported, what is the possible approache in the
meantime to solve this? Can i use unowned one-to-many relationship?
And when the one-to-many same class relationship bug is already fixed,
is there a way to convert the unowned one-to-many to owned?

On Sep 2, 8:29 am, mar_novice  wrote:
> I filed the bug already, thanks.. hope that this bug will be fix
> immediately and have an update with the sdk. I really need to
> implement this..
>
> On Aug 29, 2:12 am, "Jason (Google)"  wrote:
>
> > My sample was using JDO. In JDO, this does not work, but I haven't tested
> > with JPA yet.
> > - Jason
>
> > On Thu, Aug 27, 2009 at 1:34 PM, Michael Niu  wrote:
>
> > > You can  implements   self one-to-many relationship  the tricky is
> > > Dont define ManytoOne, for your  example your  class  will  look
> > > like :
> > > class  Mall{
> > > ...
> > > id and  other  properties
>
> > > @OneToMany
> > > ListsubMallList;
>
> > > ...
>
> > > }
>
> > > remenber. dont add   parent  object to  the class!
>
> > > cheers
>
> > > Michael
>
> > > On Aug 25, 11:03 pm, mar_novice  wrote:
> > > > Is it possible to implement a parent-child relationship in the same
> > > > class..
> > > > for example
>
> > > > parent Location has a child Location...
>
> > > > for instance Mall class with fields name, longitude, latitude.
> > > >  a big mall            name X, lat - 1.1  long- 2.3
> > > >      sub mall          name A, lat - 1.01  long -2.1
> > > >          sub mall      name B
> > > >      sub mall
> > > >      sub mall
> > > >          submall
> > > >               sub mall
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Inconsistence between how app-engine sorts string encoded-keys and java method String.compareTo()

2009-09-01 Thread Corneliu Paul Lupulet
I think I may have found the answer. Even though an encoded key is a string,
I should use KeyFactory.stringToKey(encodedKeyString) to compare two key
strings.



On Tue, Sep 1, 2009 at 7:18 PM, Cornel  wrote:

> Hello!
>
> I ran over this problem. I was retrieving a "DbContact" data set
> simply ordered by
> encodedKey ascending, and i got this list:
>
> [(key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYm0gMCxIJRGJDb250YWN0GJxIDA
> name EUROTRIM)
> , (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA
> name ANCA ELECTRIC SYSTEMS)
> , (key agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA
> name TWIN TRADING)
> ...
>
> So, apparently
> "agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA" <
> "agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA" (the
> second and the third entries in the above list)
>
> But
> "agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYnUgMCxIJRGJDb250YWN0GJ5IDA".compareTo
> ("agljb3NpbnV4NjhyIQsSCkRiQ3VzdG9tZXIYn0gMCxIJRGJDb250YWN0GKBIDA") =
> 37 > 0, which is opposite!
>
> The encodedKey field is defined in the DbContact class as:
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class DbContact extends DbEntity {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>@Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
>private String encodedKey;
>
> @Persistent
>private DbCustomer customer;
> ...
>
> Also, i have a DbCustomer class which is the parent of a DbContact
> class, defined as:
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class DbCustomer extends DbEntity {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>@Extension(vendorName="datanucleus", key="gae.encoded-
> pk",value="true")
>private String encodedKey;
>
>@Persistent(mappedBy = "customer")
>@Order(extensions = @Extension(vendorName="datanucleus",
>key="list-ordering", value="customerProfile desc"))
>private List contacts;
> ..
>
> So what's with this inconsistence? Have any ideas?




-- 
Corneliu Paul Lupulet

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



[appengine-java] Re: issues with compass for GAE apps

2009-09-01 Thread Vik
Hie
here is the code I am using:
package vik.sakshum.sakshumweb.jsp.model.jdo;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

import org.compass.core.Compass;
import org.compass.core.config.CompassConfiguration;
import org.compass.core.config.CompassEnvironment;
import org.compass.gps.CompassGps;
import org.compass.gps.device.jdo.Jdo2GpsDevice;
import org.compass.gps.impl.SingleCompassGps;

public final class PMF {
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory("transactions-optional");

private static final Compass compass;
private static final CompassGps compassGps;

static {
 compass = new CompassConfiguration().setConnection("gae://index")
 .setSetting(CompassEnvironment.ExecutorManager.EXECUTOR_MANAGER_TYPE,
"disabled")
 .addScan("vik.sakshum.sakshumweb.jsp.model.jdo")
 .buildCompass();

 compassGps = new SingleCompassGps(compass);
 compassGps.addGpsDevice(new Jdo2GpsDevice("appenine", pmfInstance));
 compassGps.start();

 compassGps.index();

}

private PMF() {}

public static PersistenceManagerFactory get() {
 return pmfInstance;
}

public static Compass getCompass(){
 return compass;
}
}

any clues?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com


On Wed, Sep 2, 2009 at 12:34 AM, Toby Reyelts  wrote:

> Vik,
>
> Do you have some sample code to reproduce this? By default, we throw an
> exception if you try to create more than one PersistenceManagerFactory. Are
> you using a singleton class to prevent more than one from being created? If
> so, are you maybe loading that singleton class in different classloaders?
> (Try logging the classloader object reference that tries to create the
> PersistenceManagerFactory).
>
> Lastly, you can disable the exception if you want (details should be in the
> exception message), but it will be a performance problem for you if you're
> creating more than a few PersistenceManagerFactory's.
>
>
> On Tue, Sep 1, 2009 at 1:51 PM, Vik  wrote:
>
>> anyone any updates on this please?
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> www.sakshum.blogspot.com
>>
>>
>> On Sun, Aug 30, 2009 at 8:51 PM, Vik  wrote:
>>
>>> Hie
>>> Any one using compass on his GAE app?
>>>
>>> I am frequently getting error cannot initialize PMF where there is static
>>> code to initialize compass apis.
>>> Any idea how to resolve?
>>>
>>> Thankx and Regards
>>>
>>> Vik
>>> Founder
>>> www.sakshum.com
>>> 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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: GAE Eclipse plugin - "Uploading 0 files."

2009-09-01 Thread barak

No, the files were uploaded, I just wondering regarding the wording...

On Sep 1, 5:50 pm, Jason Parekh  wrote:
> Hm, and when you hit your web app on app engine, it was still the old
> version?
> jason
>
>
>
> On Tue, Sep 1, 2009 at 3:02 AM, barak  wrote:
>
> > Not sure what each line in the output states, but after changing some
> > files, the "Cloning N static files.
> > " was increased by one, the file indeed uploaded, but still I saw
> > "Uploading 0 files."
>
> > On Aug 31, 6:21 pm, Jason Parekh  wrote:
> > > Hi Barak,
> > > Could you verify the file has not been uploaded already?  I'm pretty sure
> > > the uploader only uploads modified files.
>
> > > I tried this in a new project "SimpleProject" with a file
> > > /war/test/test.html.  The first deploy uploaded 22 files.  The second
> > deploy
> > > uploaded 0 files.  I hit the appspot URL, and my file was indeed uploaded
> > > during the first deploy.
>
> > > jason- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: who can help me

2009-09-01 Thread leszek

Look into this file: WEB-INF/web.xml. It looks like XML-syntax problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---