[appengine-java] Re: SimpleDS 1.0 is out

2010-09-19 Thread George Moschovitis
great work!

-g.

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



[appengine-java] Channel API still not live...

2010-09-19 Thread Daniel Guermeur
Hello there,

Google announced Channel API for 1.3.6 but it is still not live in
1.3.7. It runs in dev mode but when deployed I get a 'feature not
implemented' exception.

Does anyone has any updated on this? Google team?

Thank you.
Daniel

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



[appengine-java] Problem with persist a child class

2010-09-19 Thread lisandrodc
Hi! I have a problem with persist a child class.
The classes are:

The parent class:


@PersistenceCapable

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

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

@Persistent(defaultFetchGroup = "true")
List partidos;

The child class:

@PersistenceCapable

public class RegFechaUsuario extends Fecha  {

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


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

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

And the regFechaUsuario is created with the build:

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

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

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

Caused by:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
202)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.apply(DatastoreRelationFieldManager.java:112)
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:
81)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:
955)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:
546)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.

Regards
Lisandro

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



[appengine-java] logging gwt ,gae

2010-09-19 Thread wingdings
how do I log events in google 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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] CXF JAX-RS client Connection.getSSLSocketFactory Not Found

2010-09-19 Thread Gary Rudolph
I'm trying to get a CXF JAX-RS client proxy working to talk to an
external service. I have a spring config like:

https://api.twilio.com/
2008-08-01.*">




I'm basically creating the jaxrs proxy and applying a conduit to
ensure it's using the default ssl socket factory. I'm running into an
error saying it can't get find the method
Connection.getSSLSocketFactory (see full stack below). Any
recommendations? I'm assuming I'm running into a URLFetch issue.

Thanks, Gary

org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:
48)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:
244)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:
438)
at
org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:
177)
at $Proxy29.sendSmsMessage(Unknown Source)
at
com.lolay.where.service.resources.RegistrationResourceImpl.createInvitation(RegistrationResourceImpl.java:
295)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:
173)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:
89)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:133)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:82)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor
$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:
441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:
37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:
106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:
244)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:
110)
at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:
98)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:
423)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:
139)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:
142)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:
179)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:
103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:
159)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jett

[appengine-java] Re: Deploy Hangs

2010-09-19 Thread gaeuser
Thank you for responding. My application did indeed get updated
successfully after I waited longer.

When I posted my original message it would take over 5-7 minutes. A
few hours later it magically speeded up to about 1 minute or less. (no
material changes on my side). Sending you application id as a direct
message (if that works).

On Sep 17, 8:46 am, "Ikai Lan (Google)" 
wrote:
> What's your application ID?
>
>
>
> On Thu, Sep 16, 2010 at 5:16 PM, gaeuser  wrote:
> > It just doesn't finish and keeps checking at 60-second intervals.
>
> > On the console athttp://appengine.google.comI see my application
> > with Current Version set to: "None Deployed" But when I click through
> > the application to the Versions tab, I see: Version 1 (deployed
> > 0:04:30 ago) except it is NOT selected as default. The live URL does
> > not work - shows up as this link is broken in Chrome.
>
> > The email is same as that for this group user. and the app id is the
> > username + "1". I can post/email my exact user id if needed.
>
> > $ java -cp c:/u/p/appengine-java-sdk-1.3.7/lib/appengine-tools-api.jar
> > com.google.appengine.tools.admin.AppCfg --email=***...@gmail.com
> > update war
> > Reading application configuration data...
> > Sep 16, 2010 10:08:17 AM
> > com.google.apphosting.utils.config.AppEngineWebXmlReader
> > readAppEngineWebXml
> > INFO: Successfully processed war\WEB-INF/appengine-web.xml
> > 2010-09-16 10:08:17.326:INFO::Logging to STDERR via
> > org.mortbay.log.StdErrLog
> > Sep 16, 2010 10:08:17 AM
> > com.google.apphosting.utils.config.AbstractConfigXmlReader
> > readConfigXml
> > INFO: Successfully processed war\WEB-INF/web.xml
> > Beginning server interaction for **1...
> > 0% Creating staging directory
> > 5% Scanning for jsp files.
> > 20% Scanning files on local disk.
> > 25% Initiating update.
> > Password for ***...@gmail.com:
> > 28% Cloning 12 application files.
> > 40% Uploading 1 files.
> > 52% Uploaded 1 files.
> > 61% Initializing precompilation...
> > 90% Deploying new version.
> > 95% Will check again in 1 seconds.
> > 98% Will check again in 2 seconds.
> > 99% Will check again in 4 seconds.
> > 99% Will check again in 8 seconds.
> > 99% Will check again in 16 seconds.
> > 99% Will check again in 32 seconds.
> > 99% Will check again in 60 seconds.
> > 99% Will check again in 60 seconds.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Problem w/ loading Jena model from URL

