[appengine-java] Updating detached objects only works when fetched within a transaction (JDO)

2009-09-03 Thread Esteban Masoero

Hi there,

I'm having a problem similar to the one described here 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/54c5c1e1ec1b3ff0/bcb54506ed134654?l,
 
but using JDO instead of JPA.
Instead of fetching the object in a "normal" way, I fetched it inside a 
transaction and it worked fine (the object was properly detached).

Should an issue be reported? or is this problem addressed by the the 
issue 1906 
(http://code.google.com/p/googleappengine/issues/detail?id=1906)? (I ask 
it because as I see, the exceptions thrown by that JPA-examble are jdo 
exceptions, so it gives me the feeling that JDO and JPA share some 
components, and consequently it would be the same bug.)

Thanks,

Esteban

--~--~-~--~~~---~--~~
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: Exhaustive JPA/JDO tutorial

2009-09-14 Thread Esteban Masoero

This should help: 
http://www.datanucleus.org/products/accessplatform_1_1/index.html

Regards,

Esteban

Java_GAE escribió:
> Hi,
> Please anybody can post a link to exhaustive and intensive tutorial on
> JPA/JDO. I got head and tail from the google app engine tutorial but
> need to understand much more than that to create my application.
>
> 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: Location of Datastore/JDO (physical) file

2009-09-16 Thread Esteban Masoero

Hi pion:

In my case it's located at 
\war\WEB-INF\appengine-generated\local_db.bin

Esteban

Pion escribió:
> I am looking at the guestbook tutorial. The “Using the Datastore with
> JDO” section has the following code:
> …
>   Date date = new Date();
> Greeting greeting = new Greeting(user, content, date);
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> try {
> pm.makePersistent(greeting);
> } finally {
> pm.close();
> }
> …
>
> Where is the location of the (physical) file that actually store those
> info?
>
> I am running "App Engine SDK 1.2.5" using Eclipse-Galileo on Windows
> Vista.
>
> Thanks in advance for your help.
>
> >
>
>   

--~--~-~--~~~---~--~~
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: A GAE_HOME eclipse variable that points to the default app engine sdk location

2009-10-19 Thread Esteban Masoero

Thanks, here's the issue in case anyone feels the same: 
http://code.google.com/p/googleappengine/issues/detail?id=2282

Regards,

Esteban

