[appengine-java] Re: htmlunit

2009-08-21 Thread Marc Guillemot

currently not :-(

As far as I know, there are 3 main issues:

(1) URLStreamHandler not on white list
http://code.google.com/p/googleappengine/issues/detail?id=1384 (feel 
free to star it)
(2) HttpWebConnection not supported as it uses sockets
(3) implemenation of JavaScript setTimeout, setInterval, and asynch XHR 
uses threads, what is not supported by GAE

(1) is problematic. On one side I believe that URLStreamHandler could be 
white listed without problem (not the registration of protocols, just 
the usage of own handler). On the other side, HtmlUnit might migrate 
from URL to URI for internal usage and therefore this problem would 
disappear

(2) quite easy: write own WebConnection that use AppEngine UrlFetcher 
instead

(3) more difficult. Everything would need to run in the same thread. I 
think that it is possible to achieve it preserving the execution order 
but without any guarantee on the time where js code is executed.

Cheers,
Marc.
-- 
Web: http://www.efficient-webtesting.com
Blog: http://mguillem.wordpress.com

ssprauer wrote:
> Is there a way to make htmlunit run within GAE?
> > 
> 


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



[appengine-java] Performance optimization of query from datastore (cpu_ms/api_cpu_ms showing red)

2009-08-21 Thread sree

Related to post:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/f3fa2b04d2fa6a3

In a test app I have created, I am able to query only 50 rows per
request (for 1 entity with 10 properties only) from the datastore by
using low-level api without getting any warnings for cpu_ms /
api_cpu_ms usage.

However if I try to query more rows (again only 1 entity being
inserted), the cpu gets used for more than 1s thereby generating a
warning or error from GAE.

Stats from GAE log:

To retrieve 50 records -> /viewData.action?offset=0&range=50 200 142ms
861cpu_ms 678api_cpu_ms (everything ok)

To retrieve 100 records -> /viewData.action?offset=0&range=100 200
261ms 1653cpu_ms 1338api_cpu_ms (cpu_ms / api_cpu_ms in red)

Is there a more performant way to query the datastore for more records
in one request? Thanks in advance.

P.S: This is a test app and billing is not enabled.

Code in servlet:

Query query = persistenceManager.newQuery("SELECT FROM " +

 DetailsBean.class.getName());
query.setOrdering("crDate asc");
query.setRange(offset, range);

data = (List) query.execute();

Code of Entity bean:

package com.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

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

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DetailsBean implements Serializable {

private static final long serialVersionUID = 1L;

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long slno;

@Persistent
private long column1;

@Persistent
private String column2;

@Persistent
private double column3;

@Persistent
private double column4;

@Persistent
private double column5;

@Persistent
private float column6;

@Persistent
private double column7;

@Persistent
private double column8;

@Persistent
private Date crDate;

@Persistent
private Date modDate;

@NotPersistent
private String message;

@NotPersistent
private int n;

@NotPersistent
private long offset;

@NotPersistent
private long range;

@NotPersistent
private List data;


public DetailsBean() {

}

public DetailsBean(long v1, String v2, double v3, double v4, double
v5,
float v6, 
double v7, double v8) {
this.column1 = v1;
this.column2 = v2;
this.column3 = v3;
this.column4 = v4;
this.column5 = v5;
this.column6 = v6;
this.column7 = v7;
this.column8 = v8;
Date now = new Date();
this.crDate = now;
this.modDate = now;
}

public Long getSlno() {
return slno;
}

public void setSlno(Long slno) {
this.slno = slno;
}

public long getColumn1() {
return column1;
}

public void setColumn1(long column1) {
this.column1 = column1;
}

public String getColumn2() {
return column2;
}

public void setColumn2(String column2) {
this.column2 = column2;
}

public double getColumn3() {
return column3;
}

public void setColumn3(double column3) {
this.column3 = column3;
}

public double getColumn4() {
return column4;
}

public void setColumn4(double column4) {
this.column4 = column4;
}

public double getColumn5() {
return column5;
}

public void setColumn5(double column5) {
this.column5 = column5;
}

public float getColumn6() {
return column6;
}

public void setColumn6(float column6) {
this.column6 = column6;
}

public double getColumn7() {
return column7;
}

public void setColumn7(double column7) {
this.column7 = column7;
}

public double getColumn8() {
return column8;
}

public void setColumn8(double column8) {
this.column8 = column8;
}

public Date getCrDate() {
return crDate;
}

public void setCrDate(Date crDate) {
   

[appengine-java] Performance optimization of insert into datastore (cpu_ms/api_cpu_ms showing red)

2009-08-21 Thread sree

In a test app I have created, I am able to insert only 2 rows per
request (for 1 entity with 10 properties only) into the datastore by
using low-level api without getting any warnings for cpu_ms /
api_cpu_ms usage.

However if I try to insert 3 rows or more (again only 1 entity being
inserted), the cpu gets used for more than 1s thereby generating a
warning or error from GAE.

Stats from GAE log:

For inserting 2 records -> /insert.do 200 77ms 655cpu_ms 643api_cpu_ms
(everything ok)

For inserting 3 records -> /insert.do 200 134ms 979cpu_ms
964api_cpu_ms (yellow warning)

For inserting 10 records -> /insert.do 200 178ms 3249cpu_ms
3216api_cpu_ms (red warning)

How to optimize the ‘cpu_ms and api_cpu_ms’ usage? Can GAE perform
only as many operations as 2 inserts into datastore if we want to keep
within the warning levels?

Can you please provide some feedback as to whether I am doing anything
wrong in code or have not used a good practice to achieve better
performance. Thanks in advance.

Code in servlet (parsing and split operations have been benchmarked
and they are not causing any adverse impact on performance):

Pattern p1 = Pattern.compile(",");  // created as servlet instance
variable

public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
try {

DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();
List entity = new ArrayList();

for (int i = 0; i < n; i++) {

String[] record = 
p1.split("1,tester,1.0,1.0,1.0,1.0,1.0,1.0");

data1 = Long.parseLong(record[0]);
data2 = record[1];
data3 = Double.parseDouble(record[2]);
data4 = Double.parseDouble(record[3]);
data5 = Double.parseDouble(record[4]);
data6 = Double.parseDouble(record[5]);
data7 = Double.parseDouble(record[6]);
data8 = Float.parseFloat(record[7]);

Entity e = new 
Entity(DetailsBean.class.getSimpleName());
e.setProperty("column1", i);
e.setProperty("column2", data2);
e.setProperty("column3", i + data3);
e.setProperty("column4", i + data4);
e.setProperty("column5", i + data5);
e.setProperty("column6", i + data6);
e.setProperty("column7", i + data7);
e.setProperty("column8", i + data8);
e.setProperty("crDate", new Date());
e.setProperty("modDate", new Date());

entity.add(e);

}

datastore.put(entity);

} catch (Exception e) {
e.printStackTrace();
} finally {
persistenceManager.close();
}
}

Entity bean code:

package com.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

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

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DetailsBean implements Serializable {

private static final long serialVersionUID = 1L;

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long slno;

@Persistent
private long column1;

@Persistent
private String column2;

@Persistent
private double column3;

@Persistent
private double column4;

@Persistent
private double column5;

@Persistent
private float column6;

@Persistent
private double column7;

@Persistent
private double column8;

@Persistent
private Date crDate;

@Persistent
private Date modDate;

@NotPersistent
private String message;

@NotPersistent
private int n;

@NotPersistent
private long offset;

@NotPersistent
private long range;

@NotPersistent
private List data;


public DetailsBean() {

}

public DetailsBean(long v1, String v2, double v3, double v4, double
v5,
float v6, 
double v7, double v8) {
this.column1 = v1;
this.column2 = v2;
   

[appengine-java] Re: Query on subclass fields

2009-08-21 Thread Danny zion
thanks Jason its nice to know!

On Wed, Aug 19, 2009 at 2:16 AM, Jason (Google)  wrote:

> Hi Danny. Thank you for being patient. The bug is prioritized, and we're
> hoping to roll out a fix in the coming weeks. Until then, I think your
> safest bet is to avoid inheritance in your persistent classes until then.
> - Jason
>
>
> On Sun, Aug 16, 2009 at 6:27 AM, Danny  wrote:
>
>>
>> Any one have any workaround to make this work until google will fix
>> this bug??
>> im finding my self copying code between classes makes everything very
>> sloppy...
>>
>> not sure when this bug will be fixed its over 3 months now still not
>> fixed..
>> (with couple of updates they got out)
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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: AppEngine no longer shows any content

2009-08-21 Thread Don Schwarz
To be clear, I meant that the fact that you're getting a 0-byte response
here (it is a 500, not a 200, correct?) will be fixed in the next release.

I don't know the cause of the actual exception.  Are you sure you're
including all of the necessary jars?  Are there any other relevant excepions
in your logs (perhaps logged at WARNING) ?

On Thu, Aug 20, 2009 at 2:01 PM, Don Schwarz  wrote:

> This will be fixed in the next release.  Sorry about the inconvenience.
>
>
> On Thu, Aug 20, 2009 at 1:58 PM, DrMorten <
> morten.dalgaard.niel...@gmail.com> wrote:
>
>>
>>
>> / returns HTTP-code 200 but no content (0 byte response), when I check
>> the logs I get the following stacktrace:
>>
>> Error for /
>> java.lang.NoClassDefFoundError: org/codehaus/groovy/antlr/
>> AntlrParserPlugin
>>at
>> org.codehaus.groovy.antlr.AntlrParserPluginFactory.createParserPlugin
>> (AntlrParserPluginFactory.java:27)
>>at
>> org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:247)
>>at org.codehaus.groovy.control.CompilationUnit$1.call
>> (CompilationUnit.java:160)
>>at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits
>> (CompilationUnit.java:798)
>>at org.codehaus.groovy.control.CompilationUnit.compile
>> (CompilationUnit.java:464)
>>at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
>> 278)
>>at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
>> 249)
>>at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
>> 244)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.compileGroovyPage
>> (GroovyPagesTemplateEngine.java:462)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.buildPageMetaInfo
>> (GroovyPagesTemplateEngine.java:427)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
>> (GroovyPagesTemplateEngine.java:309)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplateWithResource
>> (GroovyPagesTemplateEngine.java:293)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
>> (GroovyPagesTemplateEngine.java:183)
>>at
>>
>> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
>> (GroovyPagesTemplateEngine.java:198)
>>at
>>
>> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderWithTemplateEngine
>> (GroovyPageView.java:104)
>>at
>>
>> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderMergedOutputModel
>> (GroovyPageView.java:86)
>>at org.springframework.web.servlet.view.AbstractView.render
>> (AbstractView.java:257)
>>at
>>
>> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.renderViewForUrlMappingInfo
>> (UrlMappingsFilter.java:235)
>>at
>>
>> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal
>> (UrlMappingsFilter.java:188)
>>at org.springframework.web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java:76)
>>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> (ServletHandler.java:1084)
>>at
>> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent
>> (GrailsPageFilter.java:221)
>>at
>> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter
>> (GrailsPageFilter.java:126)
>>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> (ServletHandler.java:1084)
>>at
>>
>> org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal
>> (GrailsReloadServletFilter.java:101)
>>at org.springframework.web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java:76)
>>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> (ServletHandler.java:1084)
>>at
>>
>> org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal
>> (GrailsWebRequestFilter.java:65)
>>at org.springframework.web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java:76)
>>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> (ServletHandler.java:1084)
>>at
>>
>> org.codehaus.groovy.grails.plugins.resourcesfirst.ResourcesFirstFilter.doFilter
>> (ResourcesFirstFilter.java:45)
>>at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
>> (ServletHandler.java:1084)
>>at
>> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal
>> (CharacterEncodingFilter.java:96)
>>at org.springframework.web.filter.OncePerRequestFilter.doFilter
>> (OncePerRequestFilter.java:76)
>>at
>> org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate
>> (DelegatingFilterProxy.java:236)
>>at org.springframework.web.filter.DelegatingFilterProxy.doFilter
>> (DelegatingFilterProxy.java:167)
>>at or