2010-09-19 Thread Miko
Hi everyone,

I'm working on an app engine application that is integrated with the
Jena Semantic Web framework. I'm aware about the compatibility issues
associated with Jena, so I did all the necessary fixes described in
this group so it would properly work on the app engine.

My setup works fine on the local server. But the deployed version
keeps on getting the 500 Server Error page (The server encountered an
error and could not complete your request) every time I try to create
a model from a URL using the command
FileManager.get().loadModel(source). The command works fine for files
contained in the same directory as the app (e.g.
FileManager.get().loadModel("file:sample.rdf")), but not for valid
URLs.

Any suggestions on how I could fix this problem? I'm willing to do
long workarounds if they're the only option left to fix this.

Thanks in advance for any answers.

Cheers
Miko

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



[appengine-java] Re: Deploy Hangs

2010-09-19 Thread gaeuser
(I thought I replied to this but it doesn't show up)

After I posted the original report the app did update. Over the next
couple of hours it would consistently take about 4-8 minutes to
update. However, later in the day, without anything significant on my
side, the updates became much faster -- about 1 minute -- and they
have been that way since then.

I will ping you with app id if the problem recurs. (btw, I don't see
any way to non-publicly send you my app id.)

On Sep 17, 8:46 am, "Ikai Lan (Google)" 
wrote:
> What's your application ID?
>
>
>
> On Thu, Sep 16, 2010 at 5:16 PM, gaeuser  wrote:
> > It just doesn't finish and keeps checking at 60-second intervals.
>
> > On the console athttp://appengine.google.comI see my application
> > with Current Version set to: "None Deployed" But when I click through
> > the application to the Versions tab, I see: Version 1 (deployed
> > 0:04:30 ago) except it is NOT selected as default. The live URL does
> > not work - shows up as this link is broken in Chrome.
>
> > The email is same as that for this group user. and the app id is the
> > username + "1". I can post/email my exact user id if needed.
>
> > $ java -cp c:/u/p/appengine-java-sdk-1.3.7/lib/appengine-tools-api.jar
> > com.google.appengine.tools.admin.AppCfg --email=***...@gmail.com
> > update war
> > Reading application configuration data...
> > Sep 16, 2010 10:08:17 AM
> > com.google.apphosting.utils.config.AppEngineWebXmlReader
> > readAppEngineWebXml
> > INFO: Successfully processed war\WEB-INF/appengine-web.xml
> > 2010-09-16 10:08:17.326:INFO::Logging to STDERR via
> > org.mortbay.log.StdErrLog
> > Sep 16, 2010 10:08:17 AM
> > com.google.apphosting.utils.config.AbstractConfigXmlReader
> > readConfigXml
> > INFO: Successfully processed war\WEB-INF/web.xml
> > Beginning server interaction for **1...
> > 0% Creating staging directory
> > 5% Scanning for jsp files.
> > 20% Scanning files on local disk.
> > 25% Initiating update.
> > Password for ***...@gmail.com:
> > 28% Cloning 12 application files.
> > 40% Uploading 1 files.
> > 52% Uploaded 1 files.
> > 61% Initializing precompilation...
> > 90% Deploying new version.
> > 95% Will check again in 1 seconds.
> > 98% Will check again in 2 seconds.
> > 99% Will check again in 4 seconds.
> > 99% Will check again in 8 seconds.
> > 99% Will check again in 16 seconds.
> > 99% Will check again in 32 seconds.
> > 99% Will check again in 60 seconds.
> > 99% Will check again in 60 seconds.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] logging gwt ,gae

2010-09-19 Thread wingdings
how do I log events in google 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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] How to query against system-assigned numeric ID?

2010-09-19 Thread Jason
Hi,

