[appengine-java] Re: How can I make the session to be held open as long as the user got its browser opened?

2011-04-10 Thread Daniel
any1?

On Apr 6, 1:18 pm, Daniel vedm...@gmail.com wrote:
 Hi

 I need to keep the session opened as long as the user got its browser
 opened in my web app...

 Is there such a setting that i can enable for my web app?

 If not, Is there any suggester/recommend way to achieve it?

 Thanks ahead!

 Daniel.

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



[appengine-java] How to model object with lots of small properties

2011-04-10 Thread Thomas Wiradikusuma
Hi guys,

I want to model an object with lots of small properties, e.g.:

House {
  boolean hasAirCond, boolean hasInternet, boolean nearSchool, etc;
}

Is this naive way the best way to model it? Is there any better GAE-
way to do 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] How to model object with lots of small properties

2011-04-10 Thread Ravi Sharma
May be you can do womething like this

class HouseProperty{
Key id;
String Name;
}
in above class you can create your all properties like
hasAirCond,hasInternet etc. One property
per Row.
and in House you can have somethin glike this
class House{
SetKey properties;
}

and if some house has airCond, then add one key to this collection
house.properties.add(Key corresponding to airCon);

if some house has two or more then
house.properties.add(Key corresponding to airCon);
house. properties.add(Key corresponding to hasInternet );
house. properties.add(Key corresponding to some other feature.);


If you do like this, you dont need to worry about increasing the table
columns later as you will be doing in your current solution. If new
prooperty of a house comes just add another row and your solution will keep
working.


Thanks,
Ravi.




On Sun, Apr 10, 2011 at 7:22 AM, Thomas Wiradikusuma wiradikus...@gmail.com
 wrote:

 Hi guys,

 I want to model an object with lots of small properties, e.g.:

 House {
  boolean hasAirCond, boolean hasInternet, boolean nearSchool, etc;
 }

 Is this naive way the best way to model it? Is there any better GAE-
 way to do this?

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



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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 model object with lots of small properties

2011-04-10 Thread Didier Durand
Hi,

You should use an enum class for the properties (so that you can
extend later on) and store them as proposed above in a Set

regards

didier

On Apr 10, 8:29 am, Ravi Sharma ping2r...@gmail.com wrote:
 May be you can do womething like this

 class HouseProperty{
 Key id;
 String Name;}

 in above class you can create your all properties like
 hasAirCond,hasInternet etc. One property
 per Row.
 and in House you can have somethin glike this
 class House{
 SetKey properties;

 }

 and if some house has airCond, then add one key to this collection
 house.properties.add(Key corresponding to airCon);

 if some house has two or more then
 house.properties.add(Key corresponding to airCon);
 house. properties.add(Key corresponding to hasInternet );
 house. properties.add(Key corresponding to some other feature.);

 If you do like this, you dont need to worry about increasing the table
 columns later as you will be doing in your current solution. If new
 prooperty of a house comes just add another row and your solution will keep
 working.

 Thanks,
 Ravi.

 On Sun, Apr 10, 2011 at 7:22 AM, Thomas Wiradikusuma wiradikus...@gmail.com

  wrote:
  Hi guys,

  I want to model an object with lots of small properties, e.g.:

  House {
   boolean hasAirCond, boolean hasInternet, boolean nearSchool, etc;
  }

  Is this naive way the best way to model it? Is there any better GAE-
  way to do this?

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



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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 can I make the session to be held open as long as the user got its browser opened?

2011-04-10 Thread Max
have you tried to use memcache or simply store session into datastore?

-- 
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: Weird 500 Internal Server Error nginx/0.7.67

2011-04-10 Thread rml
We use Nginx with SLL to proxy to our GAE application and don't have
any issue with multipart/form-data posts.

You may find this useful:
http://radomirml.com/2011/01/30/reverse-proxy-for-gae-application-using-nginx-and-ssl


On Apr 10, 4:31 am, miglate miglat...@gmail.com wrote:
 Hi I have just found out that this error occurs when I use my custom domain.
 If I use appspot.com, no error is given. Is this a bug of GAE or is there a
 problem with nginx?

 I'd really like someone from Google check this issue.

 Thanks in advance,

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