Jason Parekh escribió:
> Hi Esteban,
>
> This sounds like something the plugin should definitely do, I saw the 
> feature request you've opened, thanks!
>
> jason
>
> On Thu, Oct 15, 2009 at 9:21 PM, Esteban Ignacio Masoero 
> mailto:emaso...@getsense.com.ar>> wrote:
>
> Any comments about this issue?
>
>
> On Thu, Oct 15, 2009 at 3:45 AM, Esteban Ignacio Masoero
> mailto:emaso...@getsense.com.ar>> wrote:
>
> Hi:
>
> I was programming some unit tests according to this page
> ( 
> http://code.google.com/intl/en/appengine/docs/java/howto/unittesting.html ),
> and it says that you need to add to your classpath two jars
> (|appengine-api-stubs.jar| and |appengine-local-runtime.jar),
> because they are not located by default in the sdk jars. |
>
> |As I'm not the only one working on my current project, we
> created  two classpath variables to point to those jars
> (ECLIPSE_HOME/plugins/.../1.2.5/.../blah.jar). Then, when
> updating to sdk 1.2.6 I realized that it's easy to forget
> updating these variables (and an annoying repetitive task to
> do!), and it wouldn't be bad to have a GAE_HOME variable that
> points to the currently default gae sdk (so these classpath
> variables would have something like GAE_HOME:/../blah.jar).|
>
> Is there a possibility that gae plugin can take care of it? or
> is there any other solution to the problem I'm facing?
>
> Thanks,
>
> Esteban
>
>
>
>
>
>
> >

--~--~-~--~~~---~--~~
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: Logging in GAE/J

2009-10-19 Thread Esteban Masoero

Have you tried using jdk14 to get the logger instance? ( 
java.util.logging.Logger.getLogger(getClass().getName()) )
If you're not forced to use commons logging, you could change to that. 
If you are forced and trying util logging works fine, at least you'll be 
getting closer to the problem.

Jason (Google) escribió:
> Can you try log.info () instead? Passing strings to 
> System.out should automatically log at the INFO level also:
>
> http://code.google.com/appengine/docs/java/runtime.html#Logging
>
> - Jason
>
> On Wed, Oct 14, 2009 at 2:31 PM, Thai Dang Vu  > wrote:
>
> I put my logging.properties in the WEB-INF directory. That
> properties file looks like this:
>
> handlers = java.util.logging.ConsoleHandler
> java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
> .level = WARNING
>
> com.att.level = FINEST
>
> I use commons-logging to get the log instance:
> private final Log log = LogFactory.getLog(getClass());
>
> but this statement in the
> com.att.web.servlet.mvc.SpringMVCController.java doesn't print
> anything
> log.debug("hi hic hic");
>
> I absolutely miss something, but what is that?
>
> Thank you.
>
>
>
>
>
> >

--~--~-~--~~~---~--~~
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 view log file locally?

2009-10-20 Thread Esteban Masoero

Maybe another option is to see how to specify a logging.properties file 
for development, and another for production environment. After thinking 
a little about it, I think it could be a common use case to have 
different properties files, because I won't necessary want to have the 
same logging level for example.
That way, the local file would have the normal file appenders, and the 
production file would have only the console appender, because as we know 
logging is intercepted by google classes and saved somewhere else.

What do you think? maybe we can programmatically choose a different 
properties file of we are in development environment, and all of our 
problems will be solved. I'll check it out later.

Regards,

Esteban

Marcel Overdijk escribió:
> It's not the question if it's worth learning Maven.
> It's the question how to read log files locally.
>
> Would it be possible to run the Google admin console locally and read
> the log files?
>
> On 15 okt, 20:48, Rusty Wright  wrote:
>   
>> Think long term; maven is a mountain worth climbing.
>>
>>
>>
>> Esteban Masoero wrote:
>> 
>>> Allright, that could work.
>>> However, as my current project is indeed a small project, I don't feel
>>> like adding maven to it, because it would involve learning maven and
>>> configuring it only to solve that problem. So althought I'll have that
>>> in mind, I'd rather see whether there's another easier way to solve this.
>>>   
>>> Any other ideas?
>>>   
>>> Esteban
>>>   
>>> Rusty Wright escribió:
>>>   
>>>> This is one of those places where maven can really help.  With maven I 
>>>> think what I would do is create 2 log configuration files for log4j 
>>>> (although I prefer logback and slf4j, but that's a separate topic), one 
>>>> with local logging to a file and the console, and one with logging only to 
>>>> the console.  Then set up maven profiles, call them dev and prod, and when 
>>>> you build, maven's filtering capabilities rewrite whatever config file 
>>>> you're using that specifies the log config file.  (It doesn't rewrite it 
>>>> in place, but before it puts it in the war file.)  If you don't have a 
>>>> config file that specifies the log config file I'm pretty sure you can 
>>>> have maven use the appropriate log config file via the profile you select 
>>>> when you build.
>>>> 
>>>> In this GAE development environment you may not even need all of that.  
>>>> With maven you have 2 trees, main, where the production code and resources 
>>>> live, and test, where your unit and integration test code lives, and their 
>>>> resources.  Notice how each has their own resources directory; that's 
>>>> where I put my log4j config files, one for main, and one for test.  When I 
>>>> do a build maven only includes the stuff from the tree named main; the 
>>>> tree test never sees the light of day, as it were.
>>>> 
>>>>  http://www.sonatype.com/documentation/books
>>>>  http://www.maestrodev.com/better-build-maven
>>>> 
>>>> Marcel Overdijk wrote:
>>>> 
>>>>> Esteban, that's indeed THE question !
>>>>>   
>>>>> Did you tried to deploy a app with a file appender? What happened?
>>>>>   
>>>>> On 14 okt, 18:01, Esteban Masoero  wrote:
>>>>>   
>>>>>> I tried configuring a file appender with log4j and it worked only in
>>>>>> development environment, because as we know, no file writing is allowed
>>>>>> in production environment.
>>>>>> 
>>>>>> Maybe the question should be: is there an easy way to define a file
>>>>>> appender so I can use only locally, but without having to change that
>>>>>> .properties when deploying on production environment?
>>>>>> 
>>>>>> If anyone has the answer, I'll appreciate it.
>>>>>> 
>>>>>> Thanks,
>>>>>> 
>>>>>> Esteban
>>>>>> 
>>>>>> आलोक (Alok) escribió:
>>>>>> 
>>>>>>> hm, I'm not sure if
>>>>>>> appcfg.py request_logs myapp/ mylogs.txt
>>>>>>> would work for the java app as well. Has anyone used this for their
>>>>>>> java app?
>>>>>>> On 14 अक्तू, 12:50, leszek  wrote:
>>>>>>>   
>>>>>>>> For me default ConsoleAppender is enough, I see log messages on
>>>>>>>> console while running in Eclipse and can view log messages via admin
>>>>>>>> console in production environment. But I did not try to define any
>>>>>>>> other appenders, so can guess only what would happen.
>>>>>>>> 
> >
>
>   

--~--~-~--~~~---~--~~
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: java.lang.AbstractMethodError at com.google.appengine.tools.development.DevAppServerImpl.getUserPermissions() moving from SDK 1.2.5 to 1.2.6

2009-10-20 Thread Esteban Masoero

Toby:

Any comments about this? An issue about it was created here: 
http://code.google.com/p/googleappengine/issues/detail?id=2280

Thanks,

Esteban

Miguel Méndez escribió:
> You have the javaagent on the command line so that it's definitely not 
> missing.  It looks like you have your project setup for unit testing 
> since appengine-local-runtime.jar and appengine-api-stubs.jar are both 
> on the classpath.
>
> I was able to reproduce your problem by creating a new web app project 
> using App Engine 1.2.6 and GWT 1.7.1.  The project will work correctly 
> and launch.  However, if I add the appengine-local-runtime.jar and 
> appengine-api-stub.jar's from the 1.2.5 SDK higher in the classpath 
> than the App Engine 1.2.6 SDK, I get the same error that you report. 
>  So, I think that this is the situation that you are in.
>
> However, if I use the 1.2.6 versions of appengine-local-runtime.jar 
> and appengine-api-stub.jar I get the following error:
>
> Exception in thread "main" java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at 
> sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:141)
> Caused by: java.lang.RuntimeException: Unable to find 
> appengine-agentimpl.jar in 
> /usr/local/google/home/mmendez/eclipse-rcp-galileo-linux-gtk-x86_64-gpe/plugins/com.google.appengine.eclipse.sdkbundle_1.2.6.v200910131704/appengine-java-sdk-1.2.6/lib/impl
> at 
> com.google.appengine.tools.development.agent.AppEngineDevAgent.findAgentImplLib(AppEngineDevAgent.java:97)
> at 
> com.google.appengine.tools.development.agent.AppEngineDevAgent.premain(AppEngineDevAgent.java:48)
> ... 5 more
>
> Maybe toby can explain what is going on there.
>
> On Thu, Oct 15, 2009 at 3:47 AM, Patrizio Munzi 
> mailto:patrizio.mu...@eris4.com>> wrote:
>
> Hi Miguel,
>
> Here's my entire command line:
> -
>  "C:\Program Files\Java\jre1.6.0_07\bin\javaw.exe"
> -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1609
> -Xmx512m "-javaagent:C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\agent\appengine-agent.jar"
> -Dfile.encoding=Cp1252 -classpath
> 
> "D:\Projects\CallFriends\src;D:\Projects\CallFriends\classes;D:\Projects\CallFriends\war\WEB-INF\classes;C:\Program
> 
> Files\EclipseGanymede\plugins\org.junit_3.8.2.v20080602-1318\junit.jar;D:\Projects\CallFriends\test-lib\appengine-local-runtime.jar;D:\Projects\CallFriends\test-lib\appengine-api-stubs.jar;D:\Projects\CallFriends\war\WEB-INF\lib\activation-1.1.jar;D:\Projects\CallFriends\war\WEB-INF\lib\commons-lang-2.2.jar;D:\Projects\CallFriends\war\WEB-INF\lib\commons-logging-1.1.1.jar;D:\Projects\CallFriends\war\WEB-INF\lib\facebook-java-api-2.1.1.jar;D:\Projects\CallFriends\war\WEB-INF\lib\facebook-java-api-schema-2.1.1.jar;D:\Projects\CallFriends\war\WEB-INF\lib\jaxb-api-2.1.jar;D:\Projects\CallFriends\war\WEB-INF\lib\jaxb-impl-2.1.9.jar;D:\Projects\CallFriends\war\WEB-INF\lib\json-20070829.jar;D:\Projects\CallFriends\war\WEB-INF\lib\runtime-0.4.1.3.jar;D:\Projects\CallFriends\war\WEB-INF\lib\stax-api-1.0-2.jar;D:\Projects\CallFriends\war\WEB-INF\lib\org.restlet.ext.net.jar;D:\Projects\CallFriends\war\WEB-INF\lib\org.restlet.jar;D:\Projects\CallFriends\war\WEB-INF\lib\gwt-visualization
> 
> .jar;D:\Projects\CallFriends\war\WEB-INF\lib\org.restlet.ext.xml.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.gwt.eclipse.sdkbundle.win32_1.7.1.v200909230239\gwt-windows-1.7.1\gwt-user.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.gwt.eclipse.sdkbundle.win32_1.7.1.v200909230239\gwt-windows-1.7.1\gwt-dev-windows.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\shared\appengine-local-runtime-shared.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\shared\geronimo-el_1.0_spec-1.0.1.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\shared\geronimo-jsp_2.1_spec-1.0.1.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\shared\geronimo-servlet_2.5_spec-1.2.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758\appengine-java-sdk-1.2.6\lib\shared\jsp\repackaged-appengine-ant-1.6.5.jar;C:\Program
> 
> Files\EclipseGanymede\plugins\com.google.appengine.eclipse.sdkbu