The records in tabel (TabelA) in datastore are something like:
-
Key  ID/
Name   TestField
agdmc2F5aW5ncgsLEgVRdW90ZRgBDA1  test1
agdmc2F5aW5ncgsLEgVRdW90ZRgCDA2  test2
agdmc2F5aW5ncgsLEgVRdW90ZRgDDA3  test3
agdmc2F5aW5ncgsLEgVRdW90ZRgEDA4  test4


I have two questions:
1) How to write a query like "select * from TableA order by ID
desc"?
2) How to write a query like "select * from TableA where ID == 3"?

Please be noted that the ID/Name field (which I want to query against)
is generated by GAE automatically.

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



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

2010-09-19 Thread dushyant bing
java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String

use Long.parseLong(String) to parse

Sent from my iPad

On Sep 19, 2010, at 7:52 PM, lisandrodc  wrote:

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

The parent class:


@PersistenceCapable

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

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

@Persistent(defaultFetchGroup = "true")
List partidos;

The child class:

@PersistenceCapable

public class RegFechaUsuario extends Fecha  {

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


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

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

And the regFechaUsuario is created with the build:

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

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

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

Caused by:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
202)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.apply(DatastoreRelationFieldManager.java:112)
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:
81)
at
org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:
955)
at
org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:
546)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.

Regards
Lisandro

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

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



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

2010-09-19 Thread lisandrodc
Thanks dushyant , but the exception is of an error of JDO,datanucleus
(seemingly).
That it has to see with the keys it seems to me, is not the problem
that I from my code
can use "Long.parseLong(String) to parse". This is something internal
that that should do datanucleus.
Regards.
Lisandro

On 19 sep, 12:19, dushyant bing  wrote:
> java.lang.ClassCastException: java.lang.Long cannot be cast to
> java.lang.String
>
> use Long.parseLong(String) to parse
>
> Sent from my iPad
>
> On Sep 19, 2010, at 7:52 PM, lisandrodc  wrote:
>
> Hi! I have a problem with persist a child class.
> The classes are:
>
> The parent class:
>
> @PersistenceCapable
>
> @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
> public  abstract class Fecha   {
>
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> private Key id;
> @Persistent
> private String nombre;
> @Persistent
> private Date
> @Persistent
> private Date fechaFin;
>
> @Persistent(defaultFetchGroup = "true")
> List partidos;
>
> The child class:
>
> @PersistenceCapable
>
> public class RegFechaUsuario extends Fecha  {
>
> @Persistent
> private int puntos;
> @Persistent
> private Long idUsuarioFecha;
> @Persistent
> private Long idFechaOriginal;
>
> And the code of run the exception is:
> Transaction tx = pm.currentTransaction();
>  try {
>  tx.begin();
>
>  pm.makePersistentAll(regFechaUsuario);
>                      //here is the exception
>  tx.commit();
>
> And the regFechaUsuario is created with the build:
>
> public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
>   Long idUsuarioFecha, Long idFechaOriginal, Listpartidos)
> {
>  //super(nombre,fechaIni,fechaFin,partidos);
>  this.puntos = 0;
>  this.idUsuarioFecha = idUsuarioFecha;
>  this.idFechaOriginal = idFechaOriginal;
>  this.partidos=partidos;
>
> }
>
> The exception is:
> Problem accessing /Prode/JugarFecha.action. Reason:
>
>    java.lang.Long cannot be cast to java.lang.String
>
> Caused by:
>
> java.lang.ClassCastException: java.lang.Long cannot be cast to
> java.lang.String
> at
> org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
> 202)
> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> $1.apply(DatastoreRelationFieldManager.java:112)
> at
> org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:
> 81)
> at
> org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:
> 955)
> at
> org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:
> 546)
> at org.datanucleus.store.appengine.DatastorePersistenceHandler.
>
> Regards
> Lisandro
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] preferred method of deleting child objects (quota/fees)

2010-09-19 Thread haole
say i have a persistent parent class, Employee, with a collection of
child objects, PhoneNumber:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
class Employee implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Long id;

@Persistent(mappedBy = "employee")
List phoneNumbers;
}

@PersistenceCapable(identityType = IdentityType.APPLICATION)
class PhoneNumber implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent(mappedBy = "phoneNumbers")
Employee employee;

@Persistent
Integer phoneNumber;
}

when deleting all child objects (PhoneNumber), there are two possible
ways to do this:

(1) set the collection of child objects on the parent object to an
empty collection (or null):
static void deletePhoneNumbers( Long p_employeeId, PersistentManager
p_manager )
{
Employee l_employee = p_manager.getObjectById( Employee.class,
p_employeeId );
l_employee.phoneNumbers = new ArrayList();
p_manager.makePersistent( l_employee );
}

or

(2) delete all child objects belonging to the parent object:
static void deletePhoneNumbers( Employee p_employee,
PersistenceManager p_manager )
{
Query l_query = p_manager.newQuery( PhoneNumber.class );
l_query.setFilter( "employee == p_employee" );
l_query.declareParameters( "Employee p_employee" );
l_query.deletePersistentAll( p_employee );
}

both ways seem to have the same effect. as one might expect, the
collection of child objects in the parent array are removed and the
child objects themselves are removed from the data store.

my question is:

as far as hits on the data store (and the quota/fees associated with
those hits) are concerned, which incurs a greater number of calls
against the datastore (and, subsequently, incurs more fees)?

when you look at what's happening in the low-level API, do both ways
of deleting child objects result in the same number of calls against
the data store or is one way less costly than the other?

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



[appengine-java] How to do Mocking on GAE development server ?

2010-09-19 Thread Maxim Veksler
Hello,

I've tried to do this:

package com.FOO.madservice.servlet.mock;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import static org.mockito.Mockito.*;

