[appengine-java] Re: in my logs

2011-03-08 Thread lp

> #
> I 2011-03-06 20:14:32.566 [minglegeo/1.348824067992053184].:
> 04

strangely they are not present in my dev environment.

any one getting a similar issue?

-- 
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] Hosting Java application

2011-03-08 Thread foxyripper
Hello everyone,
Sorry for the stupid noob question. I'm creating a Java Application that use 
several libraries and basically gets streams from twitter and somehow use 
them to save jpg images. I wonder if Google App Engine is what I need to 
keep my application running without need to run it on my computer 
permanently. And is it possible to do that at all?
Thank you in advance guys

-- 
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: uploading 100k lines into the datastore is enough to max out the CPU time?

2011-03-08 Thread Didier Durand
Hi,

What captain says is true: you should remove your make persistent for
each iteration and replace it with a makePersistentAll()  every N
iterations: that will batch the writes and make them more efficient.
(but don't wait to have too many of have: I'd start with approx 100
and see if I can increase this number)

Beside that, I must admin that your code looks pretty standard...

Question: do you use the regular DS or the new Hgih Replication DS ?
HR DS is supposed to be slower for writes.

Let's see the result of this change

regards

didier

On Mar 8, 6:52 am, captain  wrote:
> Hi Claudio
>
> Try makePersistentAll()
>
> It will certainly help
>
> Cheers
> CB
>
> On Mar 7, 2:57 am, Cláudio Coelho  wrote:
>
> > Since the bottleneck occurs when making objects of Location
> > persistent, I assume that is the only relevant class. If anything else
> > is relevant, tell me and I'll disclose.
>
> > @PersistenceCapable(identityType =
> > IdentityType.APPLICATION,detachable="true")
> > public class Location{
> >         @PrimaryKey
> >         @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> >         Long locationId;
> >         @Persistent
> >         long countryId;
> >         @Persistent
> >         String name;
> >         @Persistent
> >         String country=null;
> >         @Persistent
> >         double latitude,longitude;
> >         @Persistent
> >         int population;
> >         @Persistent
> >         long geoBoxL1,geoBoxL2,geoBoxL3,geoBoxL4,geoBoxL5;
> >         public Location()
> >         {
>
> >         }
> >         public Location(String name, long countryId,String country, double
> > latitude, double longitude)
> >         {
> >                 this.name=name;
> >                 this.countryId=countryId;
> >                 this.latitude=latitude;
> >                 this.longitude=longitude;
> >                 this.country=country;
> >         }
> >         public Location(LocationDTO dto) {
> >                 this();
> >                 updateFromDTO(dto);
> >         }
>
> >         public void updateFromDTO(LocationDTO dto) {
> >                 setLocationId(dto.getLocationId());
> >                 setCountryId(dto.getCountryId());
> >                 setCountry(dto.getCountry());
> >                 setName(dto.getName());
> >                 setPopulation(dto.getPopulation());
> >                 setLatitude(dto.getLatitude());
> >                 setLongitude(dto.getLongitude());
> >                 setGeoBoxL1(dto.getGeoBoxL1());
> >                 setGeoBoxL2(dto.getGeoBoxL2());
> >                 setGeoBoxL3(dto.getGeoBoxL3());
> >                 setGeoBoxL4(dto.getGeoBoxL4());
> >                 setGeoBoxL5(dto.getGeoBoxL5());
>
> >         }
> >         public LocationDTO getDTO()
> >         {
> >                 LocationDTO dto = new LocationDTO();
> >                 dto.setLocationId(getLocationId());
> >                 dto.setCountryId(getCountryId());
> >                 dto.setCountry(getCountry());
> >                 dto.setName(getName());
> >                 dto.setPopulation(getPopulation());
> >                 dto.setLatitude(getLatitude());
> >                 dto.setLongitude(getLongitude());
> >                 dto.setGeoBoxL1(getGeoBoxL1());
> >                 dto.setGeoBoxL2(getGeoBoxL2());
> >                 dto.setGeoBoxL3(getGeoBoxL3());
> >                 dto.setGeoBoxL4(getGeoBoxL4());
> >                 dto.setGeoBoxL5(getGeoBoxL5());
>
> >                 return dto;
> >         }
>
> >         public long getLocationId() {
> >                 return locationId;
> >         }
> >         public void setLocationId(long locationId) {
> >                 this.locationId = locationId;
> >         }
> >         public String getCountry() {
> >                 return country;
> >         }
>
> >         public int getPopulation() {
> >                 return population;
> >         }
> >         public void setPopulation(int population) {
> >                 this.population = population;
> >         }
> >         public void setCountry(String country) {
> >                 this.country = country;
> >         }
>
> >         public long getCountryId() {
> >                 return countryId;
> >         }
> >         public void setCountryId(long countryId) {
> >                 this.countryId = countryId;
> >         }
> >         public String getName() {
> >                 return name;
> >         }
> >         public void setName(String name) {
> >                 this.name = name;
> >         }
> >         public double getLatitude() {
> >                 return latitude;
> >         }
> >         public void setLatitude(double latitude) {
> >                 this.latitude = latitude;
> >         }
> >         public double getLongitude() {
> >                 return longitude;
> >         }
> >         public void setLongitude(double longitude) {
> >                 this.longitude = longitude;
> >         }
>
> >         pu

[appengine-java] Dudas sobre Configuración de JPA

2011-03-08 Thread Edixon Polanco
Buenos días.

Tengo problemas con mi aplicación , estoy trabajando con *Eclipse y JPA.*
Tengo dos clases (*Colección y Editorial*) en mi aplicación  y solo me
funciona una de las 2, bien sea *colección* o *editorial*. ¿Que tengo que
hacer para que me funcionen las 2 clases en la misma aplicación.? necesito
alguna configuración adicional?

No se si hay que configurar algo adicional en el archivo *persintence.xml* o
el *web.xml* trabajando con *JPA*?

Espero sus comentarios al respecto.

Saludos.

-- 
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] Dudas sobre Aplicaciones con JPA