[appengine-java] Re: AccessControlException (SerializablePermission enableSubclassImplementation) - Wicket on GAE

2009-10-21 Thread Esteban Masoero

Hi there:

We've been running a wicket app on gae since last month, but without the 
need of implement memcache-based implementation of Wicket's IPageStore. 
Why are you doing that? (our wicket version is 1.3.7)

Regards,

Esteban

a.maza escribió:
> Hi,
>
> I am trying to get Apache Wicket running properly on GAE. Therefore, I
> am adapting some Wicket behavior (i.e., I am trying to implement a
> Memcache-based implementation of Wicket's IPageStore).
>
> Anyway, I am getting a
>
> java.security.AccessControlException: access denied
> (java.io.SerializablePermission enableSubclassImplementation)
>
> error when running my code on the dev server. It seems to me that the
> use of java.io.ObjectOutputStream causes some problems although the
> class is found on the JRE whitelist.
>
> Below you find the (shortened) stacktrace:
>
> 
> java.security.AccessControlException: access denied
> (java.io.SerializablePermission enableSubclassImplementation)
>   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:139)
>   at java.io.ObjectOutputStream.(Unknown Source)
>   at org.apache.wicket.util.io.IObjectStreamFactory
> $DefaultObjectStreamFactory$2.(IObjectStreamFactory.java:150)
>   at org.apache.wicket.util.io.IObjectStreamFactory
> $DefaultObjectStreamFactory.newObjectOutputStream
> (IObjectStreamFactory.java:114)
>   at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java:
> )
>   at
> org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage
> (AbstractPageStore.java:203)
>
> 
>
> Any help would be highly appreciated ;-)
>
> thanks,
> andr
>
> >
>
>   