[appengine-java] Re: How can I make the session to be held open as long as the user got its browser opened?

2011-04-10 Thread Didier Durand
Hi,

You should clarify what you mean by an open session: do you mean the
http one defined by the cookie, the security one after login, etc ?

regards

didier

On Apr 10, 9:35 am, Max thebb...@gmail.com wrote:
 have you tried to use memcache or simply store session into datastore?

-- 
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] Failed to compile jsp files.

2011-04-10 Thread Eric Wu
My project works fine in local server. But when I upload my project to
GAE, there is an error: How to solve the problem

Regards

Creating staging directory
Scanning for jsp files.
Compiling jsp files.
com.google.appengine.tools.admin.JspCompilationException: Failed to
compile jsp files.
2011/4/10 下午 08:45:11 org.apache.jasper.compiler.AntCompiler
generateClass
嚴重的: Error compiling file: C:\DOCUME~1\WuEric\LOCALS~1\Temp
\appcfg7905816927184108608.tmp\WEB-INF\classes\org\apache\jsp
\match_jsp.java [javac] Compiling 1 source file

2011/4/10 下午 08:45:11 org.apache.jasper.compiler.AntCompiler
generateClass
嚴重的: Javac exception
Error running javac.exe compiler
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:
473)
at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:
47)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:
226)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.JspC.processFile(JspC.java:1192)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at
com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
18)
Caused by: java.io.IOException: Cannot run program javac.exe:
CreateProcess error=2, ?t?Χ??
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute
$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:
470)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, ?t?Χ??
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 18 more
--- Nested Exception ---
java.io.IOException: Cannot run program javac.exe: CreateProcess
error=2, ?t?Χ??
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.taskdefs.Execute
$Java13CommandLauncher.exec(Execute.java:834)
at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:435)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:449)
at
org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:
470)
at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:
47)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:931)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
at
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:
226)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
at org.apache.jasper.JspC.processFile(JspC.java:1192)
at org.apache.jasper.JspC.execute(JspC.java:1341)
at
com.google.appengine.tools.development.LocalJspC.main(LocalJspC.java:
18)
Caused by: java.io.IOException: CreateProcess error=2, ?t?Χ??
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.init(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 18 more
2011/4/10 下午 08:45:11 org.apache.jasper.compiler.AntCompiler
generateClass
嚴重的: Environment: Compile: javaFileName=C:\DOCUME~1\WuEric
\LOCALS~1\Temp\appcfg7905816927184108608.tmp\WEB-INF\classes\org\apache
\jsp\match_jsp.java
classpath=/D:/java_sdk/appengine-java-sdk-1.4.3/lib/impl/appengine-
api-labs.jar;/D:/java_sdk/appengine-java-sdk-1.4.3/lib/impl/appengine-
api-stubs.jar;/D:/java_sdk/appengine-java-sdk-1.4.3/lib/impl/appengine-
api.jar;/D:/java_sdk/appengine-java-sdk-1.4.3/lib/impl/appengine-local-
runtime.jar;D:\java_sdk\appengine-java-sdk-1.4.3\lib\shared\appengine-
local-runtime-shared.jar;D:\java_sdk\appengine-java-sdk-1.4.3\lib
\shared\el-api.jar;D:\java_sdk\appengine-java-sdk-1.4.3\lib\shared\jsp

[appengine-java] Re: Weird 500 Internal Server Error nginx/0.7.67

2011-04-10 Thread Sinan Yuce
rml,

Thanks for reply, but issue still exists. Our investigation showed that it 
only happens when the post size exceed  ~40K bytes.

If you do not have any issue like this, can you make any suggestions about 
why this happens when I try to post to an url  that starts with my custom 
domain rather than I do with appspot.com url? So maybe we can fix on that. 

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] only allowing local connections to dev server?

2011-04-10 Thread Luis Montes
When running a java webapp in eclipse it seems that I can only connect to
the dev jetty instance from the localhost.  Is jetty fired up only bound to
127.0.0.1?

I have some mobile wifi devices (android, ipad, etc.) that I'd like to test
with on the LAN but it seems that I'm going to have do some tunneling or
proxying to get things to work.

I can't find a way to configure networking in the sdk.  Is
127.0.0.1:hardcoded somewhere?


Luis

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