2011-03-08 Thread Edixon Polanco
Buenos días.

Tengo problemas con mi aplicación , estoy trabajando con *Eclipse y JPA.*
Tengo dos clases (*Colección y Editorial*) en mi aplicación  y solo me
funciona una de las 2, bien sea *colección* o *editorial*. ¿Que tengo que
hacer para que me funcionen las 2 clases en la misma aplicación.? necesito
alguna configuración adicional?

No se si hay que configurar algo adicional en el archivo *persintence.xml* o
el *web.xml* trabajando con *JPA*?

Espero sus comentarios al respecto.

Saludos.

-- 
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] Confused by 415 when scheduling a task (using restlet)

2011-03-08 Thread bjorn
Hey all,

I've been using GAE/J and restlet for long enough that this shouldn't
be stumping me, but it is. I've tried a few things and web-searched,
but to no avail.

I'm trying to schedule a task with a payload

public static void queueStorePaymentTransaction( User user,
AccountPayment ap ) {
XStream xstream = new XStream();
String payload = xstream.toXML(ap);
TaskOptions taskOptions;
try {
taskOptions = TaskOptions.Builder.withUrl("/task/
storePaymentTransaction").payload(payload.getBytes("UTF-8"),"text/
xml");
Queue queue = QueueFactory.getDefaultQueue();
queue.add( taskOptions );
} catch (UnsupportedEncodingException e) {
throw new RuntimeException();
}
}

And I have tried functions like this for "picking up" the transaction:

@Post("xml:xml|json")
public GenericData postMethodText() {
return runTask();
}

But I always get this response, even when I've tried different
arguments to the "Post" annotation.

Web hook at http://0.0.0.0:/task/storePaymentTransaction returned
status code 415.  Rescheduling...

I can work around this using a parameter instead of a payload (I've
got that working just fine), but the payload seems more appropriate
here. Any advice about what I'm missing are super appreciated!

-- 
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] 403 Forbidden - Whilst trying to upload app for the first time.

2011-03-08 Thread Edd Grant
Hi All,

I'm trying to do an initial upload of my Java GAE app. I have set up
my app id and can successfull log in to the GAE console at
https://appengine.google.com however whenever I try to upload my app I
get the following error:

Unable to update:
java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=stretchrxapi&version=1&;
403 Forbidden
You do not have permission to modify this app
(app_id=u'stretchrxapi').