--~--~-~--~~~---~--~~
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: having problems with JDO query serialization to memcache...

2009-10-21 Thread Esteban Masoero

Thanks!. Although it wouldn't be a distributed cache, right?

datanucleus escribió:
> Just to mention, JDO (and DataNucleus) supports a Level2 cache, and
> can use "javax.cache" (GAE/J memcached) and is a single PMF property
> to turn it on. That way you don't need to play around putting objects
> into the L2 cache and getting them out yourself, its done for you.
> >
>
>   

--~--~-~--~~~---~--~~
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: having problems with JDO query serialization to memcache...

2009-10-21 Thread Esteban Masoero

You're right, I just misunderstood your comment.

Thanks,

Esteban

datanucleus escribió:
>> Thanks!. Although it wouldn't be a distributed cache, right?
>> 
>
> Why? It will be exactly the same cache as what Google provide ...
> since DataNucleus puts things into it and gets them out, saving you
> the job of doing it. Nothing else is different
> >
>
>   

--~--~-~--~~~---~--~~
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: AccessControlException (SerializablePermission enableSubclassImplementation) - Wicket on GAE

2009-10-21 Thread Esteban Masoero

a.maza:

That's correct, I'm using HTTPSessionStore because of the filesystem 
writing restriction. However, I'm interested in the implementation you 
are trying to do, so if you decide to share it with the community when 
it's done, I'll be happy to give it a try ;). Moreover, we have a 
fileupload gae-like implementation that uses the datastore instead of 
the file system to store temporary recently uploaded files (shared by a 
developer in the wicket users list), so I'd be interested in merging our 
code and your code into some wicket-gae.jar extension, so everything its 
located at one place and can be reused by others.

For the record, we haven't experienced any issues related to the 
back/foward button behavior (although I must tell that our app is still 
a small one and maybe that has something to do with it).

Regards,

Esteban

a.maza escribió:
>
> On 21 Okt., 20:26, Esteban Masoero  wrote:
>   
>> Hi there:
>>
>> We've been running a wicket app on gae since last month, but without the
>> need of implement memcache-based implementation of Wicket's IPageStore.
>> Why are you doing that? (our wicket version is 1.3.7)
>> 
>
> Wicket is very powerful in maintaining application/session state. This
> enables for example a nice usage of back/forward buttons. In a typical
> scenario, this is backed by the DiskPageStore implementation. On GAE
> you can't use the DiskPageStore since it relies on writing to the
> filesystem. Thus, I assume that you use the HTTPSessionStore as
> proposed in some blog entries (and not the SecondLevelCacheStore).
>
> I did some research on the web and several users reported problems
> using the HTTPSessionStore - especially regarding the back/forward
> button behavior. Thus, I am currently trying to implement a Memcache-
> backed IPagestore for GAE. On the Wicket mailinglist I was provided
> with a HTTP session based implementation of IPageStore (done in the
> Terracotta project) to have a starting point (http://www.nabble.com/
> Google-App-Engine-and-Wicket-to23001592.html)
> >
>
>   

--~--~-~--~~~---~--~~
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: Updating Text columns

2009-11-09 Thread Esteban Masoero

I've used Text type with JDO and had no problems.

Yogi escribió:
> I have a String attribute which is more that 500 length. So I am using
> com.google.appengine.api.datastore.Text class to store it in
> datastore. In my local datastore the call datastore.put() just hangs.
> Has anyone encountered this issue?
> >
>
>   

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



[appengine-java] Re: permissions in multipart file upload

2009-11-09 Thread Esteban Masoero

Have a look at this section: 
http://code.google.com/intl/en/appengine/docs/java/runtime.html#The_Sandbox

black_13 escribió:
> when i try to upload a file i get
> The server is running at http://localhost:8080/
> java.security.AccessControlException: access denied
> (java.io.FilePermission C:\Users\black_13\AppData\Local\Temp
> \upload_853a964_124d3e0d1f9__8000_.tmp write)
> what is going on here?
> black_13
> >
>
>   

--~--~-~--~~~---~--~~
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: once per deployment?