[appengine-java] Re: AppEngine no longer shows any content

2009-08-21 Thread DrMorten

200 instead of 500 is nice. However all Jars were included in the
deployment. The deployment works in general but fails occasionally.

I normally get this error whent there is no Groovy installed on the
webserver.
If it helps perhaps there is one of the servers in the farm missing a
runtime.

But yes, there are infact to problems. one that i get 200 instead of
500.
and the second that i get 500 in the first place.

The application was up an running again without any new deployments
being done, just later that night.

/Morten

On Aug 21, 3:10 pm, Don Schwarz  wrote:
> To be clear, I meant that the fact that you're getting a 0-byte response
> here (it is a 500, not a 200, correct?) will be fixed in the next release.
>
> I don't know the cause of the actual exception.  Are you sure you're
> including all of the necessary jars?  Are there any other relevant excepions
> in your logs (perhaps logged at WARNING) ?
>
> On Thu, Aug 20, 2009 at 2:01 PM, Don Schwarz  wrote:
> > This will be fixed in the next release.  Sorry about the inconvenience.
>
> > On Thu, Aug 20, 2009 at 1:58 PM, DrMorten <
> > morten.dalgaard.niel...@gmail.com> wrote:
>
> >> / returns HTTP-code 200 but no content (0 byte response), when I check
> >> the logs I get the following stacktrace:
>
> >> Error for /
> >> java.lang.NoClassDefFoundError: org/codehaus/groovy/antlr/
> >> AntlrParserPlugin
> >>        at
> >> org.codehaus.groovy.antlr.AntlrParserPluginFactory.createParserPlugin
> >> (AntlrParserPluginFactory.java:27)
> >>        at
> >> org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:247)
> >>        at org.codehaus.groovy.control.CompilationUnit$1.call
> >> (CompilationUnit.java:160)
> >>        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits
> >> (CompilationUnit.java:798)
> >>        at org.codehaus.groovy.control.CompilationUnit.compile
> >> (CompilationUnit.java:464)
> >>        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> >> 278)
> >>        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> >> 249)
> >>        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> >> 244)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.compileGroovyPage
> >> (GroovyPagesTemplateEngine.java:462)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.buildPageMetaInfo
> >> (GroovyPagesTemplateEngine.java:427)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> >> (GroovyPagesTemplateEngine.java:309)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplateWithResource
> >> (GroovyPagesTemplateEngine.java:293)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> >> (GroovyPagesTemplateEngine.java:183)
> >>        at
>
> >> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> >> (GroovyPagesTemplateEngine.java:198)
> >>        at
>
> >> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderWithTemplateEngine
> >> (GroovyPageView.java:104)
> >>        at
>
> >> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderMergedOutputModel
> >> (GroovyPageView.java:86)
> >>        at org.springframework.web.servlet.view.AbstractView.render
> >> (AbstractView.java:257)
> >>        at
>
> >> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.renderViewForUrlMappingInfo
> >> (UrlMappingsFilter.java:235)
> >>        at
>
> >> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal
> >> (UrlMappingsFilter.java:188)
> >>        at org.springframework.web.filter.OncePerRequestFilter.doFilter
> >> (OncePerRequestFilter.java:76)
> >>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> >> (ServletHandler.java:1084)
> >>        at
> >> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent
> >> (GrailsPageFilter.java:221)
> >>        at
> >> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter
> >> (GrailsPageFilter.java:126)
> >>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> >> (ServletHandler.java:1084)
> >>        at
>
> >> org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal
> >> (GrailsReloadServletFilter.java:101)
> >>        at org.springframework.web.filter.OncePerRequestFilter.doFilter
> >> (OncePerRequestFilter.java:76)
> >>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> >> (ServletHandler.java:1084)
> >>        at
>
> >> org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal
> >> (GrailsWebRequestFilter.java:65)
> >>        at org.springframework.web.filter.OncePerRequestFilter.doFilter
> >> (OncePerRequestFilter.java:76)
> >>        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> >> (ServletHandl

[appengine-java] Re: Kawa servlet

2009-08-21 Thread tetsujin1979

Thank you, I double checked the web.xml and the xquery scripts are
being passed to the KawaPageServlet class:
  
KawaPageServlet
gnu.kawa.servlet.KawaPageServlet
  

  
KawaPageServlet
*.xquery
  

I've added the scripts to the appengine-web.xml file with the
following:



now, it appears that the scripts are being passed correctly, but I'm
getting the following permission exception:

java.lang.ExceptionInInitializerError
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown
Source)
at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
at java.lang.reflect.Field.get(Unknown Source)
at gnu.expr.ModuleContext.makeInstance(ModuleContext.java:60)
at gnu.expr.ModuleContext.findInstance(ModuleContext.java:83)
at gnu.kawa.servlet.KawaPageServlet.getModule(KawaPageServlet.java:
206)
at gnu.kawa.servlet.KawaPageServlet.run(KawaPageServlet.java:46)
at gnu.kawa.servlet.KawaServlet.doGet(KawaServlet.java:68)

Caused by: internal error
at gnu.expr.Compilation.setupLiterals(Compilation.java:2802)
at temp.(temp.xquery)
... 36 more
Caused by: java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessDeclaredMembers)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:128)

is it possible to grant the accessDeclaredMembers permission?

On Aug 20, 5:15 pm, Toby Reyelts  wrote:
> Can you double check your servlet mappings and make sure they are correct?
> Also, you'll need to modify your appengine-web.xml to exclude your scripts
> from  so they aren't served by default by our optimized static
> content servers. See our docs on static and resource
> files
> .
> On Wed, Aug 19, 2009 at 6:55 AM, tetsujin1979 wrote:
>
>
>
> > sorry, I should have added that I've checked for this on the "Will it
> > run on GAE" page, and it's not listed
>
> > On Aug 19, 11:54 am, tetsujin1979  wrote:
> > > Hi, I have a Kawa -http://www.gnu.org/software/kawa/-based servlet
> > > that uses XQuery to query some xml documents to produce an output,
> > > using the instructions here -
> >http://www.gnu.org/software/qexo/simple-xquery-webapp.html
>
> > > This runs fine on tomcat, but when I've tried to run the same web app
> > > on the GAE, any request just returns the raw xquery page, with no
> > > processing done.
>
> > > According to this page -
> >http://www.gnu.org/software/kawa/server/auto-servlet.html
> > > - "KawaPageServlet automatically compiles a script into a Java class.
> > > The class is internal to the server, and is not written out to disk"
> > > so could it be that the class is not getting compiled?
>
>
--~--~-~--~~~---~--~~
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: AppEngine no longer shows any content