at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
153)
at
com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
86)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
582)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
400)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
112)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
56)
at com.google.appengine.tools.admin.AppCfg
$UpdateAction.execute(AppCfg.java:553)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:141)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:63)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:59)
com.google.appengine.tools.admin.AdminException: Unable to update app:
Error posting to URL: 
https://appengine.google.com/api/appversion/create?app_id=stretchrxapi&version=1&;
403 Forbidden
You do not have permission to modify this app
(app_id=u'stretchrxapi').

at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
62)
at com.google.appengine.tools.admin.AppCfg
$UpdateAction.execute(AppCfg.java:553)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:141)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:63)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:59)
Caused by: java.io.IOException: Error posting to URL:
https://appengine.google.com/api/appversion/create?app_id=stretchrxapi&version=1&;
403 Forbidden
You do not have permission to modify this app
(app_id=u'stretchrxapi').

at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
153)
at
com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
86)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
582)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
400)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
112)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
56)
... 4 more

I'm not sure if it's a red herring or not (currently assuming it is)
but I also see the following in the console when I try to upload:

Error Details:
08-Mar-2011 14:46:41 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\delete.jsp
08-Mar-2011 14:46:42 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\error.jsp
08-Mar-2011 14:46:43 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\get-single-entity.jsp
08-Mar-2011 14:46:45 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\post.jsp
08-Mar-2011 14:46:46 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\put.jsp
08-Mar-2011 14:46:47 org.apache.jasper.JspC processFile
INFO: Built File: \WEB-INF\views\resource-as-json-object.jsp