2009-11-09 Thread Esteban Masoero

Normally, this is done by using the | property in the 
web.xml file. However, this feature behaves differently in GAE ( 
|http://code.google.com/intl/en/appengine/docs/java/config/webxml.html#web_xml_Features_Not_Supported
 
).

Regards,

Esteban

Prashant escribió:
> Hi,
>
> I want to run a piece of code only once, every time I deploy a new 
> version. How do I do that?
>
> >

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



Re: [appengine-java] Re: Is AppEngine down? My site is super-slow, static resources not loading

2009-11-18 Thread Esteban Masoero
There was some problems yesterdar, according to this: 
http://code.google.com/status/appengine/detail/serving-java/2009/11/17#ae-trust-detail-helloworld-get-java-latency


Jim McCabe escribió:
> I have more information on this now.
>
> If I navigate to the active version from the App Engine control panel,
> it loads up super fast and works great.  But the domain support from
> Google Apps is not working.  I will file a ticket with them instead of
> treating this like a GAE issue.
>
> - Jim
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=.
>
>
>
>   

--

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




Re: [appengine-java] Re: My indexes are stuck in "BUILDING" state after deploying my app for the first time (i.e. on an empty datastore)

2009-12-01 Thread Esteban Masoero
I think the biggest problem is not knowing approximately how long your 
app will be down.
In our case, it took 24 hours 
(http://groups.google.com/group/google-appengine-java/browse_thread/thread/5dace4efbd0e45bd).
Apparently it doesn't depend on the size of your database. To my 
knowledge, the indexes "build system" is centralized some how, so that 
would be the reason because it may take too long.
I'd love to have some feeback about google guys on this issue.

Regards,

Esteban


Tim Cooper escribió:
> As you both said, I just needed to wait - they're all good now.  But I
> find this a little worrying:  is this a common thing, that AppEngine
> goes down for 2 hours?  Is this classified as "going down"?  Because
> it shouldn't take 2 hours to build indexes on 34K worth of data (just
> 5 entities).
>
>
> On Dec 1, 4:43 am, david ruescas  wrote:
>   
>> A similar thing happened to me yesterday. The problem resolved itself
>> overnight, cant tell you exactly how long it took.
>>
>> On 11/30/09, Jeffrey Goetsch  wrote:
>>
>>
>>
>> 
>>> I was having about 2 hour index build times.  I think a lot of people were
>>> launching over the weekend.
>>>   
>>> --Jeff
>>>   
>>> On Sun, Nov 29, 2009 at 8:36 PM, Tim Cooper  wrote:
>>>   
 I've just deployed my AppEngine application for the first time.  It
 was working perfectly when running in the development environment on
 my laptop, but doesn't work in its deployed state.  I'm getting "500
 Server Error", "DatastoreNeedIndexException: no matching index
 found".   The dashboard says that all my 7 indexes are still in the
 BUILDING state and have been for about an hour.   The datastore was
 empty before I did this, and it now has a total size of 34K...(somehow
 2 entities managed to get half created).
 
 The documentation says to mail this group if it appears that the
 indexes are stuck.  I haven't been able to get useful information from
 the group threads from the other people who have reported this
 problem.
 
 The application-id is "edvaltt".
 
 I'm unable to continue my work.  Can anyone help?
 
 --
 
 You received this message because you are subscribed to the Google Groups
 "Google App Engine for Java" group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com>>>  unsubscr...@googlegroups.com>
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.
 
>>> --
>>>   
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to google-appengine-j...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>   
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>
>   

--

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




[appengine-java] How to make a query searching by an "@PrimaryKey String" field from the console using GQL

2010-02-11 Thread Esteban Masoero

Hi there, I have something like:

public class User {
   @PrimaryKey
@Persistent
private String username;


But I couln't find a way of making work a query like "select * from User 
where username = 'someUserName'" from the admin console. It's driving me 
nuts!, Anyone has any idea how to do this? I guess it's supossed to be 
achieved with the KEY(..) feature, but I tried different ways and 
couldn't get it to work.


Thanks,

Esteban

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



Re: [appengine-java] Cannot deploy - Version not ready

2010-02-11 Thread Esteban Masoero
I'm having  the same problem. As I saw in another emails some time ago, 
the system might be experimenting some technical dificulties, an if you 
see the system status ( http://code.google.com/status/appengine ) the 
datastore doesn't look good. So I guess we'll have to wait...


El 11/02/2010 18:37, david ruescas escribió:
Ive been trying to update my app for the past hour, and I keep getting 
version not ready errors, the log always shows something like this:


Unable to update:
java.lang.RuntimeException: Version not ready.
at 
com.google.appengine.tools.admin.AppVersionUpload.commit(AppVersionUpload.java:456)
at 
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:127)
at 
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:56)
at 
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:271)
at 
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:148)
at 
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

I havent changed anything important, so it looks like a temporary 
glitch, but it doesnt go away..


Any ideas?

Thanks

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


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



[appengine-java] Re: How to make a query searching by an "@PrimaryKey String" field from the console using GQL

