[appengine-java] embedded unindexed fields

2011-02-08 Thread Nikolay Ivanov
I am trying to define embedded unindexed field without successes. I have 
following classes and the embedded fields are indexed regardless of the 
"unindexed" definition. I'm tryingto store BaseSensorValue class. Is that a 
bug or I miss something?

@PersistenceCapable
@EmbeddedOnly
public class QuantityValue {

@Persistent
@Extension(vendorName="datanucleus", key="gae.unindexed", 
value="true")
private Double value;

public QuantityValue() {
}

public Double setValue(Double value) {
this.value = value;
}

public Double getValue() {
return value;
}
}

@PersistenceCapable
public class BaseSensorValue extends BasePersistentObject {

@Persistent
@Embedded(members = {
@Persistent(name="value", columns=@Column(name="v"), 
extensions=@Extension(vendorName="datanucleus", key="gae.unindexed", 
value="true"))
})
private QuantityValue value;

@Persistent
@Embedded(members = {
@Persistent(name="value", columns=@Column(name="cv"), 
extensions=@Extension(vendorName="datanucleus", key="gae.unindexed", 
value="true"))
})
private QuantityValue calcValue;



public BaseSensorValue() {}



public QuantityValue getCalculatedValue() {
return calcValue;
}

public QuantityValue getValue() {
return value;
}
}

-- 
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] NPE at jsp:useBean with scope session

2011-02-08 Thread Louis H.
Indeed, I had sessions disabled. (I missed they are disabled by default). 
Thanks for reply.
Problem solved.

-- 
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] Ant error when running GAE demo app

2011-02-08 Thread Martijn Versluis
I decided to test the GAE guestbook demo application in Netbeans 6.9
Building the application and running the server is easy.

However, when I run the application i get the following error message:

D:\*\Guestbook\nbproject\build-impl.xml:683: Problem: failed to create 
task or type nbdeploy
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

Could anybody help me with this?

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



Re: [appengine-java] Problems with MemCache, I call get(..) and the object comes with null properties

2011-02-08 Thread dudu
Te properties are not transient:
I think there is some inheritance problem  =\

https://gist.github.com/816246
https://gist.github.com/816248 
https://gist.github.com/816250 
https://gist.github.com/816252 

And to save I call updateQuote() from here:

https://gist.github.com/816261

-- 
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] blobstore cpu time?

2011-02-08 Thread Luke
may i know when using blobstore, is cpu time is charged ? or only charged 
depending on size of the file uploaded?

-- 
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] The disabling of sessions during a datastore down-time period using Apache Wicket

2011-02-08 Thread Ian Marshall
I tested my new datastore down-time period code during the scheduled
down-time of a few hours ago. It failed with the same exception I
reported in the link referred to above.

Does anyone know how I can disable sessions for Apache Wicket at run-
time?


On Jan 27, 2:17 pm, Ian Marshall  wrote:
> I refer to the most recent post to above-named thread dated 9th
> November 2010, of link
>
> http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> I can no longer post to this thread, so I start a new one here of the
> same subject to post a continuation.
>
> For the record, I have replaced Ikai's last line of his sample code
>
>   Capability capability = state.getCapability();
>
> with
>
>     CapabilityStatus statusDatastore = state.getStatus();
>
> and then tested the condition
>
>   (statusDatastore == CapabilityStatus.ENABLED)
>
> to see if the datastore is available.
>
> Ikai's code and my amendment tests for "Capability.DATASTORE". I use
> this template to test for Capability.DATASTORE_WRITE too. I shall see
> in next month's scheduled datastore down-time whether my new code will
> detect this down-time and react to it cleanly.

-- 
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: "order by" clause- JPA queries

2011-02-08 Thread Charms Styler
but when index are set to auto, it has to work right ?

-- 
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: blobstore cpu time?

2011-02-08 Thread Didier Durand
Hi,

According to
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/,
cpu time is not charged.

But, you have to configure billing in order to use the blobstore See
http://code.google.com/appengine/docs/quotas.html#Blobstore

regards

didier

On Feb 8, 12:28 pm, Luke  wrote:
> may i know when using blobstore, is cpu time is charged ? or only charged
> depending on size of the file uploaded?

-- 
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: High Replication - Large CPU spikes without Datastore Access

2011-02-08 Thread Simon Knott
And again today, I've just had another request to appstats eat up a
tonne of CPU time:

/appstats/stats 200 169ms  23878cpu_ms


Is anyone else seeing this?

On Feb 7, 3:34 pm, Simon Knott  wrote:
> As I've carried on the testing of my app against the HR-store, instead
> of the M/S datastore, I've noticed that occasionally I'll get a
> request which has a massive CPU spike.  These spikes consume
> ~30-40seconds of CPU time, when my usual request times are ~.  I'd
> assumed that something must be fundamentally wrong with my application
> against the HR datastore, but I've just had two requests to AppStats
> which have the same problem and one of them was an image!
>
> For example:
>
> /appstats/static/app_engine_logo_sm.gif   200   131ms    31811cpu_ms
> <--- Image
> /appstats/stats   200 536ms         32375cpu_ms
>
> Yesterday I had the request below in my log.  It didn't touch the
> datastore, had 6 calls to MemCache and according to AppStats had a
> grand total time of 125ms.
>
> /user/get 200 156ms     42020cpu_ms
>
> What could cause these large CPU spikes?  They aren't loading
> requests, as I'm correctly getting those marked in my logs and they
> are in the usual region of 2-3s duration. I also don't experience them
> on the same app against the M/S datastore.  My initial thoughts were
> that AppStats was potentially the cause of the problem, until I saw
> the request for an image with massive CPU usage!

-- 
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: High Replication - Large CPU spikes without Datastore Access

2011-02-08 Thread Simon Knott
Well now I'm just starting to think it's fishy - I've just had a
second high-CPU request to my app and it has exactly the same CPU ms
time consumed, down to the millisecond.

/appstats/stats 200 169ms  23878cpu_ms
/sync 200 43ms   23878cpu_ms

On Feb 8, 12:23 pm, Simon Knott  wrote:
> And again today, I've just had another request to appstats eat up a
> tonne of CPU time:
>
> /appstats/stats 200 169ms          23878cpu_ms
>
> Is anyone else seeing this?
>
> On Feb 7, 3:34 pm, Simon Knott  wrote:
>
> > As I've carried on the testing of my app against the HR-store, instead
> > of the M/S datastore, I've noticed that occasionally I'll get a
> > request which has a massive CPU spike.  These spikes consume
> > ~30-40seconds of CPU time, when my usual request times are ~.  I'd
> > assumed that something must be fundamentally wrong with my application
> > against the HR datastore, but I've just had two requests to AppStats
> > which have the same problem and one of them was an image!
>
> > For example:
>
> > /appstats/static/app_engine_logo_sm.gif   200   131ms    31811cpu_ms
> > <--- Image
> > /appstats/stats   200 536ms         32375cpu_ms
>
> > Yesterday I had the request below in my log.  It didn't touch the
> > datastore, had 6 calls to MemCache and according to AppStats had a
> > grand total time of 125ms.
>
> > /user/get 200 156ms     42020cpu_ms
>
> > What could cause these large CPU spikes?  They aren't loading
> > requests, as I'm correctly getting those marked in my logs and they
> > are in the usual region of 2-3s duration. I also don't experience them
> > on the same app against the M/S datastore.  My initial thoughts were
> > that AppStats was potentially the cause of the problem, until I saw
> > the request for an image with massive CPU usage!

-- 
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: The disabling of sessions during a datastore down-time period using Apache Wicket

2011-02-08 Thread Simon Knott
Just as an aside, are you aware that you can disable writes to your 
application via the admin console?  It may make testing easier, assuming it 
throws the same CapabilityDisabledException.

-- 
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: The disabling of sessions during a datastore down-time period using Apache Wicket

2011-02-08 Thread Ian Marshall
Hi Simon,

No, I wasn't aware of this application setting. I can now test without
having to get up in the night to test datastore scheduled down-times!
Thank you for the tip. (The same exception is thrown as during a
datastore scheduled down-time.)

It remains for me to find a way to disable Apache Wicket session
persistence at run-time (and not just via an uploaded configuration
setting).

Ian


On Feb 8, 12:42 pm, Simon Knott  wrote:
> Just as an aside, are you aware that you can disable writes to your
> application via the admin console?  It may make testing easier, assuming it
> throws the same CapabilityDisabledException.

-- 
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: hard time modeling my database