2011-04-10 Thread Luca Matteis
I have a Recipe entity that contains two images:

@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable=true)
public class Recipe {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private MyImage myImage; // full-size image
@Persistent
private MyImage thumb; // 224x230 thumbnail version of the above

When I persist this to the datastore, the images are stored correctly.
However the issue comes when I try referencing the images using
`.getMyImage()` and `.getThumb()`.
They both point to the same object even though I can see in the
datastore viewer that they are two images of different size. If they
are stored in the datastore corretly this means that there's an issue
with how I reference the object I suppose. Why is this?

This is the object I persist, and as you can see the `myImage` and
`thumb` objects are different (not showing the code for them, but
trust me they are).

Recipe recipe = new Recipe(user.getKey(), title, new Text(content),
myImage, thumb, tagsAsStrings);

Any ideas why I keep on referencing the same object?

-- 
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] Server Error(500) problem

2011-04-10 Thread giannisdag
Hi, I have an error Server Error(500) in my application, it happens only for 
one entity out of three. I did a search and see that it is very common and 
usually the developer gives its application-id and people of google fix the 
problem. What should I do in my case?
Thanks in advance

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



[appengine-java] Re: URL Fetch java.io.IOException

2011-04-10 Thread Stefan
Hi Thomad and Z,

could one of you describe what you did? Do you simply mean that you
remove this line:

con.setRequestProperty(Content-Length,  +
Integer.toString(urlParameters.getBytes().length));

For what it's worth: I think this is related to issue 4823 (though the
title seems to suggest it is only concerned with https):

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

Best regards,
Stefan

-- 
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: HTTP POST failing in dev environment with SDK 1.4.3

2011-04-10 Thread Stefan
Could be related to issue 
http://code.google.com/p/googleappengine/issues/detail?id=4823

-- 
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: URL Fetch java.io.IOException

2011-04-10 Thread Stefan
Ok, never mind. I removed the con.setRequestProperty(Content-
Length,...) in the offending code and that solved my problem.
Thanks!

Stefan

-- 
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: How can I make the session to be held open as long as the user got its browser opened?

2011-04-10 Thread James
Please take a look at channel api.

Daniel vedm...@gmail.com wrote:

any1?

On Apr 6, 1:18 pm, Daniel vedm...@gmail.com wrote:
 Hi

 I need to keep the session opened as long as the user got its browser
 opened in my web app...

 Is there such a setting that i can enable for my web app?

 If not, Is there any suggester/recommend way to achieve it?

 Thanks ahead!

 Daniel.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] -javaagent gets removed from Run Configuration / Arguments in Eclipse

2011-04-10 Thread Dzmitry Lazerka
Hi folks,

I've mavenized my project for Eclipse Helios as described at 
http://googlewebtoolkit.blogspot.com/2010/08/how-to-use-google-plugin-for-eclipse.html,
 
and other web sites. And it works, but only for one run. When I run it 
again, it says:
Unable to locate the App Engine agent. Please use dev_appserver, KickStart, 
 or set the jvm flag: -javaagent:sdk_root/lib/agent/appengine-agent.jar

When I specify -javaagent again and press Run -- it runs successfully. When 
I open Run Configuration, I see only 
-Xmx512m
-Dappengine.sdk.root=/home/lazerka/.m2/repository/com/google/appengine/appengine-java-sdk/1.4.3/appengine-java-sdk-1.4.3
(no my -javaagent I've put there earlier). Could you give any insight on 
this behavior?

-- 
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] only allowing local connections to dev server?

2011-04-10 Thread Fabrizio Accatino
I use rinetd. It's a port forwarder.
http://www.boutell.com/rinetd/

fabrizio (from android)
Il giorno 10/apr/2011 19.57, Luis Montes monte...@gmail.com ha scritto:
 When running a java webapp in eclipse it seems that I can only connect to
 the dev jetty instance from the localhost. Is jetty fired up only bound to
 127.0.0.1?

 I have some mobile wifi devices (android, ipad, etc.) that I'd like to
test
 with on the LAN but it seems that I'm going to have do some tunneling or
 proxying to get things to work.

 I can't find a way to configure networking in the sdk. Is
 127.0.0.1:hardcoded somewhere?


 Luis

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