2010-02-15 Thread Esteban Masoero
Sorry to bother with this again, but I think this feature should work 
without problems. Hasn't anybody tried to to something alike?


El 11/02/2010 16:03, Esteban Masoero escribió:

Hi there, I have something like:

public class User {
   @PrimaryKey
@Persistent
private String username;


But I couln't find a way of making work a query like "select * from 
User where username = 'someUserName'" from the admin console. It's 
driving me nuts!, Anyone has any idea how to do this? I guess it's 
supossed to be achieved with the KEY(..) feature, but I tried 
different ways and couldn't get it to work.


Thanks,

Esteban


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



Re: [appengine-java] Re: Handling HardDeadlineExceededError

2010-02-15 Thread Esteban Masoero

yes, I'm sure I'm not catching anything.

In fact, I did some tests and find out that most of the time the 
deadline exception is not thrown when executing some code (untill now 
the deadline exception only happened once), but It is always thrown when 
you are doing something like sleep(). If you are executing some code, 
then most of the time I only get a message of "Error: Server Error" with 
status code 500 (and strangely the log doesn't say anything this time, 
but I guess is still the HardDeadlineExceededError).

Here's the code:

public class SimpleServlet extends HttpServlet {

private static final long serialVersionUID = -3775863594932985057L;

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {

try {
int time = req.getParameter("sleep") != null ? 
Integer.valueOf(req.getParameter("sleep")) : 40;

resp.getWriter().println("Sleeping " + time + " seconds...");
Thread.sleep(time * 1000);
resp.getWriter().println("Interating infinitly...");
int i = 0;
boolean b = true;
while (b) {
i++;
}
} catch (InterruptedException e) {
System.out.println("InterruptedException");
resp.getWriter().println("InterruptedException");
} catch (DeadlineExceededException e) {
System.out.println("DeadlineExceededException");
resp.getWriter().println("DeadlineExceededException");
} catch (Throwable e) {
System.out.println("Catch throwable");
resp.getWriter().println("Catch throwable");
}
}

@Override
protected void doPost(HttpServletRequest req, HttpServletResponse 
resp) throws ServletException, IOException {

this.doGet(req, resp);
}
}


I guess the deadline handling process ise still a bit immature and we 
should not rely upon it.


Thanks,

Esteban



El 12/02/2010 18:40, John Patterson escribió:
I believe that the stack trace from a HDEE is not accurate.  I found 
that it seemed to be copied from the first DEE.  Are you sure you are 
not catching and ignoring this first?


On 12 Feb 2010, at 22:24, Esteban Ignacio Masoero wrote:


Hi there:

I'm facing the same problem. I tried and I tried and I still can't 
catch any deadlineException that is supossed to be thrown when I 
exceed the 30 seconds. The only thing I see is a 
HardDeadlineExceededError, and in my case it ocurrs in the middle of 
a JDOQuery.deletePersistentAll() method.


Anyone has any ideas? All I want to do is make sure that I'm handling 
that situation in case it happens. Here's the stack:


com.google.apphosting.runtime.HardDeadlineExceededError: This request 
(ccc45fc5ce7541bd) started at 2010/02/12 14:51:12.763 UTC and was 
still executing at 2010/02/12 14:51:42.551 UTC.
at 
com.google.appengine.runtime.Request.process-ccc45fc5ce7541bd(Request.java)

at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(Unknown 
Source)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(Unknown 
Source)

at java.util.concurrent.CountDownLatch.await(Unknown Source)
at 
com.google.net.rpc.util.RpcWaiter.waitForRpcsToFinish(RpcWaiter.java:96)

at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:98)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:48)
at 
com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:52)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl$3.run(DatastoreServiceImpl.java:225)
at 
com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java:30)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.delete(DatastoreServiceImpl.java:211)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.delete(DatastoreServiceImpl.java:192)
at 
com.google.appengine.api.datastore.DatastoreServiceImpl.delete(DatastoreServiceImpl.java:184)
at 
org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.delete(RuntimeExceptionWrappingDatastoreService.java:141)
at 
org.datanucleus.store.appengine.DatastorePersistenceHandler.delete(DatastorePersistenceHandler.java:196)
at 
org.datanucleus.store.appengine.DatastorePersistenceHandler.deleteObject(DatastorePersistenceHandler.java:612)
at 
org.datanucleus.state.JDOStateManagerImpl.internalDeletePersistent(JDOStateManagerImpl.java:4198)
at 
org.datanucleus.state.JDOStateManagerImpl.deletePersistent(JDOStateManagerImpl.java:4166)
at 
org.datanucleus.ObjectManagerImpl.deleteObjectInternal(ObjectManagerImpl.java:1470)
at 
org.datanucleus.ObjectManagerImpl.deleteObject(ObjectManagerImpl.java:1395)
at 
org.datanucleus.ObjectManagerImpl.deleteObjects(ObjectManagerImpl.java:1534)
at 
org.datanucleus.store.query.Query.perform