@SuppressWarnings("serial")
public class BAR2ServletMock extends HttpServlet {
 ...
protected HttpServletRequest requestFilter(HttpServletRequest req) {
 HttpServletRequest servletRequest = spy(req);

doReturn("gzip,
deflate").when(servletRequest).getHeader("header-name-goes-here");
 doReturn("174.30.216.4").when(servletRequest).getRemoteAddr();
 return servletRequest;
 }
 ...
}

I'm trying to mock the data in the HTTPRequest object.

On Eclipse using GAE Eclipse pluging 1.3.7, this fails with the following
error:

java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a
restricted class. Please see the Google  App Engine developer's guide for
more details.


Can I disable checking for classes white list on development server?
What other mocking alternatives should I examine?


Thank you,
Maxim.

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



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

2010-09-19 Thread Cyrille Vincey
Be aware that inheritance is not supported by GAE yet.
The problem might come from this issue.
See : 
http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/dataclasses.
html

cyrille

On 19/09/10 18:55, "lisandrodc"  wrote:

> Thanks dushyant , but the exception is of an error of JDO,datanucleus
> (seemingly).
> That it has to see with the keys it seems to me, is not the problem
> that I from my code
> can use "Long.parseLong(String) to parse". This is something internal
> that that should do datanucleus.
> Regards.
> Lisandro
> 
> On 19 sep, 12:19, dushyant bing  wrote:
>> java.lang.ClassCastException: java.lang.Long cannot be cast to
>> java.lang.String
>> 
>> use Long.parseLong(String) to parse
>> 
>> Sent from my iPad
>> 
>> On Sep 19, 2010, at 7:52 PM, lisandrodc  wrote:
>> 
>> Hi! I have a problem with persist a child class.
>> The classes are:
>> 
>> The parent class:
>> 
>> @PersistenceCapable
>> 
>> @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
>> public  abstract class Fecha   {
>> 
>> @PrimaryKey
>> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>> private Key id;
>> @Persistent
>> private String nombre;
>> @Persistent
>> private Date
>> @Persistent
>> private Date fechaFin;
>> 
>> @Persistent(defaultFetchGroup = "true")
>> List partidos;
>> 
>> The child class:
>> 
>> @PersistenceCapable
>> 
>> public class RegFechaUsuario extends Fecha  {
>> 
>> @Persistent
>> private int puntos;
>> @Persistent
>> private Long idUsuarioFecha;
>> @Persistent
>> private Long idFechaOriginal;
>> 
>> And the code of run the exception is:
>> Transaction tx = pm.currentTransaction();
>>  try {
>>  tx.begin();
>> 
>>  pm.makePersistentAll(regFechaUsuario);
>>                      //here is the exception
>>  tx.commit();
>> 
>> And the regFechaUsuario is created with the build:
>> 
>> public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
>>   Long idUsuarioFecha, Long idFechaOriginal, Listpartidos)
>> {
>>  //super(nombre,fechaIni,fechaFin,partidos);
>>  this.puntos = 0;
>>  this.idUsuarioFecha = idUsuarioFecha;
>>  this.idFechaOriginal = idFechaOriginal;
>>  this.partidos=partidos;
>> 
>> }
>> 
>> The exception is:
>> Problem accessing /Prode/JugarFecha.action. Reason:
>> 
>>    java.lang.Long cannot be cast to java.lang.String
>> 
>> Caused by:
>> 
>> java.lang.ClassCastException: java.lang.Long cannot be cast to
>> java.lang.String
>> at
>> org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentS
>> witch(DatastoreRelationFieldManager.java:
>> 202)
>> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
>> $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
>> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
>> $1.apply(DatastoreRelationFieldManager.java:112)
>> at
>> org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(
>> DatastoreRelationFieldManager.java:
>> 81)
>> at
>> org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(Datastor
>> eFieldManager.java:
>> 955)
>> at
>> org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(Da
>> tastorePersistenceHandler.java:
>> 546)
>> at org.datanucleus.store.appengine.DatastorePersistenceHandler.
>> 
>> Regards
>> Lisandro
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com.
>> For more options, visit this group
>> athttp://groups.google.com/group/google-appengine-java?hl=en.


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



[appengine-java] Use BlobstoreService and ImageService to upload/serve images drawn from an HTML5 canvas Paintweb JS Library

2010-09-19 Thread Doug Daniels
I'm working on an Appengine application in Java that allows users to
upload images drawn through an HTML5 canvas library called PaintWeb
(http://code.google.com/p/paintweb/).

Currently I have a servlet that receives the XMLHttpRequest POST from
the paintweb javascript library as a formencoded image.

1. Paintweb.js library sends XMLHttpRequest POST
  send   = 'dataURL=' + encodeURIComponent(ev.dataURL),
  headers= {'Content-Type': 'application/x-www-form-
urlencoded'};

2. A custom servlet decodes the form encoded image data as a blob and
stores that in the Datastore with an associated Drawing entity

3 Custom servlet serves the Blob's in the datastore as
ContentType("image/png")

I'm curious if I can use the new BlobstoreService and ImageService
features to upload my HTML5 canvas images and serve them as pure Blobs
(as shown in this tutorial
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/)

According to the documentation (http://code.google.com/appengine/docs/
java/blobstore/overview.html#Uploading_a_Blob) it seems like the major
stopping point is that I need to POST a form with:
 

Which I don't think is possible from Paintweb.

Possibly a work around would be if there was some way on the server
side to store a blob in the Blobstorage (instead of the datastore) so
that you could reap the benefits of not using your CPU quota to serve
images.

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



[appengine-java] Re: Use BlobstoreService and ImageService to upload/serve images drawn from an HTML5 canvas Paintweb JS Library

2010-09-19 Thread Doug Daniels
Is it possible or even a good idea to use the Appengine URL Fetch
service and forward the image blob upload to the Blobstorage
"createUploadURL()" from the server side.

http://code.google.com/appengine/docs/java/urlfetch/usingjavanet.html

It seems like it could be possible, but not sure it would save me
resources in the long run (the images are simple small drawings that
could be viewed many many more times than the upload time so I feel
like I'd get benefit storing/serving from the BlobstoreService.

On Sep 19, 3:02 pm, Doug Daniels  wrote:
> I'm working on an Appengine application in Java that allows users to
> upload images drawn through an HTML5 canvas library called PaintWeb
> (http://code.google.com/p/paintweb/).
>
> Currently I have a servlet that receives the XMLHttpRequest POST from
> the paintweb javascript library as a formencoded image.
>
> 1. Paintweb.js library sends XMLHttpRequest POST
>           send       = 'dataURL=' + encodeURIComponent(ev.dataURL),
>           headers    = {'Content-Type': 'application/x-www-form-
> urlencoded'};
>
> 2. A custom servlet decodes the form encoded image data as a blob and
> stores that in the Datastore with an associated Drawing entity
>
> 3 Custom servlet serves the Blob's in the datastore as
> ContentType("image/png")
>
> I'm curious if I can use the new BlobstoreService and ImageService
> features to upload my HTML5 canvas images and serve them as pure Blobs
> (as shown in this 
> tutorialhttp://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance...)
>
> According to the documentation (http://code.google.com/appengine/docs/
> java/blobstore/overview.html#Uploading_a_Blob) it seems like the major
> stopping point is that I need to POST a form with:
>      
>
> Which I don't think is possible from Paintweb.
>
> Possibly a work around would be if there was some way on the server
> side to store a blob in the Blobstorage (instead of the datastore) so
> that you could reap the benefits of not using your CPU quota to serve
> images.

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



Re: [appengine-java] Re: A question about queries and composite indices

2010-09-19 Thread John Patterson


On 16 Sep 2010, at 21:18, Ikai Lan (Google) wrote:

The way an AND query works is by making multiple queries and merging  
the results by zig-zagging between them.


A solution to your problem may be simply to whittle down the result  
set to as small as you can reasonably get it, then traverse the  
entities in memory.


If you end up needing to use multiple queries you can use Twigs  
parallel async queries to run them all at the same time then zig-zag  
the results yourself to filter out the matching results.  This way you  
have fine control over the chunk size for each query (to tune  
performance) and can keep a cursor for each query.


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



Re: [appengine-java] Using the Python bulk exporter tool with a Java application

2010-09-19 Thread John Patterson
If you feel more comfortable working with Java, I use this code to  
bulk load and backup data:


http://code.google.com/p/remote-datastore/

It intercepts the raw bytes sent to the local datastore and sends them  
to another remote datastore.  Because it operates at this very low  
level it is very efficient.


On 17 Sep 2010, at 12:23, megala dhinakaran wrote:


i had created webappliccation project using java,I want to bulk load
the data in google app engine datastore,But it shows the following
error how to solve this

appcfg.py create_bulkloader_config --filename=bulkloader.yaml --
url=http://logchecking1.appspot.com/remote_api
appcfg.py:41: DeprecationWarning: the sha module is deprecated; use
the hashlib module instead
 os.path.join(DIR_PATH, 'lib', 'antlr3'),
/home/crimson/Desktop/google_appengine/google/appengine/tools/
dev_appserver_login.py:33: DeprecationWarning: the md5 module is
deprecated; use hashlib instead
 import md5
Creating bulkloader configuration.
[INFO] Logging to bulkloader-log-20100917.105157
[INFO] Throttling transfers:
[INFO] Bandwidth: 25 bytes/second
[INFO] HTTP connections: 8/second
[INFO] Entities inserted/fetched/modified: 20/second
[INFO] Batch Size: 10
[INFO] Opening database: bulkloader-progress-20100917.105157.sql3
[INFO] Opening database: bulkloader-results-20100917.105157.sql3
[INFO] Connecting to logchecking1.appspot.com/remote_api
[ERROR   ] Exception during authentication
Traceback (most recent call last):
 File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
bulkloader.py", line 3167, in Run
   self.request_manager.Authenticate()
 File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
bulkloader.py", line 1176, in Authenticate
   remote_api_stub.MaybeInvokeAuthentication()
 File "/home/crimson/Desktop/google_appengine/google/appengine/ext/
remote_api/remote_api_stub.py", line 533, in MaybeInvokeAuthentication
   datastore_stub._server.Send(datastore_stub._path, payload=None)
 File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
appengine_rpc.py", line 336, in Send
   f = self.opener.open(req)
 File "/usr/lib/python2.6/urllib2.py", line 389, in open
   response = self._open(req, data)
 File "/usr/lib/python2.6/urllib2.py", line 407, in _open
   '_open', req)
 File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
   result = func(*args)
 File "/usr/lib/python2.6/urllib2.py", line 1146, in http_open
   return self.do_open(httplib.HTTPConnection, req)
 File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
   raise URLError(err)
URLError: 
[INFO] Authentication Failed

How to solve this?

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




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



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

2010-09-19 Thread lisandrodc
Hi, Cyrille but I have at the link for inheritance:
http://code.google.com/intl/en/appengine/docs/java/datastore/relationships.html#Polymorphic_Relationships
And I respect this. But I don´t understand since
It me does not work in the mistake that I present in the first post,
when instance the field class and at the makePersisent() method I have
the exception:

Problem accessing /Prode/JugarFecha.action. Reason:

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

Caused by:

java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.String
at
org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
202)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
at org.datanucleus.store.appengine.DatastoreRelationFieldManager
$1.apply(DatastoreRelationFieldManager.java:112)
Any can you help me with this?
Thanks
Regards
Lisandro

On 19 sep, 16:57, Cyrille Vincey  wrote:
> Be aware that inheritance is not supported by GAE yet.
> The problem might come from this issue.
> See :http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/datac
> html
>
> cyrille
>
> On 19/09/10 18:55, "lisandrodc"  wrote:
>
> > Thanks dushyant , but the exception is of an error of JDO,datanucleus
> > (seemingly).
> > That it has to see with the keys it seems to me, is not the problem
> > that I from my code
> > can use "Long.parseLong(String) to parse". This is something internal
> > that that should do datanucleus.
> > Regards.
> > Lisandro
>
> > On 19 sep, 12:19, dushyant bing  wrote:
> >> java.lang.ClassCastException: java.lang.Long cannot be cast to
> >> java.lang.String
>
> >> use Long.parseLong(String) to parse
>
> >> Sent from my iPad
>
> >> On Sep 19, 2010, at 7:52 PM, lisandrodc  wrote:
>
> >> Hi! I have a problem with persist a child class.
> >> The classes are:
>
> >> The parent class:
>
> >> @PersistenceCapable
>
> >> @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
> >> public  abstract class Fecha   {
>
> >> @PrimaryKey
> >> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> >> private Key id;
> >> @Persistent
> >> private String nombre;
> >> @Persistent
> >> private Date
> >> @Persistent
> >> private Date fechaFin;
>
> >> @Persistent(defaultFetchGroup = "true")
> >> List partidos;
>
> >> The child class:
>
> >> @PersistenceCapable
>
> >> public class RegFechaUsuario extends Fecha  {
>
> >> @Persistent
> >> private int puntos;
> >> @Persistent
> >> private Long idUsuarioFecha;
> >> @Persistent
> >> private Long idFechaOriginal;
>
> >> And the code of run the exception is:
> >> Transaction tx = pm.currentTransaction();
> >>  try {
> >>  tx.begin();
>
> >>  pm.makePersistentAll(regFechaUsuario);
> >>                      //here is the exception
> >>  tx.commit();
>
> >> And the regFechaUsuario is created with the build:
>
> >> public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
> >>   Long idUsuarioFecha, Long idFechaOriginal, Listpartidos)
> >> {
> >>  //super(nombre,fechaIni,fechaFin,partidos);
> >>  this.puntos = 0;
> >>  this.idUsuarioFecha = idUsuarioFecha;
> >>  this.idFechaOriginal = idFechaOriginal;
> >>  this.partidos=partidos;
>
> >> }
>
> >> The exception is:
> >> Problem accessing /Prode/JugarFecha.action. Reason:
>
> >>    java.lang.Long cannot be cast to java.lang.String
>
> >> Caused by:
>
> >> java.lang.ClassCastException: java.lang.Long cannot be cast to
> >> java.lang.String
> >> at
> >> org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentS
> >> witch(DatastoreRelationFieldManager.java:
> >> 202)
> >> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> >> $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
> >> at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> >> $1.apply(DatastoreRelationFieldManager.java:112)
> >> at
> >> org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(
> >> DatastoreRelationFieldManager.java:
> >> 81)
> >> at
> >> org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(Datastor
> >> eFieldManager.java:
> >> 955)
> >> at
> >> org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(Da
> >> tastorePersistenceHandler.java:
> >> 546)
> >> at org.datanucleus.store.appengine.DatastorePersistenceHandler.
>
> >> Regards
> >> Lisandro
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google App Engine for Java" group.
> >> To post to this group, send email to 
> >> google-appengine-j...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-appengine-java+unsubscr...@googlegroups.com.
> >> For more options, visit this group
> >> athttp://groups.google.com/group/google-appengine-java?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.

Re: [appengine-java] Using the Python bulk exporter tool with a Java application

2010-09-19 Thread Arun Ramanujapuram
Seems like the account credentials you are using to login may not have admin 
privileges (i.e. should be a valid user/developer account in your app.), or 
there is some other authentication mechanism (e.g. spring security) that is 
invalidating the login.

Arun





From: John Patterson 
To: google-appengine-java@googlegroups.com
Sent: Mon, 20 September, 2010 6:50:43 AM
Subject: Re: [appengine-java] Using the Python bulk exporter tool with a Java 
application

If you feel more comfortable working with Java, I use this code to bulk load 
and 
backup data:

http://code.google.com/p/remote-datastore/

It intercepts the raw bytes sent to the local datastore and sends them to 
another remote datastore.  Because it operates at this very low level it is 
very 
efficient.


On 17 Sep 2010, at 12:23, megala dhinakaran wrote:

i had created webappliccation project using java,I want to bulk load
>the data in google app engine datastore,But it shows the following
>error how to solve this
>
>appcfg.py create_bulkloader_config --filename=bulkloader.yaml --
>url=http://logchecking1.appspot.com/remote_api
>appcfg.py:41: DeprecationWarning: the sha module is deprecated; use
>the hashlib module instead
> os.path.join(DIR_PATH, 'lib', 'antlr3'),
>/home/crimson/Desktop/google_appengine/google/appengine/tools/
>dev_appserver_login.py:33: DeprecationWarning: the md5 module is
>deprecated; use hashlib instead
> import md5
>Creating bulkloader configuration.
>[INFO] Logging to bulkloader-log-20100917.105157
>[INFO] Throttling transfers:
>[INFO] Bandwidth: 25 bytes/second
>[INFO] HTTP connections: 8/second
>[INFO] Entities inserted/fetched/modified: 20/second
>[INFO] Batch Size: 10
>[INFO] Opening database: bulkloader-progress-20100917.105157.sql3
>[INFO] Opening database: bulkloader-results-20100917.105157.sql3
>[INFO] Connecting to logchecking1.appspot.com/remote_api
>[ERROR   ] Exception during authentication
>Traceback (most recent call last):
> File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
>bulkloader.py", line 3167, in Run
>   self.request_manager.Authenticate()
> File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
>bulkloader.py", line 1176, in Authenticate
>   remote_api_stub.MaybeInvokeAuthentication()
> File "/home/crimson/Desktop/google_appengine/google/appengine/ext/
>remote_api/remote_api_stub.py", line 533, in MaybeInvokeAuthentication
>   datastore_stub._server.Send(datastore_stub._path, payload=None)
> File "/home/crimson/Desktop/google_appengine/google/appengine/tools/
>appengine_rpc.py", line 336, in Send
>   f = self.opener.open(req)
> File "/usr/lib/python2.6/urllib2.py", line 389, in open
>   response = self._open(req, data)
> File "/usr/lib/python2.6/urllib2.py", line 407, in _open
>   '_open', req)
> File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
>   result = func(*args)
> File "/usr/lib/python2.6/urllib2.py", line 1146, in http_open
>   return self.do_open(httplib.HTTPConnection, req)
> File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
>   raise URLError(err)
>URLError: 
>[INFO] Authentication Failed
>
>How to solve this?
>
>-- 
>You received this message because you are subscribed to the Google Groups 
>"Google App Engine for Java" group.
>To post to this group, send email to google-appengine-j...@googlegroups.com.
>To unsubscribe from this group, send email to 
>google-appengine-java+unsubscr...@googlegroups.com.
>For more options, visit this group at 
>http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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


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



[appengine-java] parameter values in taskqueue that contain '&' gets cut

2010-09-19 Thread mar_novice
When using task queue and the parameters contain an ampersand, it gets
cut off when you try to its value.

example:

Queue queue = QueueFactory.getDefaultQueue();
queue.add(
url("/mailer")
.param("msg","you & me")
.method(Method.GET)
 );

and in mailer servlet, when you try to get the value of msg
 ...
 msg = request.getParameter("msg");
 ...

what i get is "you" only. The characters starting from the & to the
end gets cut off. I even tried to url encode first the message.. but
still it gets cut off.. Is this a bug?

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



Re: [appengine-java] parameter values in taskqueue that contain '&' gets cut

2010-09-19 Thread Fabrizio Accatino
 - how have you url-encoded the parameters?  Can you share the code?
 - have you tried Method.POST instead of GET?

fabrizio


On Mon, Sep 20, 2010 at 7:45 AM, mar_novice  wrote:

> When using task queue and the parameters contain an ampersand, it gets
> cut off when you try to its value.
>
> example:
>
> Queue queue = QueueFactory.getDefaultQueue();
> queue.add(
>url("/mailer")
>.param("msg","you & me")
>.method(Method.GET)
>  );
>
> and in mailer servlet, when you try to get the value of msg
> ...
> msg = request.getParameter("msg");
> ...
>
> what i get is "you" only. The characters starting from the & to the
> end gets cut off. I even tried to url encode first the message.. but
> still it gets cut off.. Is this a bug?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



[appengine-java] Re: Channel API still not live...

2010-09-19 Thread Heiko Roth
Hello there,

We need channel api, too.
Can we use it?

Greetings,
Heiko.

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