2011-02-08 Thread WillSpecht
So you are worried that a user will be deleted and his key will still
be linked to the book?  You can't rely on the database to do that work
for you.  You can do this two ways, worry about it, and when you
delete a user, make sure you delete it's key from every book.  Or
don't worry about it.  If you do your queries right, having a non
existent user stored in a book won't cause any problems.  But I would
recommend removing it when a user gets deleted.

On Feb 7, 3:11 pm, Arjan  wrote:
> Will,
> Thanks for the hint.
> When i use the User key (a String) as the reference from the Book to the
> User object, that would mean that the referential integrity is not enforced
> by the database. I understand that it would work, but it feels kind of
> strange.
> Is there a way to maintain the referential integrity on between the classes?
> Regards.

-- 
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] NPE at jsp:useBean with scope session

2011-02-08 Thread Stephen Johnson
Glad to help!

On Tue, Feb 8, 2011 at 3:16 AM, Louis H.  wrote:

> Indeed, I had sessions disabled. (I missed they are disabled by default).
> Thanks for reply.
> Problem solved.
>
> --
> 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] JSP and a Servlet with url-pattern /*

2011-02-08 Thread Patrice De Saint Steban
Hello
Hello,

I have a project with a servlet with a servlet witch have a url-mapping /* :

CollectorServlet
/*


And I want to add JSP file on the projet.
I had a simple JSP file in the war directory : *(hello.jsp)*
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
http://www.w3.org/TR/html4/loose.dtd";>



Insert title here


Hello <%= "Word !" %>



When a call the http://localhost:/hello.jsp url : 
It's not work because the CollectorServlet catch the request
If I remove the url-pattern /* from the web.xml, the hello.jsp work fine.

I try to add the JSP has a servlet :

hellojsp
hello.jsp



hellojsp
/hello.jsp


But I have now a compilation error :
WARNING: /hello
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 7 in the generated java file
org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type

An error occurred at line: 8 in the generated java file
org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a type

An error occurred at line: 10 in the generated java file
JspFactory cannot be resolved to a type

An error occurred at line: 10 in the generated java file
JspFactory cannot be resolved

An error occurred at line: 14 in the generated java file
javax.el.ExpressionFactory cannot be resolved to a type

An error occurred at line: 15 in the generated java file
org.apache.AnnotationProcessor cannot be resolved to a type

An error occurred at line: 22 in the generated java file
_el_expressionfactory cannot be resolved

An error occurred at line: 22 in the generated java file
_jspxFactory cannot be resolved

An error occurred at line: 22 in the generated java file
The method getServletConfig() is undefined for the type hello_jsp

An error occurred at line: 23 in the generated java file
_jsp_annotationprocessor cannot be resolved

An error occurred at line: 23 in the generated java file
org.apache.AnnotationProcessor cannot be resolved to a type

An error occurred at line: 23 in the generated java file
The method getServletConfig() is undefined for the type hello_jsp

An error occurred at line: 23 in the generated java file
org.apache.AnnotationProcessor cannot be resolved to a type

An error occurred at line: 29 in the generated java file
HttpServletRequest cannot be resolved to a type

An error occurred at line: 29 in the generated java file
HttpServletResponse cannot be resolved to a type

An error occurred at line: 30 in the generated java file
ServletException cannot be resolved to a type

An error occurred at line: 32 in the generated java file
PageContext cannot be resolved to a type

An error occurred at line: 33 in the generated java file
HttpSession cannot be resolved to a type

An error occurred at line: 34 in the generated java file
ServletContext cannot be resolved to a type

An error occurred at line: 35 in the generated java file
ServletConfig cannot be resolved to a type

An error occurred at line: 36 in the generated java file
JspWriter cannot be resolved to a type

An error occurred at line: 38 in the generated java file
JspWriter cannot be resolved to a type

An error occurred at line: 39 in the generated java file
PageContext cannot be resolved to a type

An error occurred at line: 44 in the generated java file
_jspxFactory cannot be resolved

An error occurred at line: 66 in the generated java file
SkipPageException cannot be resolved to a type

An error occurred at line: 73 in the generated java file
_jspxFactory cannot be resolved

Stacktrace:
at 
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at 
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at 
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at 
com.google.appengine.tools.development.PrivilegedJspServlet.access$101(PrivilegedJspServlet.java:23)
at 
com.google.appengine.tools.development.PrivilegedJspServlet$2.run(PrivilegedJspServlet.java:59)
at java.security.AccessController.doPrivileged(Native Method)
at 
com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:57)
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.jav

Re: [appengine-java] JSP and a Servlet with url-pattern /*

2011-02-08 Thread Don Schwarz
It sounds like you're running into this issue in 1.4.0:

http://code.google.com/p/googleappengine/issues/detail?id=4216

This will be fixed in the next release, which is due out soon.  In the mean
time, you can either roll back to the 1.3.8 SDK or you can try declaring
your CollectorServlet with a  of / instead of /*.  I believe
this will be equivalent for you, and may avoid the need to declare your JSP
explicitly.

On Tue, Feb 8, 2011 at 9:49 AM, Patrice De Saint Steban <
patou.de.saint.ste...@gmail.com> wrote:

> Hello
> Hello,
>
> I have a project with a servlet with a servlet witch have a url-mapping /*
> :
>  
> CollectorServlet
>  /*
> 
>
> And I want to add JSP file on the projet.
> I had a simple JSP file in the war directory : *(hello.jsp)*
> <%@ page language="java" contentType="text/html; charset=UTF-8"
> pageEncoding="UTF-8"%>
>  http://www.w3.org/TR/html4/loose.dtd";>
> 
> 
> 
> Insert title here
> 
> 
> Hello <%= "Word !" %>
> 
> 
>
> When a call the http://localhost:/hello.jsp url :
> It's not work because the CollectorServlet catch the request
> If I remove the url-pattern /* from the web.xml, the hello.jsp work fine.
>
> I try to add the JSP has a servlet :
> 
>  hellojsp
> hello.jsp
>  
>
> 
>  hellojsp
> /hello.jsp
>  
>
> But I have now a compilation error :
> WARNING: /hello
> org.apache.jasper.JasperException: Unable to compile class for JSP:
>
> An error occurred at line: 7 in the generated java file
> org.apache.jasper.runtime.HttpJspBase cannot be resolved to a type
>
> An error occurred at line: 8 in the generated java file
> org.apache.jasper.runtime.JspSourceDependent cannot be resolved to a type
>
> An error occurred at line: 10 in the generated java file
> JspFactory cannot be resolved to a type
>
> An error occurred at line: 10 in the generated java file
> JspFactory cannot be resolved
>
> An error occurred at line: 14 in the generated java file
> javax.el.ExpressionFactory cannot be resolved to a type
>
> An error occurred at line: 15 in the generated java file
> org.apache.AnnotationProcessor cannot be resolved to a type
>
> An error occurred at line: 22 in the generated java file
> _el_expressionfactory cannot be resolved
>
> An error occurred at line: 22 in the generated java file
> _jspxFactory cannot be resolved
>
> An error occurred at line: 22 in the generated java file
> The method getServletConfig() is undefined for the type hello_jsp
>
> An error occurred at line: 23 in the generated java file
> _jsp_annotationprocessor cannot be resolved
>
> An error occurred at line: 23 in the generated java file
> org.apache.AnnotationProcessor cannot be resolved to a type
>
> An error occurred at line: 23 in the generated java file
> The method getServletConfig() is undefined for the type hello_jsp
>
> An error occurred at line: 23 in the generated java file
> org.apache.AnnotationProcessor cannot be resolved to a type
>
> An error occurred at line: 29 in the generated java file
> HttpServletRequest cannot be resolved to a type
>
> An error occurred at line: 29 in the generated java file
> HttpServletResponse cannot be resolved to a type
>
> An error occurred at line: 30 in the generated java file
> ServletException cannot be resolved to a type
>
> An error occurred at line: 32 in the generated java file
> PageContext cannot be resolved to a type
>
> An error occurred at line: 33 in the generated java file
> HttpSession cannot be resolved to a type
>
> An error occurred at line: 34 in the generated java file
> ServletContext cannot be resolved to a type
>
> An error occurred at line: 35 in the generated java file
> ServletConfig cannot be resolved to a type
>
> An error occurred at line: 36 in the generated java file
> JspWriter cannot be resolved to a type
>
> An error occurred at line: 38 in the generated java file
> JspWriter cannot be resolved to a type
>
> An error occurred at line: 39 in the generated java file
> PageContext cannot be resolved to a type
>
> An error occurred at line: 44 in the generated java file
> _jspxFactory cannot be resolved
>
> An error occurred at line: 66 in the generated java file
> SkipPageException cannot be resolved to a type
>
> An error occurred at line: 73 in the generated java file
> _jspxFactory cannot be resolved
>
> Stacktrace:
>  at
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
> at
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
>  at
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
>  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
> at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
>  at
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
>  at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServle

Re: [appengine-java] Servlet Filter on non-Servlet resource

2011-02-08 Thread Toby Reyelts
It sounds like you might have static file
cachingset
up to include files you want to run your filter against. The key line
in
the doc is:

Any request for a URL whose path matches a static file serves the file
> directly to the browser—even if the path also matches a servlet or filter
> mapping.


If you want to filter certain files, they need to be excluded from caching.

On Fri, Jan 28, 2011 at 4:45 AM, andrew  wrote:

> We are using servlet filters without any problem on app-engine for
> logging and authentication of servlet.
>
> The servlet filter spec states they can be applied to "any resource",
> i.e. including html pages etc.
>
> I have tried this on app engine without success, and when looking at
> the app engine docs (here
> http://code.google.com/intl/en/appengine/docs/java/config/webxml.html#Filters
> )
> it just mentions and shows examples of servlets.
>
> Is this just an omission of the text, and no example for that?
>
> In appengine, can I apply servlet filters to a url (single or with a
> pattern).
>
>
>
> --
> 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.



Re: [appengine-java] embedded unindexed fields

2011-02-08 Thread Stephen Johnson
Yes, it seems this is a bug. I'm sure (ok 95% sure) it was working at one
point because I did this exact thing in one of my kinds and I'm sure I
tested to make sure the fields weren't indexed because it has a lot of
properties and I don't want them indexed. I just looked and yes the fields
are being indexed. Not good.

On Tue, Feb 8, 2011 at 3:14 AM, Nikolay Ivanov  wrote:

> I am trying to define embedded unindexed field without successes. I have
> following classes and the embedded fields are indexed regardless of the
> "unindexed" definition. I'm tryingto store BaseSensorValue class. Is that a
> bug or I miss something?
>
> @PersistenceCapable
> @EmbeddedOnly
> public class QuantityValue {
>
> @Persistent
> @Extension(vendorName="datanucleus", key="gae.unindexed",
> value="true")
> private Double value;
>
> public QuantityValue() {
> }
>
> public Double setValue(Double value) {
> this.value = value;
> }
>
> public Double getValue() {
> return value;
> }
> }
>
> @PersistenceCapable
> public class BaseSensorValue extends BasePersistentObject {
>
> @Persistent
> @Embedded(members = {
> @Persistent(name="value", columns=@Column(name="v"),
> extensions=@Extension(vendorName="datanucleus", key="gae.unindexed",
> value="true"))
> })
> private QuantityValue value;
>
> @Persistent
> @Embedded(members = {
> @Persistent(name="value", columns=@Column(name="cv"),
> extensions=@Extension(vendorName="datanucleus", key="gae.unindexed",
> value="true"))
> })
> private QuantityValue calcValue;
>
>
>
> public BaseSensorValue() {}
>
>
>
> public QuantityValue getCalculatedValue() {
> return calcValue;
> }
>
> public QuantityValue getValue() {
> return value;
> }
> }
>
> --
> 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.



Re: [appengine-java] Re: High Replication - Large CPU spikes without Datastore Access

2011-02-08 Thread Don Schwarz
I can help you investigate this.  Please reply privately with your
application ID.

On Tue, Feb 8, 2011 at 6:38 AM, Simon Knott  wrote:

> Well now I'm just starting to think it's fishy - I've just had a
> second high-CPU request to my app and it has exactly the same CPU ms
> time consumed, down to the millisecond.
>
> /appstats/stats 200 169ms  23878cpu_ms
> /sync 200 43ms   23878cpu_ms
>
> On Feb 8, 12:23 pm, Simon Knott  wrote:
> > And again today, I've just had another request to appstats eat up a
> > tonne of CPU time:
> >
> > /appstats/stats 200 169ms  23878cpu_ms
> >
> > Is anyone else seeing this?
> >
> > On Feb 7, 3:34 pm, Simon Knott  wrote:
> >
> > > As I've carried on the testing of my app against the HR-store, instead
> > > of the M/S datastore, I've noticed that occasionally I'll get a
> > > request which has a massive CPU spike.  These spikes consume
> > > ~30-40seconds of CPU time, when my usual request times are ~.  I'd
> > > assumed that something must be fundamentally wrong with my application
> > > against the HR datastore, but I've just had two requests to AppStats
> > > which have the same problem and one of them was an image!
> >
> > > For example:
> >
> > > /appstats/static/app_engine_logo_sm.gif   200   131ms31811cpu_ms
> > > <--- Image
> > > /appstats/stats   200 536ms 32375cpu_ms
> >
> > > Yesterday I had the request below in my log.  It didn't touch the
> > > datastore, had 6 calls to MemCache and according to AppStats had a
> > > grand total time of 125ms.
> >
> > > /user/get 200 156ms 42020cpu_ms
> >
> > > What could cause these large CPU spikes?  They aren't loading
> > > requests, as I'm correctly getting those marked in my logs and they
> > > are in the usual region of 2-3s duration. I also don't experience them
> > > on the same app against the M/S datastore.  My initial thoughts were
> > > that AppStats was potentially the cause of the problem, until I saw
> > > the request for an image with massive CPU usage!
>
> --
> 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] Ability to send mail using appspotmail.com

2011-02-08 Thread praseed
All,

I was able to send mails using supp...@appid.appspotmail.com

Although the log doesnt show failures, mails no longer get sent when using 
this from address. Is this a new restriction?

Cheers
Praseed

-- 
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: oauth_token_secret does not exist - Accessing Google Calendar using Open Id + OAuth

2011-02-08 Thread Jaspal Sawhney
Any Pointers?
Thanks

On Feb 7, 10:24 pm, Jaspal Sawhney  wrote:
>  Steps to reproduce issue:
> 1. Trying to implement a 3 - legged Oauth to access google calendar using
> OpenIdfilter library (which internally uses Step2 and OpenId4Java).
>
> 2. Code snippet being used is as follows
> *GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(new
> OAuthHmacSha1Signer());
> OAuthParameters oauthParameters = new OAuthParameters();
> oauthParameters.setOAuthConsumerKey("jbbssopoc.appspot.com");
> oauthParameters.setOAuthConsumerSecret("PcVxBDDTZ9mfnzbVvUe68rCp");
> oauthParameters.setOAuthToken((String)req.getAttribute("openid.oauth.token"));
> oauthParameters.setOAuthTokenSecret("");
> String accessToken = oauthHelper.getAccessToken(oauthParameters);*
>
> 3. As per the oauth spec and other posts online setting the token secret as
> "" should not throw an error however I'm getting a
> "*com.google.gdata.client.authn.oauth.OAuthException: oauth_token_secret
> does not exist*" error.
>
> 4. If I however make the OauthTokenSecret to " " then I do not get an error
> but do not get the access token.
>
> Expected output:
> 1. Expecting the call to return an access token
>
> Actual results:
> Error or Empty Access Token
>
> Thanks
>
> Jaspal./

-- 
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] Unknown authorization header - Error 401

2011-02-08 Thread Setu
I am accessing Google Spreadsheet feeds using HMAC-SH1 sign. My Code is : 

GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(CONSUMER_KEY);
oauthParameters.setOAuthConsumerSecret(CONSUMER_SECRET);
oauthParameters.setScope("https://spreadsheets.google.com/feeds/";);
   
 oauthParameters.setOAuthType(OAuthParameters.OAuthType.THREE_LEGGED_OAUTH);
   
 
oauthParameters.setOAuthToken(request.getSession().getAttribute("oauth_token").toString());
   
 
oauthParameters.setOAuthTokenSecret(request.getSession().getAttribute("oauth_token_secret").toString());

GoogleService googleService = new GoogleService("wise", 
"searceapps-searcegadget2-1");
googleService.setOAuthCredentials(oauthParameters, new 
OAuthHmacSha1Signer());
URL feedUrl = new 
URL("https://spreadsheets.google.com/feeds/spreadsheets/private/full/";);

SpreadsheetFeed resultFeed = googleService.getFeed(feedUrl, 
SpreadsheetFeed.class);

But, I am getting the error : 

Oauth.requestServlet doGet: null
com.google.gdata.util.AuthenticationException: OK


Unknown authorization header


Unknown authorization header
Error 401



at 
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:600)
at 
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563)
at 
com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552)
at 
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530)
at 
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535)
at com.google.gdata.client.Service.getFeed(Service.java:1135)
at com.google.gdata.client.Service.getFeed(Service.java:998)
at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:631)
at com.google.gdata.client.Service.getFeed(Service.java:1017)
at Oauth.accessFeeds.access(accessFeeds.java:74)


What is the problem with this ?

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