Re: [appengine-java] Re: Handling HardDeadlineExceededError

2010-02-16 Thread Esteban Masoero

Thanks for the response Don.
I would suggest altering the page 
http://code.google.com/intl/en/appengine/docs/java/runtime.html to 
clarify this.


Thanks again,

Esteban

El 16/02/2010 13:08, Don Schwarz escribió:
We don't currently make any guarantees about throwing 
DeadlineExceededException or HardDeadlineExceededError if you're in a 
tight CPU loop.


We may in the future, but for the moment please only rely on getting 
notifications of deadlines if you're doing one of the following:

a) periodically making API calls,
b) periodically doing I/O (e.g. loading data from files), or
c) sleeping.

On Mon, Feb 15, 2010 at 10:58 AM, Esteban Masoero 
mailto:emaso...@getsense.com.ar>> wrote:


yes, I'm sure I'm not catching anything.

In fact, I did some tests and find out that most of the time the
deadline exception is not thrown when executing some code (untill
now the deadline exception only happened once), but It is always
thrown when you are doing something like sleep(). If you are
executing some code, then most of the time I only get a message of
"Error: Server Error" with status code 500 (and strangely the log
doesn't say anything this time, but I guess is still the
HardDeadlineExceededError).
Here's the code:

public class SimpleServlet extends HttpServlet {

private static final long serialVersionUID =
-3775863594932985057L;

@Override
protected void doGet(HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException {
try {
int time = req.getParameter("sleep") != null ?
Integer.valueOf(req.getParameter("sleep")) : 40;
resp.getWriter().println("Sleeping " + time + "
seconds...");
Thread.sleep(time * 1000);
resp.getWriter().println("Interating infinitly...");
int i = 0;
boolean b = true;
while (b) {
i++;
}
} catch (InterruptedException e) {
System.out.println("InterruptedException");
resp.getWriter().println("InterruptedException");
} catch (DeadlineExceededException e) {
System.out.println("DeadlineExceededException");
resp.getWriter().println("DeadlineExceededException");
} catch (Throwable e) {
System.out.println("Catch throwable");
resp.getWriter().println("Catch throwable");
}
}

@Override
protected void doPost(HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException {
this.doGet(req, resp);
}
}


I guess the deadline handling process ise still a bit immature and
we should not rely upon it.

Thanks,

Esteban



El 12/02/2010 18:40, John Patterson escribió:

I believe that the stack trace from a HDEE is not accurate.  I
found that it seemed to be copied from the first DEE.  Are you
sure you are not catching and ignoring this first?

On 12 Feb 2010, at 22:24, Esteban Ignacio Masoero wrote:


Hi there:

I'm facing the same problem. I tried and I tried and I still
can't catch any deadlineException that is supossed to be thrown
when I exceed the 30 seconds. The only thing I see is a
HardDeadlineExceededError, and in my case it ocurrs in the
middle of a JDOQuery.deletePersistentAll() method.

Anyone has any ideas? All I want to do is make sure that I'm
handling that situation in case it happens. Here's the stack:

com.google.apphosting.runtime.HardDeadlineExceededError: This
request (ccc45fc5ce7541bd) started at 2010/02/12 14:51:12.763
UTC and was still executing at 2010/02/12 14:51:42.551 UTC.
at
com.google.appengine.runtime.Request.process-ccc45fc5ce7541bd(Request.java)
at sun.misc.Unsafe.park(Native Method)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at

java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(Unknown
Source)
at

java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(Unknown
Source)
at java.util.concurrent.CountDownLatch.await(Unknown Source)
at
com.google.net.rpc.util.RpcWaiter.waitForRpcsToFinish(RpcWaiter.java:96)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:98)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:48)
at

com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:52)
at

com.google.appengine.api.datastore.DatastoreServiceImpl$3.run(DatastoreServiceImpl.java:225)
at

com.google.appengine.api.dat

Re: [appengine-java] delete log and entities

2010-02-16 Thread Esteban Masoero

Hi, I'm also interested in a both features, mainly the datastore one.
Are we going to have something like this soon?

Thanks,

Esteban

El 30/01/2010 6:08, Andrés Cerezo escribió:

Hello!! Ho can I delete the logs and the entities of my project in app engine?
I need it to initializate all the system.
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-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Problems using a ThreadLocal variable

2010-02-16 Thread Esteban Masoero

Hi there:

Since today, my app started to have problems when using a ThreadLocal 
variable. I'm using wicket framework, and it happens that the first 
request to the page is fine, but sometimes I get an exception caused by 
wicket saying that the app (which is stored in a threadlocal variable) 
is not found (is null).
I didn't make any change to the framework related to that, I only made 
some minor changes that have no relation to this problem.
Has anyone experienced something alike? Can any guy from google give 
some hint about this?


Thanks,

Esteban

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



Re: [appengine-java] Re: Problems using a ThreadLocal variable

2010-02-17 Thread Esteban Masoero

Thanks for the response.
I must clarify that my app was already running smoothly on GAE (both in 
development and deployment environments), event with a file upload 
implementation.
However, from yesterday I started to see that kind of errors and wanted 
to know if something strange was happening with this kind of variables.