2009-08-21 Thread Don Schwarz
Do you have a sample URL I could try?  I'm not aware of anything that would
cause us to return a 200 in response to an uncaught exception.

On Fri, Aug 21, 2009 at 8:23 AM, DrMorten  wrote:

>
> 200 instead of 500 is nice. However all Jars were included in the
> deployment. The deployment works in general but fails occasionally.
>
> I normally get this error whent there is no Groovy installed on the
> webserver.
> If it helps perhaps there is one of the servers in the farm missing a
> runtime.
>
> But yes, there are infact to problems. one that i get 200 instead of
> 500.
> and the second that i get 500 in the first place.
>
> The application was up an running again without any new deployments
> being done, just later that night.
>
> /Morten
>
> On Aug 21, 3:10 pm, Don Schwarz  wrote:
> > To be clear, I meant that the fact that you're getting a 0-byte response
> > here (it is a 500, not a 200, correct?) will be fixed in the next
> release.
> >
> > I don't know the cause of the actual exception.  Are you sure you're
> > including all of the necessary jars?  Are there any other relevant
> excepions
> > in your logs (perhaps logged at WARNING) ?
> >
> > On Thu, Aug 20, 2009 at 2:01 PM, Don Schwarz 
> wrote:
> > > This will be fixed in the next release.  Sorry about the inconvenience.
> >
> > > On Thu, Aug 20, 2009 at 1:58 PM, DrMorten <
> > > morten.dalgaard.niel...@gmail.com> wrote:
> >
> > >> / returns HTTP-code 200 but no content (0 byte response), when I check
> > >> the logs I get the following stacktrace:
> >
> > >> Error for /
> > >> java.lang.NoClassDefFoundError: org/codehaus/groovy/antlr/
> > >> AntlrParserPlugin
> > >>at
> > >> org.codehaus.groovy.antlr.AntlrParserPluginFactory.createParserPlugin
> > >> (AntlrParserPluginFactory.java:27)
> > >>at
> > >> org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:247)
> > >>at org.codehaus.groovy.control.CompilationUnit$1.call
> > >> (CompilationUnit.java:160)
> > >>at
> org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits
> > >> (CompilationUnit.java:798)
> > >>at org.codehaus.groovy.control.CompilationUnit.compile
> > >> (CompilationUnit.java:464)
> > >>at
> groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> > >> 278)
> > >>at
> groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> > >> 249)
> > >>at
> groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:
> > >> 244)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.compileGroovyPage
> > >> (GroovyPagesTemplateEngine.java:462)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.buildPageMetaInfo
> > >> (GroovyPagesTemplateEngine.java:427)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> > >> (GroovyPagesTemplateEngine.java:309)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplateWithResource
> > >> (GroovyPagesTemplateEngine.java:293)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> > >> (GroovyPagesTemplateEngine.java:183)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateEngine.createTemplate
> > >> (GroovyPagesTemplateEngine.java:198)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderWithTemplateEngine
> > >> (GroovyPageView.java:104)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderMergedOutputModel
> > >> (GroovyPageView.java:86)
> > >>at org.springframework.web.servlet.view.AbstractView.render
> > >> (AbstractView.java:257)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.renderViewForUrlMappingInfo
> > >> (UrlMappingsFilter.java:235)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal
> > >> (UrlMappingsFilter.java:188)
> > >>at org.springframework.web.filter.OncePerRequestFilter.doFilter
> > >> (OncePerRequestFilter.java:76)
> > >>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > >> (ServletHandler.java:1084)
> > >>at
> > >> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent
> > >> (GrailsPageFilter.java:221)
> > >>at
> > >> org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter
> > >> (GrailsPageFilter.java:126)
> > >>at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > >> (ServletHandler.java:1084)
> > >>at
> >
> > >>
> org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal
> > >> (GrailsReloadServletFilter.java:101)
> > >>at org.springframework.web.filter.OncePerRequestFilter.doFilter
> > >> (OncePerRequestFilter.java:76)
> > 

[appengine-java] Re: Launching a GWT app without the hosted mode browser

2009-08-21 Thread Miguel Méndez
If you are using App Engine and GWT, you could:

   - Do a GWT compile, if your test path includes GWT code,
   - Disable GWT on the project
   - Launch your web application again

Those changes will alter the launch to only use the devappserver without any
of the GWT stuff.

If you are not using App Engine you could create a new java launch
configuration that launches a simple servlet container like Jetty pointing
at your war directory.

2009/8/20 Cafesolo 

>
> Miguel,
>
> I'm still experiencing a long startup time. Is there any way to
> disable the hosted mode window?
>
> Regards,
> -- Cafesolo
>
> On Aug 20, 12:08 pm, Miguel Méndez  wrote:
> > 2009/8/20 Cafesolo 
> >
> >
> >
> > > Miguel,
> >
> > > I went to the launch configuration's GWT tab and cleared the URL
> > > field. Now when I launch my application the hosted browser doesn't
> > > show anymore, but the "Google Web Toolkit Hosted Mode" window still
> > > appears (this is the window with the "Hosted Mode", "Restart Server",
> > > "Collapse All", etc. buttons.)
> > > I also tried removing my GWT module from the "Available Modules" list
> > > in the launch configuration's GWT tab, but had the same effect.
> > > Any ideas?
> >
> > The hosted mode window will always start, but having no modules or
> browser's
> > active should not have a significant impact.  Are you still experiencing
> a
> > long startup time even after removing the URL, etc?
> >
> >
> >
> >
> >
> >
> >
> > > Regards,
> > > -- Cafesolo
> >
> > > On Aug 20, 10:21 am, Miguel Méndez  wrote:
> > > > The hosted mode browser is only launched if you specify a URL in the
> Web
> > > > Application launch configuration's GWT tab.  If you leave it blank it
> > > should
> > > > have the effect that you are looking for.
> >
> > > > 2009/8/20 Cafesolo 
> >
> > > > > Hi Robin,
> >
> > > > > Not exactly. Even if I hit the "compile" button, the hosted mode
> > > > > browser will still appear later when I launch the application.
> >
> > > > > I want to launch my application without opening the hosted mode
> > > > > browser so I can reduce the application start-up time when I'm
> > > > > debugging the non-GWT portions of my application.
> >
> > > > > Regards,
> > > > > -- Cafesolo
> >
> > > > > On Aug 20, 4:03 am, Zhi Le Zou  wrote:
> > > > > > Hi there,
> > > > > > The hosted browser has a "compile" button which compiles your
> code
> > > into
> > > > > > javascripts, and let you view your app in the native browser. Is
> that
> > > > > what
> > > > > > you want?
> >
> > > > > > 2009/8/20 Cafesolo 
> >
> > > > > > > Hello everyone!
> >
> > > > > > > I'm writing a GWT + GAE application, which has many pages, but
> only
> > > > > > > one actually uses GWT.
> >
> > > > > > > When I launch my application from Eclipse (using the Google
> plugin,
> > > of
> > > > > > > course) a hosted mode browser instance appears, which is fine
> for
> > > > > > > debugging the page that uses GWT. However, the hosted mode
> browser
> > > is
> > > > > > > not needed for debugging the non-GWT part of my app (which is
> about
> > > > > > > 90% of the code), and it adds a lot of startup time.
> >
> > > > > > > So my question is: Can I disable the hosted mode browser and
> still
> > > be
> > > > > > > able to launch my application from Eclipse using the App Engine
> > > > > > > development server? I don't care if I'm not able to run the
> page
> > > that
> > > > > > > uses GWT.
> >
> > > > > > > For the curious, I'm using Wicket 1.4 for the non-GWT part of
> the
> > > > > > > application.
> >
> > > > > > > Regards,
> > > > > > > -- Cafesolo
> >
> > > > > > --
> > > > > > Best Regards
> > > > > > Robin (邹志乐)
> >
> > > > --
> > > > Miguel
> >
> > --
> > Miguel
> >
>


-- 
Miguel

--~--~-~--~~~---~--~~
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: Kawa servlet

2009-08-21 Thread Toby Reyelts
This is a known problem with the dev_appserver that we're working on.
(Classes loaded by custom classloaders aren't granted the appropriate
permissions). Unfortunately, there's not a workaround for this, and you'll
need to test against our production servers.

On Fri, Aug 21, 2009 at 9:31 AM, tetsujin1979 wrote:

>
> Thank you, I double checked the web.xml and the xquery scripts are
> being passed to the KawaPageServlet class:
>  
>KawaPageServlet
>gnu.kawa.servlet.KawaPageServlet
>  
>
>  
>KawaPageServlet
>*.xquery
>  
>
> I've added the scripts to the appengine-web.xml file with the
> following:
> 
>
> 
> now, it appears that the scripts are being passed correctly, but I'm
> getting the following permission exception:
>
> java.lang.ExceptionInInitializerError
>at sun.misc.Unsafe.ensureClassInitialized(Native Method)
>at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown
> Source)
>at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
>at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
>at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
>at java.lang.reflect.Field.get(Unknown Source)
>at gnu.expr.ModuleContext.makeInstance(ModuleContext.java:60)
>at gnu.expr.ModuleContext.findInstance(ModuleContext.java:83)
>at gnu.kawa.servlet.KawaPageServlet.getModule(KawaPageServlet.java:
> 206)
>at gnu.kawa.servlet.KawaPageServlet.run(KawaPageServlet.java:46)
>at gnu.kawa.servlet.KawaServlet.doGet(KawaServlet.java:68)
> 
> Caused by: internal error
>at gnu.expr.Compilation.setupLiterals(Compilation.java:2802)
>at temp.(temp.xquery)
>... 36 more
> Caused by: java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessDeclaredMembers)
>at java.security.AccessControlContext.checkPermission(Unknown
> Source)
>at java.security.AccessController.checkPermission(Unknown Source)
>at java.lang.SecurityManager.checkPermission(Unknown Source)
>at com.google.appengine.tools.development.DevAppServerFactory
> $CustomSecurityManager.checkPermission(DevAppServerFactory.java:128)
>
> is it possible to grant the accessDeclaredMembers permission?
>
> On Aug 20, 5:15 pm, Toby Reyelts  wrote:
> > Can you double check your servlet mappings and make sure they are
> correct?
> > Also, you'll need to modify your appengine-web.xml to exclude your
> scripts
> > from  so they aren't served by default by our optimized
> static
> > content servers. See our docs on static and resource
> > files<
> http://code.google.com/appengine/docs/java/config/appconfig.html#Stat...>
> > .
> > On Wed, Aug 19, 2009 at 6:55 AM, tetsujin1979  >wrote:
> >
> >
> >
> > > sorry, I should have added that I've checked for this on the "Will it
> > > run on GAE" page, and it's not listed
> >
> > > On Aug 19, 11:54 am, tetsujin1979  wrote:
> > > > Hi, I have a Kawa -http://www.gnu.org/software/kawa/-based servlet
> > > > that uses XQuery to query some xml documents to produce an output,
> > > > using the instructions here -
> > >http://www.gnu.org/software/qexo/simple-xquery-webapp.html
> >
> > > > This runs fine on tomcat, but when I've tried to run the same web app
> > > > on the GAE, any request just returns the raw xquery page, with no
> > > > processing done.
> >
> > > > According to this page -
> > >http://www.gnu.org/software/kawa/server/auto-servlet.html
> > > > - "KawaPageServlet automatically compiles a script into a Java class.
> > > > The class is internal to the server, and is not written out to disk"
> > > > so could it be that the class is not getting compiled?
> >
> >
> >
>

--~--~-~--~~~---~--~~
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: Class not being enhanced

2009-08-21 Thread Rajeev Dayal
Hi,
Glad everything is working for you. Out of curiosity, which folder did you
have to add? By default, your java src folder should have been present in
that list. Did you have another source root which was not listed
automatically?


Thanks,
Rajeev

On Fri, Aug 21, 2009 at 12:53 AM, jd  wrote:

>
> Figured it out:
>
> On my mac the enhancement log goes to /var/folders/T4/
> T4W7RbfJF0CmVJO2UEnIIU+++TI/-Tmp-/
>
> Also, to fix my problem I just needed to add a new folder to in
> Eclipse to the ORM settings panel.
>
> Cheers,
>
> John
> >
>

--~--~-~--~~~---~--~~
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: Performance optimization of insert into datastore (cpu_ms/api_cpu_ms showing red)

2009-08-21 Thread Don Schwarz
What is your app id?  Do you have a large number of indexes defined for this
entity kind?

FYI, it's certainly a good idea to optimize for performance, but I wouldn't
worry too much about the particular point at which warnings appear in the
request logs.  These are just guidelines to let you know which requests are
consuming the most CPU.  If you're only planning to update these entities on
a fraction of your requests then the overall CPU cost should not be too
high.  However, if your application is doing a lot of writes then by all
means, try to optimize this (e.g. by reducing the number of indexes, or
perhaps by reducing the number of columns if you don't query them
independently).

On Fri, Aug 21, 2009 at 6:55 AM, sree  wrote:

>
> In a test app I have created, I am able to insert only 2 rows per
> request (for 1 entity with 10 properties only) into the datastore by
> using low-level api without getting any warnings for cpu_ms /
> api_cpu_ms usage.
>
> However if I try to insert 3 rows or more (again only 1 entity being
> inserted), the cpu gets used for more than 1s thereby generating a
> warning or error from GAE.
>
> Stats from GAE log:
>
> For inserting 2 records -> /insert.do 200 77ms 655cpu_ms 643api_cpu_ms
> (everything ok)
>
> For inserting 3 records -> /insert.do 200 134ms 979cpu_ms
> 964api_cpu_ms (yellow warning)
>
> For inserting 10 records -> /insert.do 200 178ms 3249cpu_ms
> 3216api_cpu_ms (red warning)
>
> How to optimize the ‘cpu_ms and api_cpu_ms’ usage? Can GAE perform
> only as many operations as 2 inserts into datastore if we want to keep
> within the warning levels?
>
> Can you please provide some feedback as to whether I am doing anything
> wrong in code or have not used a good practice to achieve better
> performance. Thanks in advance.
>
> Code in servlet (parsing and split operations have been benchmarked
> and they are not causing any adverse impact on performance):
>
> Pattern p1 = Pattern.compile(",");  // created as servlet instance
> variable
>
> public void doPost(HttpServletRequest req, HttpServletResponse res)
> throws ServletException, IOException
> {
>try {
>
>DatastoreService datastore =
> DatastoreServiceFactory.getDatastoreService();
>List entity = new ArrayList();
>
>for (int i = 0; i < n; i++) {
>
>String[] record =
> p1.split("1,tester,1.0,1.0,1.0,1.0,1.0,1.0");
>
>data1 = Long.parseLong(record[0]);
>data2 = record[1];
>data3 = Double.parseDouble(record[2]);
>data4 = Double.parseDouble(record[3]);
>data5 = Double.parseDouble(record[4]);
>data6 = Double.parseDouble(record[5]);
>data7 = Double.parseDouble(record[6]);
>data8 = Float.parseFloat(record[7]);
>
>Entity e = new
> Entity(DetailsBean.class.getSimpleName());
>e.setProperty("column1", i);
>e.setProperty("column2", data2);
>e.setProperty("column3", i + data3);
>e.setProperty("column4", i + data4);
>e.setProperty("column5", i + data5);
>e.setProperty("column6", i + data6);
>e.setProperty("column7", i + data7);
>e.setProperty("column8", i + data8);
>e.setProperty("crDate", new Date());
>e.setProperty("modDate", new Date());
>
>entity.add(e);
>
>}
>
>datastore.put(entity);
>
>} catch (Exception e) {
>e.printStackTrace();
>} finally {
>persistenceManager.close();
>}
> }
>
> Entity bean code:
>
> package com.pojo;
>
> import java.io.Serializable;
> import java.util.Date;
> import java.util.List;
>
> import javax.jdo.annotations.IdGeneratorStrategy;
> import javax.jdo.annotations.IdentityType;
> import javax.jdo.annotations.NotPersistent;
> import javax.jdo.annotations.PersistenceCapable;
> import javax.jdo.annotations.Persistent;
> import javax.jdo.annotations.PrimaryKey;
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class DetailsBean implements Serializable {
>
>private static final long serialVersionUID = 1L;
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Long slno;
>
>@Persistent
>private long column1;
>
>@Persistent
>private String column2;
>
>@Persistent
>private double column3;
>
>@Persis

[appengine-java] Re: Local transactions do not rollback

2009-08-21 Thread objectuser

That's crazy, John.  Is all the data still there or only some of it?
Also, how is your transaction being demarcated?

On Aug 21, 1:41 am, jd  wrote:
> Hi,
>
> I am using the local sdk datastore to save several thousand of objects
> and when an exception occurs the data is not rolled-back and the data
> is still in the datastore.
>
> I can see in the log
>
> INFO: Time to persist datastore: 1140 ms
>
> which seems to indicate the data is being flushed to disk.  Is this
> documented somewhere?
>
> Thanks,
>
> John
--~--~-~--~~~---~--~~
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: query performance

2009-08-21 Thread objectuser

I agree with Iain: it depends on how many items are in the lists.  But
for large lists, I don't think it would work out very well.

Are the values in listA and listB stored?  That might give you more
options.

On Aug 20, 8:15 pm, Ray Li  wrote:
> Hi,
>
> I have a query filter on an entity Person that person.name be in listA
> and person.country in listB. As far as I can see, there're 2 options:
> 1. Create a query "select t from Person t where t.name = :listAElement
> and t.country = :listBElement" and run it listA.size() * listB.size()
> times, then combine the result sets.
> 2. Create a query "select t from Person t where t.name =:listAElement"
> and run it once, then for each entity in the resultset, check if its
> country is in listB.
>
> For option 1, I am not sure about querying the datastore too many
> times will case a serious performance issue.
>
> For option 2, I may have to get all results back, may be several
> several thousands, and this may be not achievable, is it?
>
> Any help is highly appreciated.
>
> Thanks,
> Ray
--~--~-~--~~~---~--~~
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: Problem deploying application with jsps

2009-08-21 Thread Rajeev Dayal
Hi Abhinav,
Yes, you are right - we really should just invoke javac.exe on Windows. We
were assuming that javac would not be present in the bin directory on a
Windows machine. Feel free to file a bug about this if you'd like - it's not
too hard to fix, but as it's a corner case, it's not going to be at the top
of our priority list.


Thanks,
Rajeev

On Fri, Aug 21, 2009 at 1:29 AM, Abhinav Lele wrote:

> Hi,
>
> I found the problem, albeit it is a silly one. I had a plugin named
> kawigiedit ( @ Topcoder ) which had created a javac folder in the bin
> directory. So when eclipse tried to deploy to appengine it tried to open a
> folder instead of the binary. I removed the directory and things worked just
> fine. This brings one thing to my mind, shouldn't the eclipse plugin evoke
> javac.exe instead of javac which might be appropriate for *nix systems.
>
>
> --
> Abhinav
>
>
> On Thu, Aug 20, 2009 at 11:58 PM, Abhinav Lele wrote:
>
>> Hi Keith,
>>
>> You were right. I created a Java Project and ran the following code
>>
>> package testB;
>>
>> import java.io.IOException;
>>
>> public class testJ {
>>
>> /**
>>  * @param args
>>  * @throws IOException
>>  */
>> public static void main(String[] args) throws IOException {
>>
>> ProcessBuilder proc = new
>> ProcessBuilder("D:\\usr\\dev\\jdk16_12\\bin\\javac"
>> );
>> proc.start();
>> }
>>
>> }
>>
>> and I got a Exception in thread "main" java.io.IOException: Cannot run
>> program "D:\usr\dev\jdk16_12\bin\javac": CreateProcess error=5, Access is
>> denied
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
>>  at testB.testJ.main(testJ.java:15)
>> Caused by: java.io.IOException: CreateProcess error=5, Access is denied
>> at java.lang.ProcessImpl.create(Native Method)
>> at java.lang.ProcessImpl.(ProcessImpl.java:81)
>> at java.lang.ProcessImpl.start(ProcessImpl.java:30)
>> at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
>> ... 1 more
>>
>> I'll try and google this out. If someone has solution for this please let
>> me know.
>>
>> --
>> Abhinav
>>
>>
>> On Thu, Aug 20, 2009 at 8:37 PM, Keith Platfoot wrote:
>>
>>> Hm, that is odd.  Since you're able to use javac from the command line
>>> and via appcfg, I'm assuming the problem does lie with Eclipse and the
>>> permissions it was launched with.
>>> Would it be possible for you to write a small test Java app that uses
>>> ProcessBuilderto
>>>  invoke javac?  If your test app fails with an Access Denied error, then
>>> at least we can rule out the plugin and App Engine as the source of the
>>> problem.  If that is indeed the case, you could try installing another JDK
>>> and Eclipse instance using your user account, and see if that fixes things.
>>>
>>> Keith
>>>
>>> On Wed, Aug 19, 2009 at 2:35 PM, Abhinav Lele wrote:
>>>
 Hi Keith,

 Well I was able to upload it using appcfg from the command line :) ..
 Though I wonder why eclipse is getting a access denied error.
 My user account has administrator privileges.

 --
 Abhinav


 On Wed, Aug 19, 2009 at 8:49 PM, Keith Platfoot 
 wrote:

> Hi Abhinav,
> I suspect the problem may be exactly as the error message implies:
> access to javac is being denied because of its configured permissions.
>
> To test that theory, could you try running javac from a command prompt,
> using the path from the exception message?  If you are able to run it, 
> javac
> should display its usage options (since you didn't specify any arguments).
>  However, if you also get an Access Denied error from the command line, 
> then
> the problem is not with Eclipse or the plugin, but with the permissions on
> javac.  One scenario that might produce this error would be if you 
> installed
> the JDK as an Administrator and then run javac (either manually from the
> command line or indirectly via Eclipse) as a regular (non-admin) user.
>
> Let me know if you are able to reproduce the problem from the command
> line.  Thanks,
>
> Keith
>
> On Wed, Aug 19, 2009 at 5:03 AM, Abhinav Lele 
> wrote:
>
>> Hi,
>>
>> I am using Eclipse 3.5 ( Galilieo ) on Windows XP to deploy my
>> application. It runs fine on my local machine but when I try to deploy 
>> it to
>> appengine it is giving me the following error.
>>
>>
>> Creating staging directory
>> Scanning for jsp files.
>> Compiling jsp files.
>> Compiling java files.
>> java.io.IOException: Cannot run program
>> "D:\usr\dev\jdk16_12\bin\javac": CreateProcess error=5, Access is denied
>>
>> Debugging information may be found in C:\Documents and
>> Settings\user\Local Settings\Temp\appengine-deploy6738175632278023548.log
>>
>> appengine-deploy6738175632278023548.log

[appengine-java] Re: Local transactions do not rollback

2009-08-21 Thread Max Ross
Also, which version of the sdk are you using?  Up until the most recent
release the local datastore was not actually transactional.

On Fri, Aug 21, 2009 at 8:37 AM, objectuser  wrote:

>
> That's crazy, John.  Is all the data still there or only some of it?
> Also, how is your transaction being demarcated?
>
> On Aug 21, 1:41 am, jd  wrote:
> > Hi,
> >
> > I am using the local sdk datastore to save several thousand of objects
> > and when an exception occurs the data is not rolled-back and the data
> > is still in the datastore.
> >
> > I can see in the log
> >
> > INFO: Time to persist datastore: 1140 ms
> >
> > which seems to indicate the data is being flushed to disk.  Is this
> > documented somewhere?
> >
> > Thanks,
> >
> > John
> >
>

--~--~-~--~~~---~--~~
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] ClassCastException: [Object cannot be cast to [[Object

2009-08-21 Thread Régis Décamps

Hi

I'm new to GAE, JSF and JDO, so I've probably made a mistake... But I
don't have the same behaviour on my developemebt environment and on
GAE servers.

I've made a very simple application (hardly more than a Hello world).
At this point it's like a guest book. You write a message, and the
list of all messages is displayed.

Everything works fine on my dev environment (I've published my code on
code.google.com)

But on the GAE servers, the creation of a new message fails with

/faces/index.jsp
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
[[Ljava.lang.Object;
at javax.faces.component.UIComponentBase.processRestoreState
(UIComponentBase.java:1054)
at javax.faces.component.UIComponentBase.processRestoreState
(UIComponentBase.java:1044)
at javax.faces.component.UIComponentBase.processRestoreState
(UIComponentBase.java:1044)
at com.sun.faces.application.StateManagerImpl.restoreView
(StateManagerImpl.java:336)
 ...

Any idea?
I suspect JSF 1.1 but I have no clue actually.

Since I expect the same behaviour between the development environment
and the production environment, I have filed a bug report, where you
can have more details. 
http://code.google.com/p/googleappengine/issues/detail?id=2009
(it's a pure coincidence if the issue number is current year ;-) )

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



[appengine-java] Re: GAE Roadmap: Hibernate, sql etc

2009-08-21 Thread Jason (Google)
Hi Marc. Yes, there is a product roadmap available:
http://code.google.com/appengine/docs/roadmap.html

As leszek and Andy have said, App Engine is a fundamentally different beast
than your typical J2EE server + RDBMS and you will have to compromise some
convenience in order to achieve the level of scalability that App Engine
offers. That said, App Engine for Java was designed from the beginning with
Java standards in mind, including the servlet API, JDO/JPA, JCache, and so
forth to ease the learning curve for J2EE developers, and we are continually
looking at ways to make the developer experience even better. If you have
any specific suggestions, I encourage you to post new feature requests to
the public tracker which we use, in part, to prioritize upcoming features.

http://code.google.com/p/googleappengine/issues/list

- Jason

On Thu, Aug 20, 2009 at 12:34 AM, mschipperheyn wrote:

>
> Hi all,
>
> I'm just wondering if there is a roadmap available and if and when
> Hibernate, sql etc will be supported.
> Will there come a time soon when choosing GAE will no longer be a
> choice of "if we use it, we have to dumb down the application because
> x (e.g. Hibernate), y (e.g. SQL) and z (e.g. Lucene, file system
> access) can't be used anymore"?
>
> The concept is great but it seems that the limitations are gigantic.
> And for a high end application I feel using the plain vanilla usually
> doesn't cut it. project Has anyone done any big java-projects yet on
> this platform?
>
> Cheers,
>
> Marc
> >
>

--~--~-~--~~~---~--~~
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: Problem deploying application with jsps

2009-08-21 Thread Abhinav Lele
Hi,

Added a bug report
http://code.google.com/p/googleappengine/issues/detail?id=2010 .
Please enhance the bug report if needed.

--
Abhinav

On Fri, Aug 21, 2009 at 9:06 PM, Rajeev Dayal  wrote:

>
> Yes, you are right - we really should just invoke javac.exe on Windows. We
> were assuming that javac would not be present in the bin directory on a
> Windows machine. Feel free to file a bug about this if you'd like - it's not
> too hard to fix, but as it's a corner case, it's not going to be at the top
> of our priority list.
>



-- 


Ted Turner   -
"Sports is like a war without the killing."

--~--~-~--~~~---~--~~
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] Advanced Encryption Standard(AES) Unlimited Strength Cryptography

2009-08-21 Thread Jeff

Does the Google App Engine for Java have unlimited strength
cryptography? I would like to use 192- and 256-bit key sizes instead
of export restricted 128-bit. On my local workstation, I updated the
"jre6.01/lib/security" directory with the appropriate unlimited
strength cryptography files.

Jeff
--~--~-~--~~~---~--~~
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: Problem issuing an HTTP GET request to an App Engine Page

2009-08-21 Thread Lisa

Update: The issue appears to be in the page I am attempting to connect
to, not the fact that it is an App Engine Page.  This is the code I
have, does anyone know of something I am missing that is necessary to
return information?

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.setContentType("text/html");

PrintWriter out = resp.getWriter();
out.println("");
out.println(" Request Type: GET ");
out.println("");
out.println("Hello, world.  This is a response to a get 
request.");
out.println("");
out.flush();
out.close();
}


On Aug 20, 3:53 pm, Lisa  wrote:
> Could anyone explain why issuing an HTTP GET request to an App Engine
> Page would fail?
>
> The following code accessing a page causes an IOException with an
> Unknown error message:
> String urlstring = "http://et-demo.appspot.com/subscribe";;
> URL url = new URL(urlstring);
> BufferedReader reader = new BufferedReader(new InputStreamReader
> (url.openStream()));
>
> And the following code works (all I changed is the url string):
> String urlstring = "http://www.google.com";;
> URL url = new URL(urlstring);
> BufferedReader reader = new BufferedReader(new InputStreamReader
> (url.openStream()));
>
> The page I am trying to access does exist and when I go to it in my
> web browser it is pretty fast.  Does anyone know why this would
> happen?  Does it have something to do with App Engine?
>
> Thanks,
> Lisa
--~--~-~--~~~---~--~~
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: ClassCastException: [Object cannot be cast to [[Object

2009-08-21 Thread Toby Reyelts
Do you have the source code for the version of JSF you're using? A quick
look at 
1.1.4doesn't
show a cast to Object[][]. Also, what binary of JSF are you
deploying with?

On Fri, Aug 21, 2009 at 1:55 PM, Régis Décamps  wrote:

>
> Hi
>
> I'm new to GAE, JSF and JDO, so I've probably made a mistake... But I
> don't have the same behaviour on my developemebt environment and on
> GAE servers.
>
> I've made a very simple application (hardly more than a Hello world).
> At this point it's like a guest book. You write a message, and the
> list of all messages is displayed.
>
> Everything works fine on my dev environment (I've published my code on
> code.google.com)
>
> But on the GAE servers, the creation of a new message fails with
>
> /faces/index.jsp
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
> [[Ljava.lang.Object;
>at javax.faces.component.UIComponentBase.processRestoreState
> (UIComponentBase.java:1054)
>at javax.faces.component.UIComponentBase.processRestoreState
> (UIComponentBase.java:1044)
>at javax.faces.component.UIComponentBase.processRestoreState
> (UIComponentBase.java:1044)
>at com.sun.faces.application.StateManagerImpl.restoreView
> (StateManagerImpl.java:336)
>  ...
>
> Any idea?
> I suspect JSF 1.1 but I have no clue actually.
>
> Since I expect the same behaviour between the development environment
> and the production environment, I have filed a bug report, where you
> can have more details.
> http://code.google.com/p/googleappengine/issues/detail?id=2009
> (it's a pure coincidence if the issue number is current year ;-) )
>
> Régis
> >
>

--~--~-~--~~~---~--~~
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: 401 Unauthorized Must authenticate first. I can't upload my project

2009-08-21 Thread Jason (Google)
Your app configuration file looks good, so there must be something more
insidious. Are you trying to deploy from Eclipse or using Ant? Have you
tried both? And are you behind a proxy server by any chance?

- Jason

On Thu, Aug 20, 2009 at 1:10 AM, bb1987 bb1987  wrote:

>
> My web.xml file contains:
> 
> http://appengine.google.com/ns/1.0";>
>buildfunnyface
>1
>
>
> value="WEB-INF/
> logging.properties"/>
>
> 
>
> And my application ID is : buildfunnyface
>
> On Aug 19, 11:24 am, Jason  wrote:
> > What is your application ID? Also, can you paste your appengine-
> > web.xml file?
> >
> > Thanks,
> > - Jason
> >
> > On Aug 18, 5:31 am, bb1987 bb1987  wrote:
> >
> > > Hello
> >
> > > Today I have received "Your Google App Engine Account has been
> > > enabled!" email because I couldn't activated via sms.
> >
> > > Then I registered my application. My project's application id and
> > > registered application is same.
> >
> > > I read (Get "401Unauthorized" on deploying ) discussion and checked
> > > all settings.
> > > But it always says "401Unauthorized"
> >
> > > I don't know what is wrong. Please give me hint.
> >
> >
> >
>

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



[appengine-java] Re: how to store raster data

2009-08-21 Thread Jason (Google)
Hi Ivan. Currently, any data written to App Engine's datastore can be at
most 1 MB, so if you're planning to store large files in App Engine, you'll
have to split them into < 1 MB chunks and store these chunks as separate
entities. There are third-party abstraction frameworks that do this for you,
notably:

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

Note that support for serving and storing large files is on the App Engine
roadmap:

http://code.google.com/appengine/docs/roadmap.html

- Jason

On Thu, Aug 20, 2009 at 6:27 AM, Ivan Lucena  wrote:

> Hi there,
> Is there any available API for storing large raster data in GAE?
>
> By raster data I mean geo-referenced satellite sensors data. By large I
> mean several years of observation.
>
> Thanks in advance,
>
> Ivan
>
>
>
> >
>

--~--~-~--~~~---~--~~
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] DatastoreService.put(Iterable) success/failure indicators

2009-08-21 Thread Vince Bonfanti

I think I've seen this question somewhere else, but I've searched and
can't seem to find it, so I apologize in advance is this is a
duplicate.

I'm using the datastore low-level API to do a batch put via
DatastoreService.put(Iterable). Some questions related to this
method:

  1. If this method succeeds (does not throw an exception) does that
guarantee that all entities were written to the datastore
successfully?

  2. If this method fails (throws a DatastoreFailureException) does
that mean that none of the entities were written, or that some were
and some weren't? If the latter, is there any way to know which
entities were successfully written and which weren't?

  3. If I invoke DatastoreService.put(Transaction, Iterable)
and it throws a DatastoreFailureException, does invoking
Transaction.rollback() guarantee that none of the entities are written
to the datastore? (I'm pretty sure the answer to this one must be
"yes").

When doing a batch put, I need to be able to guarantee that all
entities are either written, or all not written. I think the best way
is to use a transaction, but thought I'd ask to make sure my
understanding of how this works is correct. Thanks.

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



[appengine-java] Re: Memcache Service Enhancement

2009-08-21 Thread Vince Bonfanti

I'd be very interested in a facility that would allow you to batch
arbitrary memcache operations...if it meant performance savings. If
the performance was the same as doing the operations individually then
it wouldn't be as interesting.

Vince

On Thu, Aug 13, 2009 at 10:02 AM, Martyn wrote:
>
> I have developed a simple wrapper to aid batch processing.  This is
> just an interface to a managed Map that is later used for a putAll.
>
> However, one of the operations I would like to batch is an increment,
> not a put. The current putAll does not support this.
>
> It seems pretty clear that a generic putAll could take a set of
> Operation objects:
>
> GetOperation(Key);
> PutOperation(Key, Value);
> IncrementOperation(Key, Value);
>
> This would enable far more flexibility, with each Operation providing
> an isComplete and value method, for example.
>
> The only guarantee need be the operation sequence... at least that is
> all I need to support my use of increment as a kind of shared memory
> semaphore ;-)
>
> Is anyone else interested in something similar?
>
> - Martyn
>

--~--~-~--~~~---~--~~
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: 401 Unauthorized Must authenticate first. I can't upload my project

2009-08-21 Thread Jason (Google)
This is probably a given, but are you certain that you're entering the
correct credentials at the username and password prompt? The Google account
has to match the one that you used to register the application (the same one
that you're posting with).
- Jason

On Fri, Aug 21, 2009 at 11:53 AM, Jason (Google) wrote:

> Your app configuration file looks good, so there must be something more
> insidious. Are you trying to deploy from Eclipse or using Ant? Have you
> tried both? And are you behind a proxy server by any chance?
>
> - Jason
>
> On Thu, Aug 20, 2009 at 1:10 AM, bb1987 bb1987  wrote:
>
>>
>> My web.xml file contains:
>> 
>> http://appengine.google.com/ns/1.0";>
>>buildfunnyface
>>1
>>
>>
>>> value="WEB-INF/
>> logging.properties"/>
>>
>> 
>>
>> And my application ID is : buildfunnyface
>>
>> On Aug 19, 11:24 am, Jason  wrote:
>> > What is your application ID? Also, can you paste your appengine-
>> > web.xml file?
>> >
>> > Thanks,
>> > - Jason
>> >
>> > On Aug 18, 5:31 am, bb1987 bb1987  wrote:
>> >
>> > > Hello
>> >
>> > > Today I have received "Your Google App Engine Account has been
>> > > enabled!" email because I couldn't activated via sms.
>> >
>> > > Then I registered my application. My project's application id and
>> > > registered application is same.
>> >
>> > > I read (Get "401Unauthorized" on deploying ) discussion and checked
>> > > all settings.
>> > > But it always says "401Unauthorized"
>> >
>> > > I don't know what is wrong. Please give me hint.
>> >
>> >
>> >>
>>
>

--~--~-~--~~~---~--~~
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: 401 Unauthorized Must authenticate first. I can't upload my project

2009-08-21 Thread Cyrano

I have the exact same problem. Recently registered, got the email from
Google, want to deploy a Java App from Eclipse, error message as
above. Checked credentials and app name info many times. Maybe there
is still the limit of 10,000 developers getting access to Java on App
Engine?
-cyr

On 21 Aug., 20:56, "Jason (Google)"  wrote:
> This is probably a given, but are you certain that you're entering the
> correct credentials at the username and password prompt? The Google account
> has to match the one that you used to register the application (the same one
> that you're posting with).
> - Jason
>
> On Fri, Aug 21, 2009 at 11:53 AM, Jason (Google) wrote:
>
> > Your app configuration file looks good, so there must be something more
> > insidious. Are you trying to deploy from Eclipse or using Ant? Have you
> > tried both? And are you behind a proxy server by any chance?
>
> > - Jason
>
> > On Thu, Aug 20, 2009 at 1:10 AM, bb1987 bb1987  wrote:
>
> >> My web.xml file contains:
> >> 
> >> http://appengine.google.com/ns/1.0";>
> >>        buildfunnyface
> >>        1
> >>        
> >>        
> >>                 >> value="WEB-INF/
> >> logging.properties"/>
> >>        
> >> 
>
> >> And my application ID is : buildfunnyface
>
> >> On Aug 19, 11:24 am, Jason  wrote:
> >> > What is your application ID? Also, can you paste your appengine-
> >> > web.xml file?
>
> >> > Thanks,
> >> > - Jason
>
> >> > On Aug 18, 5:31 am, bb1987 bb1987  wrote:
>
> >> > > Hello
>
> >> > > Today I have received "Your Google App Engine Account has been
> >> > > enabled!" email because I couldn't activated via sms.
>
> >> > > Then I registered my application. My project's application id and
> >> > > registered application is same.
>
> >> > > I read (Get "401Unauthorized" on deploying ) discussion and checked
> >> > > all settings.
> >> > > But it always says "401Unauthorized"
>
> >> > > I don't know what is wrong. Please give me hint.
--~--~-~--~~~---~--~~
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] Unable to upload

2009-08-21 Thread Randall

I get the message "Email  and password do not match" when I
try to deploy to AppEngine.  However I use the same username and
password to log into the appengine website successfully.  I get the
same error message whether I deploy using the Netbeans plug-in or
appcfg from the command line.

Also, I have created two applications but they do not appear when I
log into appengine.google.com.  I have verified that the application
names were really created by checking their (non)availibility.

Does anyone know why my username/password won't work for upload when
it works for log 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: 401 Unauthorized Must authenticate first. I can't upload my project

2009-08-21 Thread dirk_ehrh...@yahoo.de

I have the exact same problem. Trying to load an Java app, wondering
whether there is still the limitation to 10.000 developers?
-dirk

On 21 Aug., 20:56, "Jason (Google)"  wrote:
> This is probably a given, but are you certain that you're entering the
> correct credentials at the username and password prompt? The Google account
> has to match the one that you used to register the application (the same one
> that you're posting with).
> - Jason
>
> On Fri, Aug 21, 2009 at 11:53 AM, Jason (Google) wrote:
>
> > Your app configuration file looks good, so there must be something more
> > insidious. Are you trying to deploy from Eclipse or using Ant? Have you
> > tried both? And are you behind a proxy server by any chance?
>
> > - Jason
>
> > On Thu, Aug 20, 2009 at 1:10 AM, bb1987 bb1987  wrote:
>
> >> My web.xml file contains:
> >> 
> >> http://appengine.google.com/ns/1.0";>
> >>        buildfunnyface
> >>        1
> >>        
> >>        
> >>                 >> value="WEB-INF/
> >> logging.properties"/>
> >>        
> >> 
>
> >> And my application ID is : buildfunnyface
>
> >> On Aug 19, 11:24 am, Jason  wrote:
> >> > What is your application ID? Also, can you paste your appengine-
> >> > web.xml file?
>
> >> > Thanks,
> >> > - Jason
>
> >> > On Aug 18, 5:31 am, bb1987 bb1987  wrote:
>
> >> > > Hello
>
> >> > > Today I have received "Your Google App Engine Account has been
> >> > > enabled!" email because I couldn't activated via sms.
>
> >> > > Then I registered my application. My project's application id and
> >> > > registered application is same.
>
> >> > > I read (Get "401Unauthorized" on deploying ) discussion and checked
> >> > > all settings.
> >> > > But it always says "401Unauthorized"
>
> >> > > I don't know what is wrong. Please give me hint.
--~--~-~--~~~---~--~~
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: Problem issuing an HTTP GET request to an App Engine Page

2009-08-21 Thread Lisa

Solved.  For some reason (I have no idea why) it didn't work doing an
HTTP GET request to a page on the same application.  I copy and pasted
the code over to another Google App application and everything worked
fine.

Best,
Lisa

On Aug 21, 1:38 pm, Lisa  wrote:
> Update: The issue appears to be in the page I am attempting to connect
> to, not the fact that it is an App Engine Page.  This is the code I
> have, does anyone know of something I am missing that is necessary to
> return information?
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException {
>                 resp.setContentType("text/html");
>
>                 PrintWriter out = resp.getWriter();
>                 out.println("");
>                 out.println(" Request Type: GET 
> ");
>                 out.println("");
>                 out.println("Hello, world.  This is a response to a get 
> request.");
>                 out.println("");
>                 out.flush();
>                 out.close();
>         }
>
> On Aug 20, 3:53 pm, Lisa  wrote:
>
> > Could anyone explain why issuing an HTTP GET request to an App Engine
> > Page would fail?
>
> > The following code accessing a page causes an IOException with an
> > Unknown error message:
> > String urlstring = "http://et-demo.appspot.com/subscribe";;
> > URL url = new URL(urlstring);
> > BufferedReader reader = new BufferedReader(new InputStreamReader
> > (url.openStream()));
>
> > And the following code works (all I changed is the url string):
> > String urlstring = "http://www.google.com";;
> > URL url = new URL(urlstring);
> > BufferedReader reader = new BufferedReader(new InputStreamReader
> > (url.openStream()));
>
> > The page I am trying to access does exist and when I go to it in my
> > web browser it is pretty fast.  Does anyone know why this would
> > happen?  Does it have something to do with App Engine?
>
> > Thanks,
> > Lisa
>
>
--~--~-~--~~~---~--~~
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] JDO problem persisting int[]

2009-08-21 Thread Owen Powell

Hi everyone,

I can't seem to persist an int[] field (but an int works fine).

My object has three fields: a key, an int, and an array of ints. When
I create and add the object to the datastore, all the fields are
persisted correctly. However, when I later try to update the object,
the int field updates correctly but the array does not.

Is this how the datastore is supposed to work? Or is this a bug?

Here is the datastore code, the object code follows.

-- DATASTORE CODE ---

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

// 1. CREATE and SAVE the TestObj (x = 1), storing the keyId.
PersistenceManager pmt = PMF.getPersistenceManager();
TestObj to = new TestObj();
String keyIdT = null;

try {
pmt.makePersistent(to);
keyIdT = to.getKey();
} catch (Exception e) {
e.printStackTrace();
}   finally {
pmt.close();
}

// 2. CHECK that TestObj was saved correctly (x = 1), and then UPDATE
fields (so that x = 2).

pmt = PMF.getPersistenceManager();
TestObj to2 = null;

try {
to2 = (TestObj)pmt.getObjectById(TestObj.class, keyIdT);
to2.update();
} catch (Exception e) {
e.printStackTrace();
}   finally {
pmt.close();
}

// 3. CHECK that TestObj was updated (does x = 2? for the int, yes,
but for not for the first element of the array)

pmt = PMF.getPersistenceManager();
TestObj to3 = null;
try {
to3 = (TestObj)pmt.getObjectById(TestObj.class, keyIdT);
} catch (Exception e) {
e.printStackTrace();
}   finally {
pmt.close();
}

-- OBJECT CODE ---

package com.test.db.client.theory;

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

import com.google.gwt.user.client.rpc.IsSerializable;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class TestObj implements IsSerializable {

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

@Persistent
public int x;

@Persistent
public int[] arrayOfX;

public TestObj() {
x = 1;
arrayOfX = new int[1];
arrayOfX[0] = 1;
}

public void update() {
x++;
arrayOfX[0]++;
}

public String getKey() {
return keyId;
}

}

--~--~-~--~~~---~--~~
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: JDO problem persisting int[]

2009-08-21 Thread Max Ross
I think this explanation will help:
http://www.datanucleus.org/products/accessplatform_1_1/jdo/orm/arrays.html

In short, stay away from array members because there is no good way for JDO
to detect when they've changed.  If you absolutely must use an array you'll
need to reassign the entire field (as opposed to just setting individual
array elements) whenever you want it changed.

Hope this helps,
Max

On Fri, Aug 21, 2009 at 4:05 PM, Owen Powell  wrote:

>
> Hi everyone,
>
> I can't seem to persist an int[] field (but an int works fine).
>
> My object has three fields: a key, an int, and an array of ints. When
> I create and add the object to the datastore, all the fields are
> persisted correctly. However, when I later try to update the object,
> the int field updates correctly but the array does not.
>
> Is this how the datastore is supposed to work? Or is this a bug?
>
> Here is the datastore code, the object code follows.
>
> -- DATASTORE CODE ---
>
>private static final PersistenceManagerFactory PMF =
>
>  JDOHelper.getPersistenceManagerFactory("transactions-optional");
>
> // 1. CREATE and SAVE the TestObj (x = 1), storing the keyId.
>PersistenceManager pmt = PMF.getPersistenceManager();
>TestObj to = new TestObj();
>String keyIdT = null;
>
>try {
>pmt.makePersistent(to);
>keyIdT = to.getKey();
>} catch (Exception e) {
>e.printStackTrace();
>}   finally {
>pmt.close();
>}
>
> // 2. CHECK that TestObj was saved correctly (x = 1), and then UPDATE
> fields (so that x = 2).
>
>pmt = PMF.getPersistenceManager();
>TestObj to2 = null;
>
>try {
>to2 = (TestObj)pmt.getObjectById(TestObj.class,
> keyIdT);
>to2.update();
>} catch (Exception e) {
>e.printStackTrace();
>}   finally {
>pmt.close();
>}
>
> // 3. CHECK that TestObj was updated (does x = 2? for the int, yes,
> but for not for the first element of the array)
>
>pmt = PMF.getPersistenceManager();
>TestObj to3 = null;
>try {
>to3 = (TestObj)pmt.getObjectById(TestObj.class,
> keyIdT);
>} catch (Exception e) {
>e.printStackTrace();
>}   finally {
>pmt.close();
>}
>
> -- OBJECT CODE ---
>
> package com.test.db.client.theory;
>
> import javax.jdo.annotations.Extension;
> import javax.jdo.annotations.IdGeneratorStrategy;
> import javax.jdo.annotations.IdentityType;
> import javax.jdo.annotations.PersistenceCapable;
> import javax.jdo.annotations.Persistent;
> import javax.jdo.annotations.PrimaryKey;
>
> import com.google.gwt.user.client.rpc.IsSerializable;
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class TestObj implements IsSerializable {
>
>@PrimaryKey
>@Persistent(valueStrategy  = IdGeneratorStrategy.IDENTITY)
>@Extension(vendorName="datanucleus", key="gae.encoded-pk",
> value="true")
>private String keyId;
>
>@Persistent
>public int x;
>
>@Persistent
>public int[] arrayOfX;
>
>public TestObj() {
>x = 1;
>arrayOfX = new int[1];
>arrayOfX[0] = 1;
>}
>
>public void update() {
>x++;
>arrayOfX[0]++;
>}
>
>public String getKey() {
>return keyId;
>}
>
> }
>
> >
>

--~--~-~--~~~---~--~~
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] Index control in the low-level datastore API

2009-08-21 Thread David Given

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I don't seem to see any APIs in DatastoreService or Entity that allow me
to do anything with indices. In particular, I want specify that certain
fields in my Entity shouldn't be indexed to prevent ballooning database
size.

This must be possible, because otherwise the JPA and JDO APIs wouldn't
be able to do it --- where should I be looking?

- --
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "People who think they know everything really annoy those of us who
│ know we don't." --- Bjarne Stroustrup
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKjzLkf9E0noFvlzgRAufQAKCOGknj3KKYCAT+pHbzr56gRYU0VACfQRmy
BYZOg4Mu1C+nAFt+Lj4Swu4=
=Is9m
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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: JDO problem persisting int[]

2009-08-21 Thread datanucleus

> In short, stay away from array members because there is no good way for JDO
> to detect when they've changed.

Or call
JDOHelper.makeDirty(...)
for the field after updating the array contents.
--~--~-~--~~~---~--~~
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] Problem uploading example app

2009-08-21 Thread Greg

Hi

I hope someone here can help me out. I've have been trying to upload
the dummy sample GWT application to test that everything is working
okay. When trying to upload it using either eclipse or appcfg.sh I get
this error,

javax.net.ssl.SSLKeyException: RSA premaster secret error
Unable to upload app: RSA premaster secret error

I am running OS X 10.5 and java version "1.5.0_19". I can only assume
that something is screwy with my Java configuration, though I hadn't
changed anything from the default before trying out GWT/GAE.

In order to get the sample application to even launch in hosted mode I
needed to copy xercesImpl.jar to /Library/Java/Home/lib/endorsed as I
was getting,

WARNING: Nested in javax.xml.parsers.FactoryConfigurationError:
Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found:
java.lang.ClassNotFoundException: org/apache/xerces/jaxp/
SAXParserFactoryImpl

when trying to run the app.

After moving xercesImpl.jar the app does launch and run as expected in
hosted mode. However, I am unable to upload it as the uploader seems
to fail at creating an HTTPS connection to the upload server. Here is
a chunk of the log file.

Unable to upload:
javax.net.ssl.SSLKeyException: RSA premaster secret error
at com.sun.net.ssl.internal.ssl.PreMasterSecret.
(PreMasterSecret.java:86)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone
(ClientHandshaker.java:515)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage
(ClientHandshaker.java:160)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop
(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record
(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord
(SSLSocketImpl.java:877)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake
(SSLSocketImpl.java:1089)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake
(SSLSocketImpl.java:1116)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake
(SSLSocketImpl.java:1100)
at sun.net.www.protocol.https.HttpsClient.afterConnect
(HttpsClient.java:402)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(AbstractDelegateHttpsURLConnection.java:166)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream
(HttpURLConnection.java:874)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream
(HttpsURLConnectionImpl.java:230)
at com.google.appengine.tools.admin.ServerConnection.connect
(ServerConnection.java:330)
at
com.google.appengine.tools.admin.ServerConnection.getAuthToken
(ServerConnection.java:250)
at
com.google.appengine.tools.admin.ServerConnection.authenticate
(ServerConnection.java:218)
at com.google.appengine.tools.admin.ServerConnection.send
(ServerConnection.java:145)
at com.google.appengine.tools.admin.ServerConnection.post
(ServerConnection.java:81)
at com.google.appengine.tools.admin.AppVersionUpload.send
(AppVersionUpload.java:415)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction
(AppVersionUpload.java:229)
at com.google.appengine.tools.admin.AppVersionUpload.doUpload
(AppVersionUpload.java:98)
at com.google.appengine.tools.admin.AppAdminImpl.update
(AppAdminImpl.java:53)
at com.google.appengine.tools.admin.AppCfg$UpdateAction.execute
(AppCfg.java:504)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:
129)
at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:
57)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:
53)
Caused by: java.security.NoSuchAlgorithmException: Cannot find any
provider supporting RSA/ECB/PKCS1Padding
at javax.crypto.Cipher.getInstance(DashoA12275)
at com.sun.net.ssl.internal.ssl.JsseJce.getCipher(JsseJce.java:
90)
at com.sun.net.ssl.internal.ssl.RSACipher.
(RSACipher.java:35)
at com.sun.net.ssl.internal.ssl.RSACipher.getInstance
(RSACipher.java:69)
at com.sun.net.ssl.internal.ssl.PreMasterSecret.
(PreMasterSecret.java:82)

Any help much appreciated,

Greg
--~--~-~--~~~---~--~~
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] Owned relationship with generated parent key

2009-08-21 Thread jd

Hi,

I want to create an owned one to many relationship where the key for
the parent is auto generated.

Is this possible to to in a single transaction?  Or do I need to
commit the parent first so I can then get its key and set the parent
key on the child?

Thanks,

John
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---