And thirdly - I have noted that on occasion I get an error 500
internal server error when trying to connect to the GAE console
(https://appengine.google.com) - could this be something to do with
the issue I'm seeing?

I'm using app engine SDK version 1.4.2 and my upload command is as
follows:

C:\development\stsworkspace\xapi\webapp>C:\Program_Files\Programming
\Java\SpringSource\sts-2.5.0.RELEASE\plugins
\com.google.appengine.eclipse.sdkbundle.
1.4.2_1.4.2.v201102111811\appengine-java-sdk-1.4.2\bin\appcfg.cmd --
proxy=10.140.192.37:8080 --proxy_https=10.140.192.37:8080 --
email=ad...@stretchr.com --passin update target\webapp-0.1.0.BUILD-
SNAPSHOT

My appengine-web.xml is as follows:


http://appengine.google.com/ns/1.0";>
stretchraxpi
1
false
false
true
true


Hopefully I've provided all the necessary information here, I realise
that there are plenty of 403 related posts out there but none of them
seemed to answer my specific issue hence posting this one.

Any one got any ideas what could be going wrong here?

Cheers,

Edd

-- 
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/gr

Re: [appengine-java] Re: uploading 100k lines into the datastore is enough to max out the CPU time?

2011-03-08 Thread Stephen Johnson
Hi Claudio,
You have 12 total fields all of which you have indexed which is the default.
You have 1 key field and 11 non-key fields. This will result in 23 index
entries being written for each entity. You get 1 ascending index on the key
field and by default you get both an ascending and descending index on the
other 11 non-key fields. This will take A LOT of CPU for each entity. Do you
need them all indexed? If not, I would set them to unindexed. That should
help a lot.
Stephen

2011/3/7 Cláudio Coelho 

> Since the bottleneck occurs when making objects of Location
> persistent, I assume that is the only relevant class. If anything else
> is relevant, tell me and I'll disclose.
>
> @PersistenceCapable(identityType =
> IdentityType.APPLICATION,detachable="true")
> public class Location{
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>Long locationId;
>@Persistent
>long countryId;
>@Persistent
>String name;
>@Persistent
>String country=null;
>@Persistent
>double latitude,longitude;
>@Persistent
>int population;
>@Persistent
>long geoBoxL1,geoBoxL2,geoBoxL3,geoBoxL4,geoBoxL5;
>public Location()
>{
>
>}
>public Location(String name, long countryId,String country, double
> latitude, double longitude)
>{
>this.name=name;
>this.countryId=countryId;
>this.latitude=latitude;
>this.longitude=longitude;
>this.country=country;
>}
>public Location(LocationDTO dto) {
>this();
>updateFromDTO(dto);
>}
>
>public void updateFromDTO(LocationDTO dto) {
>setLocationId(dto.getLocationId());
>setCountryId(dto.getCountryId());
>setCountry(dto.getCountry());
>setName(dto.getName());
>setPopulation(dto.getPopulation());
>setLatitude(dto.getLatitude());
>setLongitude(dto.getLongitude());
>setGeoBoxL1(dto.getGeoBoxL1());
>setGeoBoxL2(dto.getGeoBoxL2());
>setGeoBoxL3(dto.getGeoBoxL3());
>setGeoBoxL4(dto.getGeoBoxL4());
>setGeoBoxL5(dto.getGeoBoxL5());
>
>
>}
>public LocationDTO getDTO()
>{
>LocationDTO dto = new LocationDTO();
>dto.setLocationId(getLocationId());
>dto.setCountryId(getCountryId());
>dto.setCountry(getCountry());
>dto.setName(getName());
>dto.setPopulation(getPopulation());
>dto.setLatitude(getLatitude());
>dto.setLongitude(getLongitude());
>dto.setGeoBoxL1(getGeoBoxL1());
>dto.setGeoBoxL2(getGeoBoxL2());
>dto.setGeoBoxL3(getGeoBoxL3());
>dto.setGeoBoxL4(getGeoBoxL4());
>dto.setGeoBoxL5(getGeoBoxL5());
>
>return dto;
>}
>
>public long getLocationId() {
>return locationId;
>}
>public void setLocationId(long locationId) {
>this.locationId = locationId;
>}
>public String getCountry() {
>return country;
>}
>
>public int getPopulation() {
>return population;
>}
>public void setPopulation(int population) {
>this.population = population;
>}
>public void setCountry(String country) {
>this.country = country;
>}
>
>public long getCountryId() {
>return countryId;
>}
>public void setCountryId(long countryId) {
>this.countryId = countryId;
>}
>public String getName() {
>return name;
>}
>public void setName(String name) {
>this.name = name;
>}
>public double getLatitude() {
>return latitude;
>}
>public void setLatitude(double latitude) {
>this.latitude = latitude;
>}
>public double getLongitude() {
>return longitude;
>}
>public void setLongitude(double longitude) {
>this.longitude = longitude;
>}
>
>public long getGeoBoxL1() {
>return geoBoxL1;
>}
>public void setGeoBoxL1(long geoBoxL1) {
>this.geoBoxL1 = geoBoxL1;
>}
>public long getGeoBoxL2() {
>return geoBoxL2;
>}
>public void setGeoBoxL2(long geoBoxL2) {
>this.geoBoxL2 = geoBoxL2;
>}
>public long getGeoBoxL3() {
>return geoBoxL3;
>}
>public void setGeoBoxL3(long geoBoxL3) {
>this.geoBoxL3 = geoBox

Re: [appengine-java] Re: uploading 100k lines into the datastore is enough to max out the CPU time?

2011-03-08 Thread Cláudio Coelho
Hi,
I thought about taking out some indexes, but I can only take out 3 of them 
and I don't notice a big difference in the results.
However, the method persistentAll (quite logical actually!) did make a huge 
difference. It basically cut the time and cpu load to one 3rd. I'll probably 
be able to bring it down a bit more with some tweaking.

These 100k lines are to be inserted just on setting up the app, everything 
else is supposed to grow much slower and my app probably will have a 100:1 
read to write, so I guess I'm not too worried. I'm new to GAE and I was just 
a bit surprised to just how careful you have to be to minimize the cpu load.

Thanks everybody,

Cheers

C

 

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



Re: [appengine-java] Sub domain for static content

2011-03-08 Thread Jeff Knox
So I'm still trying to sort this out.

If I created a second app to serve the WWW web site would that be a 
violation of the App Engine TOS? While the two pieces are related they 
aren't the same.

The WWW mapping would be more of a traditional web site that would most 
likely grow and potentially include back end services like a blog and such. 
The PHOTOGRAPHY mapping is strictly the photo album and image services. (In 
the future there are other applications I would like to build but they won't 
be tied to the same domain name as these two are.)

I'm not trying to circumvent any quotas - just attempting to configure it 
all in the most logical/efficient way.

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] Hanging request after app deployment (no log entry)

2011-03-08 Thread John
I'm seeing a behavior that I hadn't observed before. After one of my apps is 
deployed, the first request hangs for a LONG time (I haven't left it sitting 
for more than 10 minutes yet, so I don't know how long). There is no GAE log 
entry corresponding to the hanging request. I don't have much to provide for 
an issue report. Figured I'd first ask whether anyone else has encountered 
something like that.

-- 
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] Could not initialize class PMF

2011-03-08 Thread Laci
Hi!

I am trying to use the persistancemanagerfactory, and always get the 
following error.
I have searched over the internet for solutions, nothing helped so far. Any 
help is welcome. I am getting lost.

When I try to use the instance, I get the error.
PersistenceManager pm = PMF.get().getPersistenceManager(); 
try {
pm.currentTransaction().begin();
pm.makePersistent(c);
pm.currentTransaction().commit();
} catch (Exception ex) {
pm.currentTransaction().rollback();
throw new RuntimeException(ex);
} finally {
pm.close();
}

PMF implementation:

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

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

private PMF() {}

public static synchronized PersistenceManagerFactory get() {
if(pmfInstance == null)  {
pmfInstance = JDOHelper.getPersistenceManagerFactory(
  "transactions-optional");
}
return pmfInstance;
}
}

jdconfig.xml:


http://java.sun.com/xml/ns/jdo/jdoconfig";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig";>

   
   
   
   
   
   
   
   


Error:

[ERROR] javax.servlet.ServletContext log: Exception while dispatching 
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
abstract void 
com.reference.client.GreetingService.addCompany(com.reference.shared.Company)' 
threw an unexpected exception: java.lang.NoClassDefFoundError: Could not 
initialize class com.reference.server.PMF
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:378)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:581)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:207)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:243)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at 
com.google.appengine.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.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class 
com.reference.server.PMF
at 
com.reference.server.ContactImplPersistent.addCompany(ContactImplPersistent.java:59)
at 
com.reference.server.GreetingServiceImpl.addCompany(GreetingServiceImpl.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
at com.google.gwt.user.server.rpc.RP

Re: [appengine-java] Re: Creating/Compiling new Java class at run time

2011-03-08 Thread Vinny
Offhand, I don't think this would be possible as you would be at least
creating a new .class file.
GAE allows no File I/O.

--
biz: http://www.linkedin.com/in/vincentstoessel/
personal: http://xaymaca.tumblr.com/



On Mon, Mar 7, 2011 at 10:55 PM, Rick Smith  wrote:
> Any update guys?
>
> On Mar 7, 1:13 pm, Rick Smith  wrote:
>> Hi all
>>
>> Can I create and compile a java class at run time on goolge
>> appengine.
>> Use case: I have given a UI to my application user that they can
>> define their own business logic.Now what is going to be main challenge
>> is that I need to make new deployment each time when some one need to
>> modify its business logic. As an alternate I want to store source code
>> in data base and compile it when required.
>>
>> Regards
>>
>> Rick
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



[appengine-java] Re: Creating/Compiling new Java class at run time

2011-03-08 Thread Larry Cable


On Mar 7, 12:13 am, Rick Smith  wrote:
> Hi all
>
> Can I create and compile a java class at run time on goolge
> appengine.
> Use case: I have given a UI to my application user that they can
> define their own business logic.Now what is going to be main challenge
> is that I need to make new deployment each time when some one need to
> modify its business logic. As an alternate I want to store source code
> in data base and compile it when required.
>
> Regards
>
> Rick

As others have pointed out the file I/O issue precludes using a
compiler 

The best I can suggest is using BCEL to construct classes at
runtime... But I have never tried this with GAE so I do not know if
BCEL is whitelist safe.

-- 
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: Creating/Compiling new Java class at run time

2011-03-08 Thread Larry Cable


On Mar 8, 8:35 pm, Larry Cable  wrote:
> On Mar 7, 12:13 am, Rick Smith  wrote:
>
> > Hi all
>
> > Can I create and compile a java class at run time on goolge
> > appengine.
> > Use case: I have given a UI to my application user that they can
> > define their own business logic.Now what is going to be main challenge
> > is that I need to make new deployment each time when some one need to
> > modify its business logic. As an alternate I want to store source code
> > in data base and compile it when required.
>
> > Regards
>
> > Rick
>
> As others have pointed out the file I/O issue precludes using a
> compiler 
>
> The best I can suggest is using BCEL to construct classes at
> runtime... But I have never tried this with GAE so I do not know if
> BCEL is whitelist safe.

Just as a followup you need to take a look at the BCEL API to see if
you can create in-memory class files ... Otherwise you will trip up
over the File I/O issue again.

-- 
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: Creating/Compiling new Java class at run time

2011-03-08 Thread Didier Durand
Hi,

Even if you solve the File I/O issue, I would guess that you may then
face security issue: Google has probably protected its instances
against execution of code not coming direcly from the war file...

Anyway, very interesting question: pls, let us konw how you progress.

regards

didier

On Mar 9, 5:43 am, Larry Cable  wrote:
> On Mar 8, 8:35 pm, Larry Cable  wrote:
>
>
>
> > On Mar 7, 12:13 am, Rick Smith  wrote:
>
> > > Hi all
>
> > > Can I create and compile a java class at run time on goolge
> > > appengine.
> > > Use case: I have given a UI to my application user that they can
> > > define their own business logic.Now what is going to be main challenge
> > > is that I need to make new deployment each time when some one need to
> > > modify its business logic. As an alternate I want to store source code
> > > in data base and compile it when required.
>
> > > Regards
>
> > > Rick
>
> > As others have pointed out the file I/O issue precludes using a
> > compiler 
>
> > The best I can suggest is using BCEL to construct classes at
> > runtime... But I have never tried this with GAE so I do not know if
> > BCEL is whitelist safe.
>
> Just as a followup you need to take a look at the BCEL API to see if
> you can create in-memory class files ... Otherwise you will trip up
> over the File I/O issue again.

-- 
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: Hanging request after app deployment (no log entry)

2011-03-08 Thread lp
why are sure that the request has hit appengine?

-lp

On Mar 9, 8:59 am, John  wrote:
> I'm seeing a behavior that I hadn't observed before. After one of my apps is
> deployed, the first request hangs for a LONG time (I haven't left it sitting
> for more than 10 minutes yet, so I don't know how long). There is no GAE log
> entry corresponding to the hanging request. I don't have much to provide for
> an issue report. Figured I'd first ask whether anyone else has encountered
> something like that.

-- 
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: Hosting Java application

2011-03-08 Thread lp
> Sorry for the stupid noob question. I'm creating a Java Application that use
> several libraries and basically gets streams from twitter and somehow use
> them to save jpg images. I wonder if Google App Engine is what I need to
> keep my application running without need to run it on my computer
> permanently. And is it possible to do that at all?

the only out bound connections available on appengine are http.
so if twitter supports http, all good.

saving images no problem

hope that helps.

-lp

-- 
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: Creating/Compiling new Java class at run time

2011-03-08 Thread Jay Young
I dunno about this.  The different JVM language runtimes (JRuby, Rhino, 
Groovy, etc) all generate and run bytecode on the fly.  I don't know if you 
can cache that generated byte code and re-execute it later, though that 
seems like it'd be a shortcoming of the interpreter, not the App Engine 
environment.


On Wednesday, March 9, 2011 12:17:57 AM UTC-5, Didier Durand wrote:
>
> Hi, 
>
> Even if you solve the File I/O issue, I would guess that you may then 
> face security issue: Google has probably protected its instances 
> against execution of code not coming direcly from the war file... 
>
> Anyway, very interesting question: pls, let us konw how you progress. 
>
> regards 
>
> didier 
>
> On Mar 9, 5:43 am, Larry Cable  wrote: 
> > On Mar 8, 8:35 pm, Larry Cable  wrote: 
> > 
> > 
> > 
> > > On Mar 7, 12:13 am, Rick Smith  wrote: 
> > 
> > > > Hi all 
> > 
> > > > Can I create and compile a java class at run time on goolge 
> > > > appengine. 
> > > > Use case: I have given a UI to my application user that they can 
> > > > define their own business logic.Now what is going to be main 
> challenge 
> > > > is that I need to make new deployment each time when some one need to 
>
> > > > modify its business logic. As an alternate I want to store source 
> code 
> > > > in data base and compile it when required. 
> > 
> > > > Regards 
> > 
> > > > Rick 
> > 
> > > As others have pointed out the file I/O issue precludes using a 
> > > compiler  
> > 
> > > The best I can suggest is using BCEL to construct classes at 
> > > runtime... But I have never tried this with GAE so I do not know if 
> > > BCEL is whitelist safe. 
> > 
> > Just as a followup you need to take a look at the BCEL API to see if 
> > you can create in-memory class files ... Otherwise you will trip up 
> > over the File I/O issue again.

-- 
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] Development AppEngine server quits with no warnings.

2011-03-08 Thread RoyR
Hi

I started having a strange issue today (nothing changed, except for a Mac 
automatic system update).

As soon as start the AppEngine server, it comes up, and then just quits 
without any warning or errors. The listener stops listening on port , 
and the JVM just exits. Same thing happens in Eclipse as well as 
command-line.

Famous last messages... (running the default vanilla guestbook basic app)

2011-03-08 21:57:03.358 java[467:a07] [Java CocoaComponent compatibility 
mode]: Enabled

2011-03-08 21:57:03.360 java[467:a07] [Java CocoaComponent compatibility 
mode]: Setting timeout for SWT to 0.10

Initializing AppEngine server

Logging to JettyLogger(null) via 
com.google.apphosting.utils.jetty.JettyLogger

Successfully processed 
/Users/roy/Developer/workspace/Guestbook/war/WEB-INF/appengine-web.xml

Successfully processed 
/Users/roy/Developer/workspace/Guestbook/war/WEB-INF/web.xml

The server is running at http://localhost:/


Anyone know what could be going wrong here, or how to get more details on 
the problem? Is there some trace-level logging I could enable ?
I tried deleting the workspace and creating from scratch, as well as 
uninstalling and reinstalling GAE, GWT and the Eclipse plugin, but no use.

Thanks
Roy







===
AppEngine 1.4.2. w/ Eclipse 3.6 plugin
GWT 2.2
OSX 10.6.6

-- 
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: BlobstoreService, No image data is available.

2011-03-08 Thread Timothy Wilson
A solution 2 years later, but here is how I just solved this.

First, create the image from the blobkey

Crop that image with 0,0, 1, 1... Crop uses normalized coordinates.

The resultant image out of that applyTransform is the 'original' image, but 
it now has width/height all other image info.

The blob store does seem half-baked, its hard to store data, and these half 
implemented API calls are minefields.


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



Re: [appengine-java] Re: What is maximum number of entities I can update within the 30 sec time limit of App engine ?

2011-03-08 Thread suersh babu
We have gwt module, In this module I can use rpc to wait for the task queue
to complete after adding task job, but my concern is when does the task
queue start executing after adding into task queue, whether immediately or
later some time with any delay like that ?

Any help would be greatly appreciated.


On Mon, Mar 7, 2011 at 7:45 PM, Matija  wrote:

> If your user starts some action that updates a lot of entities and you need
> to show him soon after that action all or many of these entities then you
> should probably change your entities model or user interface.
>
> --
> 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.
>



-- 
*Regards**

Suresh Babu G*

http://www.AccountingGuru.in 

-- 
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: What is maximum number of entities I can update within the 30 sec time limit of App engine ?

2011-03-08 Thread Didier Durand
Hi,

Queued tasks usually start after a few tenths of milliseconds provided
that you set it right (bucket size, etc...) if you expect more than 1
task running in parallel.

regards

didier

On Mar 9, 7:21 am, suersh babu  wrote:
> We have gwt module, In this module I can use rpc to wait for the task queue
> to complete after adding task job, but my concern is when does the task
> queue start executing after adding into task queue, whether immediately or
> later some time with any delay like that ?
>
> Any help would be greatly appreciated.
>
> On Mon, Mar 7, 2011 at 7:45 PM, Matija  wrote:
> > If your user starts some action that updates a lot of entities and you need
> > to show him soon after that action all or many of these entities then you
> > should probably change your entities model or user interface.
>
> > --
> > 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.
>
> --
> *Regards**
>
> Suresh Babu G*
>
> http://www.AccountingGuru.in

-- 
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: Development AppEngine server quits with no warnings.

2011-03-08 Thread RoyR
More info...

The Mac s/w update I received included the Java SE 6 Update 4 released on 
March 7, 2011.
http://support.apple.com/kb/HT4562

This breaks the development server, it exits with error code 138, which I 
think is a JVM crash.

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