Anyway, I'll keep looking for a solution.

Thanks,

Esteban

El 17/02/2010 10:53, Jake escribió:

Hey,

There are a fair number of posts on how to implement Wicket on GAE.
E.g. 
http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/

I'm currently working on a pretty large Wicket/GAE project and, while
I've hit a few hiccups, everything has worked in the long run.  Two
quick comments:

1.  Poor detaching/coding practices in Wicket fill up the Session very
quickly.  Since the examples use HttpSession to back the Wicket
Session, and GAE has a max of 1MB on the HttpSession, you need to be
careful.
2.  File uploads need to be tweaked.  I can't find the files right
now, but a small bit of searching turns up someone who has created a
good workaround using the datastore.

Jake

On Feb 16, 6:24 pm, Brian  wrote:
   

I have not used Wicket myself, but have you 
seenhttp://groups.google.com/group/google-appengine-java/web/will-it-play...
?  It looks like Wicket must be massaged a little to work...

On Feb 16, 3:36 pm, Esteban Masoero  wrote:

 

Hi there:
   
 

Since today, my app started to have problems when using a ThreadLocal
variable. I'm using wicket framework, and it happens that the first
request to the page is fine, but sometimes I get an exception caused by
wicket saying that the app (which is stored in a threadlocal variable)
is not found (is null).
I didn't make any change to the framework related to that, I only made
some minor changes that have no relation to this problem.
Has anyone experienced something alike? Can any guy from google give
some hint about this?
   
 

Thanks,
   
 

Esteban
   
   


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



Re: [appengine-java] Re: Problems using a ThreadLocal variable

2010-02-18 Thread Esteban Masoero
Hi there, I just wanted to say that I finally fixed the issue, and 
wanted to share the solution so anyone else using wicket don't have to 
spend plenty of hours trying to find out what's the problem with this 
kind of cases.
The thing was that, as we all know, the "cloud" is  a distributed 
environment, and I was using the class PackageResource for static 
resources, when in fact the proper class for distributed environments 
was ResourceReference. I changed that and It started working again.
The error I was getting from wicket was: " There is no application 
attached to current thread Runtime Network Thread ".


Regards,

Esteban

El 17/02/2010 11:41, Esteban Masoero escribió:

Thanks for the response.
I must clarify that my app was already running smoothly on GAE (both 
in development and deployment environments), event with a file upload 
implementation.
However, from yesterday I started to see that kind of errors and 
wanted to know if something strange was happening with this kind of 
variables.


Anyway, I'll keep looking for a solution.

Thanks,

Esteban

El 17/02/2010 10:53, Jake escribió:

Hey,

There are a fair number of posts on how to implement Wicket on GAE.
E.g. 
http://www.danwalmsley.com/2009/04/08/apache-wicket-on-google-app-engine-for-java/ 



I'm currently working on a pretty large Wicket/GAE project and, while
I've hit a few hiccups, everything has worked in the long run.  Two
quick comments:

1.  Poor detaching/coding practices in Wicket fill up the Session very
quickly.  Since the examples use HttpSession to back the Wicket
Session, and GAE has a max of 1MB on the HttpSession, you need to be
careful.
2.  File uploads need to be tweaked.  I can't find the files right
now, but a small bit of searching turns up someone who has created a
good workaround using the datastore.

Jake

On Feb 16, 6:24 pm, Brian  wrote:
I have not used Wicket myself, but have you 
seenhttp://groups.google.com/group/google-appengine-java/web/will-it-play... 


?  It looks like Wicket must be massaged a little to work...

On Feb 16, 3:36 pm, Esteban Masoero  wrote:


Hi there:
Since today, my app started to have problems when using a ThreadLocal
variable. I'm using wicket framework, and it happens that the first
request to the page is fine, but sometimes I get an exception 
caused by

wicket saying that the app (which is stored in a threadlocal variable)
is not found (is null).
I didn't make any change to the framework related to that, I only made
some minor changes that have no relation to this problem.
Has anyone experienced something alike? Can any guy from google give
some hint about this?
Thanks,
Esteban


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



Re: [appengine-java] How to handle schema change on JDO data model class?

2010-02-22 Thread Esteban Masoero
The only thing we could do was to write some special low-level api code 
to update the schema properly (low-level api is more flexible and 
doesn't have issues abou querying old or new data, they are all entities 
with list of fields).


For example, when adding a field that uses a primitve type to an object. 
You can't query all objects with JDO pretending to store them in the 
recently modified object, because null cannot be asigned to the non-null 
field, but you can query the objects using the low level api and set a 
default value for the new field.


Of course this is far far away from being a efficient way of updating 
your schema, but I don't know whether there's some better (at least for 
java)


Regards,

Esteban

El 22/02/2010 8:11, opok escribió:

What about rename/add/remove persistent field or change its data type?
I found there are some exceptions thrown out while querying on old
data. What should I do? Any document for this problem?

   


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