[appengine-java] JDO new+update txn commits loosing data...

2009-11-30 Thread Stevko
I'm struggling with a JDO data loss situation.
The code below will NEW a  TextEntry object and hook it into the
object tree just fine.
The copy DTO updates are performed without error/exception thrown but
all updates are lost.
The fields that are being lost are privateComment, byLine,
shortContent, longContent, longContentSize.

I've attached a DN transaction log at the bottom.
The object state is marked as 'dirty' but the ObjectManager does not
'put' the new string values.
According to the logs, for some unknown reason, the DB
DatastorePersistenceHandler commits the "new"  object prior to the
copy of the associated data from the action DTO into the persistent
object.

I've broken this up into two sequential transactions complete with
isolated lookups but the data loss continues.

//-
// abridged code - error checking removed...
//
private final Provider pmp;
private PersistenceManager pm;

@Override
public SaveTextEntryResult execute(SaveTextEntry action,
ExecutionContext context) throws ActionException {

String entryId = action.getEntryId();
SaveTextEntryResult result;
try {
pm = pmp.get();
pm.currentTransaction().begin();

TextEntry entry;

// --
// is this new or update?
if (action.isNewEntry()) {

// lookup the chapterid and verify accountid
TextChapter chapter = 
diaryManager.lookupTextChapterById(action
.getChapterId());
entry = new TextEntry(action.getTimestamp(), chapter,
action.getSourceType(), 
action.getSourceId());

} else {
// look up the textentry id
entry = 
diaryManager.lookupTextEntryById(action.getEntryId());
}
//>>> new object is flushed here <<<--
// copy fields from action to object
entry.setPrivateComment(action.isPrivateComment());
entry.setByLine(action.getByLine());
logger.info("SaveTextEntry() short content =" +
action.getShortContent() );
entry.setShortContent(action.getShortContent());
logger.info("SaveTextEntry() long content =" + 
action.getLongContent
() );
entry.setLongContent(action.getLongContent());

//>>> persist object updates are not flushed here  <<<--
pm.currentTransaction().commit();

result = new SaveTextEntryResult(true, entry.getId() );

} finally {

if (pm.currentTransaction().isActive()) {
logger.severe("SaveTextEntry caught exception");
result = new SaveTextEntryResult(false, "");
pm.currentTransaction().rollback();
}
}

return result;
}
//
// related method below
public TextChapter lookupTextChapterById(String id) {
pm = pmp.get();

TextChapter chapter = pm.getObjectById(TextChapter.class, id);

return (chapter);
}

//
// Persistent object definition (bean methods removed)

@PersistenceCapable(identityType = IdentityType.APPLICATION )
@FetchGroup(  name="children", members={
@Persistent(name="commentEntrys"),
@Persistent(name="chapter")
})
public class TextEntry implements Entry, Serializable,
Comparable {

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

@Persistent
private Long accountId = new Long(0);

// Parent collection with ArrayList
@Persistent
private TextChapter chapter;

@Persistent
private Long timestamp = new Long(0);

@Persistent
private boolean privateComment = false;

@Persistent
private String byLine = "";

@Persistent(defaultFetchGroup="true")
private SourceType source = SourceType.UNKOWN;

@Persistent
private String sourceId = "";

@Persistent(defaultFetchGroup="true")
private String shortContent = null;

@Persistent(defaultFetchGroup="true")
private String longContentString = null;

@Persistent(defaultFetchGroup="true")
private Long longContentSize = new Long(-1);

@Persistent(mappedBy = "textEntry")
@Order(column="TEXTENTRY_COMMENTENTRY_IDX")
private TreeSet< CommentEntry> commentEntrys = new TreeSet<
CommentEntry>();

public TextEntry(Long timestamp, TextChapter chapter,  SourceType
source,
String sourceId) {
this.timestamp = timestamp;
this.source = source;
this.sourceId = sourceId;

// setup external references
this.chapter = chapter;
this.accountId = chapter.getAccountId();
chapter.add(this);
}

/

[appengine-java] Is there an api to retrieve the

2009-12-06 Thread Stevko
Is there an api, property, or environment variable that would allow
for the retrieval of the Application Identifier?
Specifically the name listed under the My Applications left most
column.

--

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] Discussion on will-it-play-in-app-engine

2010-02-09 Thread Stevko
Has anyone tried some of the payment gateways within AppEngine?
I am looking at the Chase Orbital Secure Payment Gateway.

One issue I have from an initial look at their Developer Guide is the
requirement for an additional SSL security provider:
security.provider.3=com.sun.net.ssl.internal.ssl.Provider

-- 
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] Blobstore UploadBlobServlet.java NPE

2010-02-11 Thread Stevko
I'm trying to post files into the blobstore on my dev station using
eclipse.
The _BlobInfo_ objects are appearing within the datastore viewer but
this exception keep getting thrown for the first time I post the form.

Is there anyone with access to UploadBlobServlet.java that can point
me to why I'm getting a NPE?
--Andy.Stevko

Feb 11, 2010 8:06:43 PM com.google.apphosting.utils.jetty.JettyLogger
warn
WARNING: /_ah/upload/
ag5uaW51a3VtZW1vcmllc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGIYIDA
java.lang.NullPointerException
at
com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
365)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
$000(UploadBlobServlet.java:72)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet
$1.run(UploadBlobServlet.java:100)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
487)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1093)
at
com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:
67)
at
com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:
122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
110)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
51)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
121)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
405)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:352)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
506)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
396)
at org.mortbay.thread.BoundedThreadPool
$PoolThread.run(BoundedThreadPool.java:442)

-- 
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] index for both asc and desc on same property?

2010-04-05 Thread Stevko
is there a way to index an object on the same field in both ascending
and descending directions?

I've tried to use this in my datastore-indexes.xml but the app engine
does not reflect the update_indexes command.

before:
   



got this error:

No matching index found.. 




Tried this datastore-indexes.xml entry:
   




-- 
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: index for both asc and desc on same property?

2010-04-05 Thread Stevko
After closely reading 
http://code.google.com/appengine/docs/java/config/indexconfig.html
I realize my second attempt would not work...

Trying to separate them into two different  tags.


On Apr 5, 12:23 pm, Stevko  wrote:
> is there a way to index an object on the same field in both ascending
> and descending directions?
>
> I've tried to use this in my datastore-indexes.xml but the app engine
> does not reflect the update_indexes command.
>
> before:
>    
>         
>     
>
> got this error:
>
> No matching index found..  ancestor="true" source="manual">
>         
>     
>
> Tried this datastore-indexes.xml entry:
>    
>         
>         
>     

-- 
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: Viewing Emails in dev using log4j

2010-05-12 Thread Stevko
Eurig - Did you find it? Its probably not log4j due to app engine
using java.util.logging.Logger technology.

I am also interested in where this log file is. I'm using Eclipse
which is monitoring the log output and see nothing there.
Is there another log I'm unaware of? I would assume it would be in the
WEB-INF/appengine-generated directory but nothing shows there.

--Stevko

On Apr 5, 3:20 am, Eurig Jones  wrote:
> Hi,
>
> From  http://code.google.com/appengine/docs/java/mail/overview.html#Develop...
> ...
>
> "When an application running in the developmentservercalls the Mail
> service to send an email message, the message is printed to thelog.
> The Java developmentserverdoes not send the email message."
>
> My question is, what log4j setup do I use to output these emails?
>
> Regards,
> Eurig Jones

-- 
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 detect a nesting JDO transactions?

2010-06-04 Thread Stevko
I believe I am getting JDO commit Exceptions due to the transactions
nesting although I'm not sure.

Will this detect the situation where I am starting a transaction when
another is pending?

 PersistenceManager pm =
PersistenceManagerFactory.get().getPersistenceManager();
 assert  pm.currentTransaction().isActive() == false  : "arrrgh";
 pm.currentTransaction().begin();


Is there a better or more reliable way?
--- Stevko

-- 
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] runtime implications of JDO @PersistenceCapable( detachable="true")

2010-06-09 Thread Stevko
Does anyone have experience with the runtime execution/performance
implications of using the JDO annotation  detachable="true" in my
persistent object schema?
--stevko

-- 
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] deleting appengine types using JDO

2010-08-14 Thread Stevko
Using JDO api layers

Do I need to use 'dependent=true' to delete Text and Blob types?
Or is it automatic like String, Long , and other native types?

-- 
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: OneToOne relationship with java.lang.Long ids

2010-10-12 Thread Stevko
Ah, if you want to do this with a relational model rather than a
networked model, you would define your objects such that each is a root
entity (and thereby ids can be type Long ). This is analogous to
holding a foreign key rather than embedding the owned entity.


@Entity
public class Event {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
Long _id;


// store the id of the User rather than the User object itself.
Long _host_id;
...
}


The hardest thing with proofing a model decision like this is scoping
the transactions based on your use cases.
Coordinating multiple separate transactions on separate entities makes
for interesting roll-forward / rollback coding.


re: design portability
I believe DataNucleus supports MySQL. If you are going to use a ORM,
you just have to make sure it is portable

-- 
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: bean.XMLEncoder AccessControlException

2010-10-15 Thread Stevko
Found an issue #3866 being worked on presently...
Java policy changed (throwing AccessControlException for read of basic
things like java.version)

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

-- 
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] migrating to 1.4 task queues

2010-12-08 Thread Stevko
I'm dealing with the change in task queue apis away from .labs.

One change I've encoutered that is not mentioned in the release notes:
http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes

 import static
com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.url;
is now undefined.

I suspect this is the proper replacement method
 import static
com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl;

Any other surprises with migrating to 1.4 task queues?

-- 
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: Cant retrieve a list of objects when using GAE and JPA.

2010-12-21 Thread Stevko
I may be dated on this with not keeping up on the latest gwt advances.
The problems is a JPA or JDO augmented class is not directly 
portable (serialize/deserialize)  from the GAE/J class to a GWT/js class 
like non-persistent classes are.

The classic DTO case (and not elegant) is to copy+paste your persistent 
classes into a shared model w/o the database twist and write the 
transporters.
Many folks today have decided to skip the JPA layer and use Objectify for 
GAE database access. Its led to less headaches for some bloggers.




-- 
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] JDO new+update txn commits loosing data...

2009-12-01 Thread a stevko
WOW Max!
You deserve a gold star for your insight, TY! TY! TY!

I added a PM parameter to my lookup utility layer and the code suddenly
works as desired.
While I was using a static PMFactory, I didn't realize that calling get()
would begin a new transaction context every time,
It does makes sense given the platforms 1 txn per entity group constraint.

What I don't understand is what triggered the commit of the new object. I
would assume the commit would be triggered by the 2nd pm going out of scope
but it was already out of scope when the parent object was passed back from
the lookup method.
--Andy



On Tue, Dec 1, 2009 at 10:23 AM, Max Ross (Google) <
maxr+appeng...@google.com > wrote:

> My suspicion is that in the update case you are starting your txn with a
> PersistenceManager, then using a different PersistenceManager to load the
> TextEntry (diaryManager.getTextEntryById().  I can't be sure because you
> haven't posted the code for diaryManager, but if it does the same thing as
> lookupTextChapterById() and pmp.get() creates a new PersistenceManager, then
> this is probably what is going on.  You're not seeing the updates when you
> commit the txn because the txn is not associated with the PersistenceManager
> that loaded the TextEntry.  I'd recommend using the same PersistenceManager
> for all these operations.
>
> Hope this helps,
> Max
>
>
> On Sun, Nov 29, 2009 at 4:00 PM, Stevko  wrote:
>
>> I'm struggling with a JDO data loss situation.
>> The code below will NEW a  TextEntry object and hook it into the
>> object tree just fine.
>> The copy DTO updates are performed without error/exception thrown but
>> all updates are lost.
>> The fields that are being lost are privateComment, byLine,
>> shortContent, longContent, longContentSize.
>>
>> I've attached a DN transaction log at the bottom.
>> The object state is marked as 'dirty' but the ObjectManager does not
>> 'put' the new string values.
>> According to the logs, for some unknown reason, the DB
>> DatastorePersistenceHandler commits the "new"  object prior to the
>> copy of the associated data from the action DTO into the persistent
>> object.
>>
>> I've broken this up into two sequential transactions complete with
>> isolated lookups but the data loss continues.
>>
>> //-
>> // abridged code - error checking removed...
>> //
>> private final Provider pmp;
>> private PersistenceManager pm;
>>
>> @Override
>> public SaveTextEntryResult execute(SaveTextEntry action,
>>ExecutionContext context) throws ActionException {
>>
>>String entryId = action.getEntryId();
>>SaveTextEntryResult result;
>>try {
>>pm = pmp.get();
>>pm.currentTransaction().begin();
>>
>>TextEntry entry;
>>
>>// --
>>// is this new or update?
>>if (action.isNewEntry()) {
>>
>>// lookup the chapterid and verify accountid
>>TextChapter chapter =
>> diaryManager.lookupTextChapterById(action
>>.getChapterId());
>>entry = new TextEntry(action.getTimestamp(),
>> chapter,
>>action.getSourceType(),
>> action.getSourceId());
>>
>>} else {
>>// look up the textentry id
>>entry =
>> diaryManager.lookupTextEntryById(action.getEntryId());
>>}
>> //>>> new object is flushed here <<<--
>>// copy fields from action to object
>>entry.setPrivateComment(action.isPrivateComment());
>>entry.setByLine(action.getByLine());
>>logger.info("SaveTextEntry() short content =" +
>> action.getShortContent() );
>>entry.setShortContent(action.getShortContent());
>>logger.info("SaveTextEntry() long content =" +
>> action.getLongContent
>> () );
>>entry.setLongContent(action.getLongContent());
>>
>> //>>> persist object updates are not flushed here  <<<--
>>pm.currentTransaction().commit();
>>
>>result = new SaveTextEntryResult(true, entry.getId() );
>>
>>

Re: [appengine-java] JDO new+update txn commits loosing data...

2009-12-01 Thread a stevko
That was what was driving me mad.

I was able to persistently navigate to it in the collection of the parent
object (in the initial new state).
Also DN logged it making the object persistent.
  Nov 29, 2009 9:45:58 PM
org.datanucleus.ObjectManagerImp persistObjectInternal
  FINE: Making object persistent
: "com.ninuku.diary2.server.diary.texten...@13c7edf"

Thanks again for unblocking me on this issue. This JDO ORM layer is a really
tough nut to crack. I used to evangelize pure ODBMS for ObjectDesign and
thought that was hard. Your JDO snipets that work series is a real boon.
Please consider formalizing them.


On Tue, Dec 1, 2009 at 9:12 PM, Max Ross (Google)

> wrote:

> :-)  Happy to help Andy.
>
> I'm not sure what is triggering the commit of the new object since I don't
> see you calling pm.makePersistent() anywhere.  How are you concluding that
> the TextEntry is actually persisted?
>
> Max
>
> On Tue, Dec 1, 2009 at 12:25 PM, a stevko  wrote:
>
>> WOW Max!
>> You deserve a gold star for your insight, TY! TY! TY!
>>
>> I added a PM parameter to my lookup utility layer and the code suddenly
>> works as desired.
>> While I was using a static PMFactory, I didn't realize that calling get()
>> would begin a new transaction context every time,
>> It does makes sense given the platforms 1 txn per entity group constraint.
>>
>> What I don't understand is what triggered the commit of the new object. I
>> would assume the commit would be triggered by the 2nd pm going out of scope
>> but it was already out of scope when the parent object was passed back from
>> the lookup method.
>> --Andy
>>
>>
>>
>> On Tue, Dec 1, 2009 at 10:23 AM, Max Ross (Google) <
>> maxr+appeng...@google.com > wrote:
>>
>>> My suspicion is that in the update case you are starting your txn with a
>>> PersistenceManager, then using a different PersistenceManager to load the
>>> TextEntry (diaryManager.getTextEntryById().  I can't be sure because you
>>> haven't posted the code for diaryManager, but if it does the same thing as
>>> lookupTextChapterById() and pmp.get() creates a new PersistenceManager, then
>>> this is probably what is going on.  You're not seeing the updates when you
>>> commit the txn because the txn is not associated with the PersistenceManager
>>> that loaded the TextEntry.  I'd recommend using the same PersistenceManager
>>> for all these operations.
>>>
>>> Hope this helps,
>>> Max
>>>
>>>
>>> On Sun, Nov 29, 2009 at 4:00 PM, Stevko  wrote:
>>>
>>>> I'm struggling with a JDO data loss situation.
>>>> The code below will NEW a  TextEntry object and hook it into the
>>>> object tree just fine.
>>>> The copy DTO updates are performed without error/exception thrown but
>>>> all updates are lost.
>>>> The fields that are being lost are privateComment, byLine,
>>>> shortContent, longContent, longContentSize.
>>>>
>>>> I've attached a DN transaction log at the bottom.
>>>> The object state is marked as 'dirty' but the ObjectManager does not
>>>> 'put' the new string values.
>>>> According to the logs, for some unknown reason, the DB
>>>> DatastorePersistenceHandler commits the "new"  object prior to the
>>>> copy of the associated data from the action DTO into the persistent
>>>> object.
>>>>
>>>> I've broken this up into two sequential transactions complete with
>>>> isolated lookups but the data loss continues.
>>>>
>>>> //-
>>>> // abridged code - error checking removed...
>>>> //
>>>> private final Provider pmp;
>>>> private PersistenceManager pm;
>>>>
>>>> @Override
>>>> public SaveTextEntryResult execute(SaveTextEntry action,
>>>>ExecutionContext context) throws ActionException {
>>>>
>>>>String entryId = action.getEntryId();
>>>>SaveTextEntryResult result;
>>>>try {
>>>>pm = pmp.get();
>>>>pm.currentTransaction().begin();
>>>>
>>>>TextEntry entry;
>>>>
>>>>// --
>>>>// is this new or update?
>>>>if (action.isNewEntry()) {
>>>>
>>>>/

Re: [appengine-java] Collections usge in Appengine Java

2009-12-02 Thread andy stevko
This is a common issue. You need to define a @FetchGroup( )  for your class
that names that member then add the FetchGroup to your persistence manager.

@FetchGroup(  name="children", members={
@Persistent(name="childcollection")
})
public class 

//---
PersistenceManager pm;
FetchPlan fp = pm.getFetchPlan();
fp.addGroup("children");


On Wed, Dec 2, 2009 at 9:50 AM, Avis developer wrote:

> I tried using ArrayList in a persistent way, but its not getting
> persistent.. It adds the value when i call the add method, but for
> retriving it still says null..
> Is this a bug or my programming fault ? Pls 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
> .
> 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.




Re: [appengine-java] Re: Collections usge in Appengine Java

2009-12-09 Thread andy stevko
Sorry for not seeing this earlier - I missed your reply post in the mail
stream.

FetchGroups are documented at
http://www.datanucleus.org/products/accessplatform_1_1/jdo/fetchgroup.html#dfg

The xml metadata they show is generated by the @FetchGroup annotation which
is documented at
http://www.datanucleus.org/products/accessplatform_1_1/jdo/annotations.html#FetchGroup

Strings and other basic java.lang types are in the default fetch group.
User defined types need to be added to a user named fetch group (or may be
added to the default group).

HTH,
--Andy

On Thu, Dec 3, 2009 at 11:10 PM, Avis developer
wrote:

> Sir thanks for the reply , but pl help me sir, am jus a beginner, can
> u pls be elaborate, thanks for spending ur time and effort
>
> --
>
> 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.




Re: [appengine-java] Backup & restore of my app - Is this really a joke or am I missing something?

2011-04-26 Thread A. Stevko
What exactly are you missing?

The fact that the backup may be missing recently committed data?
By definition, backups always contain stale data.
Omitting not-yet replicated data from a backup is not terrible nor
unexpected.

Perhaps you would like a 'checkpoint' feature? Suggest it in a ticket...


On Tue, Apr 26, 2011 at 12:44 AM, mscwd01  wrote:

> Hey
>
> Okay, I have a simple request - I want to backup all of my apps data
> on my local machine so that in the event of my data becoming corrupt
> or lost I can do a restore.
>
> So I search "backup/restore on gae" and only really find the bulk
> loader as a solution. The trouble is it really isn't a solution, it
> seems like an inadequate hack. Here is the first thing I read
> regarding the bulkloader:
>
> Note: This document applies to apps that use the master/slave
> datastore. If your app uses the High Replication datastore, it is
> possible to copy data from the app, but Google does not currently
> support this use case. If you attempt to copy from a High Replication
> datastore, you'll see a high_replication_warning error in the Admin
> Console, and the downloaded data might not include recently saved
> entities.
>
> I use the HR datastore :(
>
> So please tell me I'm missing something and there is a viable method
> to backup and restore your data.
>
> --
> 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: Google App Engine + Java Applet

2011-05-25 Thread A. Stevko
App Engine's JVM does not support java.applet because it only support server
side code.
Your Applet code is loaded into the server's static files and, after
downloading, the applet is loaded into the browser's jvm

On Wed, May 25, 2011 at 10:59 AM, SKP  wrote:

> Hi Ian
>
> How does that work, any idea? Because the GAE JRE doesnt support
> java.applet.Applet.
>
> Thanks
>
> On May 24, 1:52 pm, Ian Gillett  wrote:
> > Hi,
> >
> > You can run Applets on App Engine - we are using an Applet / App engine
> on
> > the App below:
> >
> > https://www.google.com/enterprise/marketplace/viewListing?productList...
> >
> > <https://www.google.com/enterprise/marketplace/viewListing?productList..
> .>
> > Cheers,
> > Ian.
> >
> >
> >
> >
> >
> >
> >
> > On Mon, May 23, 2011 at 11:07 PM, SKP  wrote:
> > > Hi
> >
> > > I have been trying to do Encryption /Decryption (using javax.crypto)
> > > on browser side i.e. using javascript. Data is stored in GAE's
> > > datastore.  I created a java applet that can encrypt/decrypt to use
> > > javax.crypto. But now i see that google app engine doesnt support
> > > java.applet.Applet . Is there any work around or anyway I can go about
> > > browser side encryption /decryption?
> >
> > > Thanks
> > > Sharada
> >
> > > --
> > > 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] newbie question: redirect users (GWT 2.3.0)

2011-06-02 Thread A. Stevko
Most every GWT app has only one entry point not counting the static html in
the war file.
The three pages you described are commonly set up as separate panels/views
that are dynamically placed into a main div within single page load.

You may want to read up on using  com.google.gwt.user.client.History for
tools on how to manipulate browser's history stack.
More advanced/complex apps use com.google.gwt.place.shared.Place for mapping
url tokens to presenters & views.

The war/WEB-INF/web.xml file controls the default page being loaded.
You can redirect it to whatever although I usually name my entry point
index.html.
  
  
index.html
  


On Thu, Jun 2, 2011 at 10:14 AM, meiaestro  wrote:

> Hi experts,
>
> I'v build a web application with three entry points so far:
>
> registration
> login
> start page
>
> As you can imagine I want to (or have to)  be able to dynamically
> redirect a user - depending on his authentication/session validation, etc. -
>  to the correct entry point, regardless which URL he choose. Example: user
> chooses "start page.html" but is not yet logged in nor does he have a valid
> session id. So I want to redirect him to "login.html" automatically.
>
> Now the question: what is the best way to redirect a user from one entry
> point to the next? Is it a simple Window.open() or is it a
> GWT.setModuleBaseURL().
>
> Second Question:
> Usually the index.html (or htmls/php/etc) is the first page a webserver is
> searching for, so people are used to it. Can I somehow map a virtual
> index.html to my entry point within the app server or should I use a simple
> header redirect?
>
> Thanks a lot!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/d3BNUnlOcTlQbzBK.
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Delete indexes for application

2010-09-15 Thread andy stevko
run appcfg.py vacuum_indexes

as described in
http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes


On Tue, Sep 14, 2010 at 11:43 AM, Barada Sahu  wrote:

> Hi,
> I need to delete the indexes for my java app as the column name has
> changed. I am now unable to perform any entity deletions because of
> the existing entries in the index table. Would it be possible to
> somehow delete all the indexes for my app?
>
> Regards
> Barada Sahu
>
> --
> 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.



Re: [appengine-java] [IDEA] Circumventing app engine cold start with a warm up

2010-09-16 Thread andy stevko
I was just thinking about this issue during an interview this morning.

I like your initServlet idea and think that it could also be used during
takedown to cleanup any external resources (like batched sequence counters).

An alternative for the scaling from 1 server to many startup problem is to
not route the triggering request to the newly started service but rather
keep the startup event trigger and route that request to an already warm
service. Extra points for not routing any requests until the new instance is
stabilized.




On Thu, Sep 16, 2010 at 10:42 AM, Maxim Veksler  wrote:

> Hey Guys,
>
> Just a quick 2.5cent idea.
>
> The current situation for applications running on the app engine is that a
> request that causes instance spin up (be it first request, or the unlucky
> one in high load) is usually cancelled because of timeout (30s). I'm
> observing this situation even for "virgin" applications that do nothing more
> then return "Hello World".
>
> Now, what if application developers could define a special API call (much
> like mail delivery to the application is handled by GAE) that will be called
> when GAE decides to spin yet another instance. This could solve the problem
> of requests being "canceled" in high load while the new JVM instance is
> loading. The GAE could allocate a "finite" amount of time from the "warm up"
> call to the "start of request delivery" to the new jvm (something like 60
> seconds?). The application developers could take advantage of this call
> (that will go to the "InitServlet") to do start up logic (population of
> MemCache, loading static maps from DataStore and co..)
>
> This could be poor's men solution for applications that *should* not lose
> requests, even if it's 1/10.
>
> I know about the planned "reserved instances" feature, don't really see the
> logic in this though as this approach doesn't seem to scale well: Say I'm
> holding 5 reserved instances. What happens if my requests get a peak... a
> truly massive slashdot peak which in theory should require yet another (well
> just for ex.) 100 instances? If GAE launches them and instantly starts
> forwarding requests to them then, assuming each instance takes 15sec to load
> - ~(15sec*95instances*)*0.40 requests are
> timed out. That's bad.
>
>
> Comments?
>
> Maxim.
>
> --
> 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.



Re: [appengine-java] problem, please help me

2010-09-17 Thread andy stevko
Seems pretty straight forward You need to define an index for 'Quote'
I suggest looking at
.../war/WEB-INF/appengine-generated/datastore-indexes.xml and
datastore-indexes-auto.xml
and correct the settings.
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Defining_Indexes_With_Configuration

There could also be a chance that the Quote index is still being built.
https://appengine.google.com/datastore/indexes


On Fri, Sep 17, 2010 at 2:05 PM, Ahmed Shoeib  wrote:

> my code work very well in my localhost
> after a time from uploading the code on appspot
> i face this problem
>
> what is this problem 
> how i can solve it ?
>
>
> 
> 1 - First This is Warning###
> 
>
> W 09-17 01:38PM 17.629
>
> /api/quote
> com.google.appengine.api.datastore.DatastoreNeedIndexException: no
> matching index found..   ancestor="false" source="manual">
>
>
>
>
>
>at
>
> com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:
> 40)
>at
>
> com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
> 67)
>at
>
> com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQueryImpl.java:
> 127)
>at
>
> com.google.appengine.api.datastore.PreparedQueryImpl.asIterator(PreparedQueryImpl.java:
> 87)
>at com.google.appengine.api.datastore.PreparedMultiQuery
> $DedupingMultiQueryIterator.getNextIterator(PreparedMultiQuery.java:
> 154)
>at com.google.appengine.api.datastore.PreparedMultiQuery
> $DedupingMultiQueryIterator.computeNext(PreparedMultiQuery.java:173)
>at com.google.appengine.api.datastore.PreparedMultiQuery
> $DedupingMultiQueryIterator.computeNext(PreparedMultiQuery.java:98)
>at
>
> com.google.appengine.api.datastore.AbstractIterator.tryToComputeNext(AbstractIterator.java:
> 52)
>at
>
> com.google.appengine.api.datastore.AbstractIterator.hasNext(AbstractIterator.java:
> 47)
>at com.google.appengine.api.datastore.BasePreparedQuery
> $UncompilablePreparedQuery$1.hasNext(BasePreparedQuery.java:78)
>at
>
> org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterator.hasNext(RuntimeExceptionWrappingIterator.java:
> 44)
>at
>
> org.datanucleus.store.appengine.query.LazyResult.resolveAll(LazyResult.java:
> 115)
>at
> org.datanucleus.store.appengine.query.LazyResult.size(LazyResult.java:
> 110)
>at
>
> org.datanucleus.store.appengine.query.StreamingQueryResult.size(StreamingQueryResult.java:
> 124)
>at
> com.fuoeg.dailyquote.api.DailyQuoteService.doGet(DailyQuoteService.java:
> 39)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>at
>
> com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
> 97)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
>
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
> 35)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
>
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> 43)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>at
>
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
> 238)
>at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>at org.mortbay.jetty.Server.handle(Server.java:326)
>at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:923)
>at
>
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
> 76)
>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>at
>
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
> 135)
>at
> com.

Re: [appengine-java] Re: problem, please help me

2010-09-17 Thread andy stevko
Perhaps you can figure this out by understanding way in which these files
are used as described at
http://code.google.com/appengine/docs/java/config/indexconfig.html#Using_Automatic_Index_Configuration




On Fri, Sep 17, 2010 at 3:36 PM, Ahmed Shoeib  wrote:

> i found these indexes for quote
>
> 
> 
>
>
>
> what is the problem in it ??
>
> On Sep 18, 12:51 am, andy stevko  wrote:
> > Seems pretty straight forward You need to define an index for 'Quote'
> > I suggest looking at
> > .../war/WEB-INF/appengine-generated/datastore-indexes.xml and
> > datastore-indexes-auto.xml
> > and correct the settings.
> http://code.google.com/appengine/docs/java/datastore/queriesandindexe...
> >
> > There could also be a chance that the Quote index is still being built.
> https://appengine.google.com/datastore/indexes
> >
> > On Fri, Sep 17, 2010 at 2:05 PM, Ahmed Shoeib <
> ahmedelsayed.sho...@gmail.com
> >
> > > wrote:
> > > my code work very well in my localhost
> > > after a time from uploading the code on appspot
> > > i face this problem
> >
> > > what is this problem 
> > > how i can solve it ?
> >
> > > 
> > > 1 - First This is Warning###
> > > 
> >
> > > W 09-17 01:38PM 17.629
> >
> > > /api/quote
> > > com.google.appengine.api.datastore.DatastoreNeedIndexException: no
> > > matching index found..   > > ancestor="false" source="manual">
> > >
> > >
> > >
> >
> > >at
> >
> > >
> com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:
> > > 40)
> > >at
> >
> > >
> com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
> > > 67)
> > >at
> >
> > >
> com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQueryImpl.java:
> > > 127)
> > >at
> >
> > >
> com.google.appengine.api.datastore.PreparedQueryImpl.asIterator(PreparedQueryImpl.java:
> > > 87)
> > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > $DedupingMultiQueryIterator.getNextIterator(PreparedMultiQuery.java:
> > > 154)
> > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > $DedupingMultiQueryIterator.computeNext(PreparedMultiQuery.java:173)
> > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > $DedupingMultiQueryIterator.computeNext(PreparedMultiQuery.java:98)
> > >at
> >
> > >
> com.google.appengine.api.datastore.AbstractIterator.tryToComputeNext(AbstractIterator.java:
> > > 52)
> > >at
> >
> > >
> com.google.appengine.api.datastore.AbstractIterator.hasNext(AbstractIterator.java:
> > > 47)
> > >at com.google.appengine.api.datastore.BasePreparedQuery
> > > $UncompilablePreparedQuery$1.hasNext(BasePreparedQuery.java:78)
> > >at
> >
> > >
> org.datanucleus.store.appengine.query.RuntimeExceptionWrappingIterator.hasNext(RuntimeExceptionWrappingIterator.java:
> > > 44)
> > >at
> >
> > >
> org.datanucleus.store.appengine.query.LazyResult.resolveAll(LazyResult.java:
> > > 115)
> > >at
> > > org.datanucleus.store.appengine.query.LazyResult.size(LazyResult.java:
> > > 110)
> > >at
> >
> > >
> org.datanucleus.store.appengine.query.StreamingQueryResult.size(StreamingQueryResult.java:
> > > 124)
> > >at
> > >
> com.fuoeg.dailyquote.api.DailyQuoteService.doGet(DailyQuoteService.java:
> > > 39)
> > >at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
> > >at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> > >at
> > > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > > 511)
> > >at org.mortbay.jetty.servlet.ServletHandler
> > > $CachedChain.doFilter(ServletHandler.java:1166)
> > >at
> >
> > >
> com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
> > > 97)
> > >at org.mortbay.jetty.servlet.ServletHandler
> > > $CachedChain.doFilter(ServletHandler.java:1157)
&

Re: [appengine-java] Re: problem, please help me

2010-09-18 Thread andy stevko
Managing datastore indexes are an unexpected bump in the road to using a
production GAE but the documentation is very concise and fairly complete.

Did the deployment console report "Uploading index definitions." and
complete successfully?
Did the dashboard "Datastore Indexes"  page report the index is defined?
being built?

You should set autoGenerate="false"  if you want to manually define the
indexes.



On Fri, Sep 17, 2010 at 5:24 PM, Ahmed Shoeib  wrote:

> but i wanna to tell you another query for this Table
> done successfully
>
> i don't know why this problem done ??
>
> On Sep 18, 3:20 am, Ahmed Shoeib 
> wrote:
> > i removed the datastore-indexes-auto.xml
> >
> > and replaced it by datastore-indexes.xml
> > and make these indexes
> >
> > 
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >
> > and nothing done ?
> >
> > what can i do else ???
> >
> > On Sep 18, 1:43 am, andy stevko  wrote:
> >
> > > Perhaps you can figure this out by understanding way in which these
> files
> > > are used as described athttp://
> code.google.com/appengine/docs/java/config/indexconfig.html#Us...
> >
> > > On Fri, Sep 17, 2010 at 3:36 PM, Ahmed Shoeib <
> ahmedelsayed.sho...@gmail.com
> >
> > > > wrote:
> > > > i found these indexes for quote
> >
> > > > 
> > > > 
> > > >
> > > >
> >
> > > > what is the problem in it ??
> >
> > > > On Sep 18, 12:51 am, andy stevko  wrote:
> > > > > Seems pretty straight forward You need to define an index for
> 'Quote'
> > > > > I suggest looking at
> > > > > .../war/WEB-INF/appengine-generated/datastore-indexes.xml and
> > > > > datastore-indexes-auto.xml
> > > > > and correct the settings.
> > > >
> http://code.google.com/appengine/docs/java/datastore/queriesandindexe...
> >
> > > > > There could also be a chance that the Quote index is still being
> built.
> > > >https://appengine.google.com/datastore/indexes
> >
> > > > > On Fri, Sep 17, 2010 at 2:05 PM, Ahmed Shoeib <
> > > > ahmedelsayed.sho...@gmail.com
> >
> > > > > > wrote:
> > > > > > my code work very well in my localhost
> > > > > > after a time from uploading the code on appspot
> > > > > > i face this problem
> >
> > > > > > what is this problem 
> > > > > > how i can solve it ?
> >
> > > > > > 
> > > > > > 1 - First This is Warning###
> > > > > > 
> >
> > > > > > W 09-17 01:38PM 17.629
> >
> > > > > > /api/quote
> > > > > > com.google.appengine.api.datastore.DatastoreNeedIndexException:
> no
> > > > > > matching index found..   > > > > > ancestor="false" source="manual">
> > > > > >
> > > > > >
> > > > > >
> >
> > > > > >at
> >
> > > >
> com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:
> > > > > > 40)
> > > > > >at
> >
> > > >
> com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
> > > > > > 67)
> > > > > >at
> >
> > > >
> com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQueryImpl.java:
> > > > > > 127)
> > > > > >at
> >
> > > >
> com.google.appengine.api.datastore.PreparedQueryImpl.asIterator(PreparedQueryImpl.java:
> > > > > > 87)
> > > > > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > > > >
> $DedupingMultiQueryIterator.getNextIterator(PreparedMultiQuery.java:
> > > > > > 154)
> > > > > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > > > >
> $DedupingMultiQueryIterator.computeNext(PreparedMultiQuery.java:173)
> > > > > >at com.google.appengine.api.datastore.PreparedMultiQuery
> > > > > >
> $DedupingMul

Re: [appengine-java] Problem with persist a child class

2010-09-24 Thread andy stevko
I've managed to make class inheritance work for me using JDO.
The only difference I see between my annotations and yours is I'm using
@Inheritance(customStrategy = "complete-table")

InheritanceStrategy
*COMPLETE_TABLE
*
Another idea is to trim your class members down to see exactly which one(s)
is producing the type conflict.

Lastly, I'm not sure that class inheritance is the problem at all...
Are you working with a totally empty datastore?
Did you change the type of a member from String to Long?


On Sun, Sep 19, 2010 at 7:22 AM, lisandrodc  wrote:

> Hi! I have a problem with persist a child class.
> The classes are:
>
> The parent class:
>
>
> @PersistenceCapable
>
> @Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
> public  abstract class Fecha   {
>
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Key id;
>@Persistent
>private String nombre;
>@Persistent
>private Date fechaIni;
>@Persistent
>private Date fechaFin;
>
>@Persistent(defaultFetchGroup = "true")
>List partidos;
>
> The child class:
>
> @PersistenceCapable
>
> public class RegFechaUsuario extends Fecha  {
>
>@Persistent
>private int puntos;
>@Persistent
>private Long idUsuarioFecha;
>@Persistent
>private Long idFechaOriginal;
>
>
> And the code of run the exception is:
> Transaction tx = pm.currentTransaction();
>try {
>tx.begin();
>
>pm.makePersistentAll(regFechaUsuario);
>  //here is the exception
>tx.commit();
>
> And the regFechaUsuario is created with the build:
>
> public RegFechaUsuario(String nombre, Date fechaIni, Date fechaFin,
> Long idUsuarioFecha, Long idFechaOriginal,
> Listpartidos)
> {
>//super(nombre,fechaIni,fechaFin,partidos);
>this.puntos = 0;
>this.idUsuarioFecha = idUsuarioFecha;
>this.idFechaOriginal = idFechaOriginal;
>this.partidos=partidos;
>}
>
> The exception is:
> Problem accessing /Prode/JugarFecha.action. Reason:
>
>java.lang.Long cannot be cast to java.lang.String
>
> Caused by:
>
> java.lang.ClassCastException: java.lang.Long cannot be cast to
> java.lang.String
>at
>
> org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
> 202)
>at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> $1.setObjectViaMapping(DatastoreRelationFieldManager.java:133)
>at org.datanucleus.store.appengine.DatastoreRelationFieldManager
> $1.apply(DatastoreRelationFieldManager.java:112)
>at
>
> org.datanucleus.store.appengine.DatastoreRelationFieldManager.storeRelations(DatastoreRelationFieldManager.java:
> 81)
>at
>
> org.datanucleus.store.appengine.DatastoreFieldManager.storeRelations(DatastoreFieldManager.java:
> 955)
>at
>
> org.datanucleus.store.appengine.DatastorePersistenceHandler.storeRelations(DatastorePersistenceHandler.java:
> 546)
>at org.datanucleus.store.appengine.DatastorePersistenceHandler.
>
> Regards
> Lisandro
>
> --
> 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.



Re: [appengine-java] Re: Problem with persist a child class

2010-09-25 Thread andy stevko
Hi Lisandro,
Perhaps you didn't understand my last line of reasoning re: is your
datastore empty...
I suspect that the schema for your classes has migrated - i.e. a member that
was Long and is now String or vice-versa

A close read of the datastore docs says:
http://code.google.com/appengine/docs/java/datastore/dataclasses.html

If an entity has a property whose value is of a different type than the
corresponding field in the object, JDO attempts to cast the value to the
field type. If the value cannot be cast to the field type, JDO throws a
ClassCastException. In the case of numbers (long integers and double-width
floats), the value is converted, not cast. If the numeric property value is
larger than the field type, the conversion overflows without throwing an
exception.

--Andy

On Sat, Sep 25, 2010 at 1:40 PM, lisandrodc  wrote:

> Hi! Andy I can't change the type of a member from String to Long
> becasue
> it is an internal error of datanucleus in google apps, I I do not find
> way of solving it.
> All the exception is:
>
> Problem accessing /Prode/JugarFecha.action. Reason:
>
>java.lang.Long cannot be cast to java.lang.String
>
> Caused by:
>
> java.lang.ClassCastException: java.lang.Long cannot be cast to
> java.lang.String
>at
>
> org.datanucleus.store.appengine.DatastoreRelationFieldManager.checkForParentSwitch(DatastoreRelationFieldManager.java:
> 202)
>

-- 
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: Urgent: Getting only Server Error (500) since ~12:30 am (September 28th)

2010-09-28 Thread andy stevko
Ditto on the high error rate on my app too.

app_id=ninuku-archivist

Whats going on here??

On Tue, Sep 28, 2010 at 8:08 AM, mscwd01  wrote:

> I've been getting the second issue you mentioned for the last few
> days. Sometimes the error rate is above 50%. Don't expect to get any
> help from Google employees though, I've tried and got nowhere. It
> makes you wonder if they care any more.
>
> On Sep 28, 10:37 am, Lior Harsat  wrote:
> > Hi ,
> >
> > Our production server (application id = farmigo-csa) is experiencing
> > an alarming error rate (close to 100%) for any request processed by
> > App Engine.
> > The log shows a couple of repeating messages:
> > 1. "A serious problem was encountered with the process that handled
> > this request, causing it to exit. This is likely to cause a new
> > process to be used for the next request to your application. If you
> > see this message frequently, you should contact the App Engine team."
> > 2. "Request was aborted after waiting too long to attempt to service
> > your request. This may happen sporadically when the App Engine serving
> > cluster is under unexpectedly high or uneven load. If you see this
> > message frequently, please contact the App Engine team."
> >
> > Our server is not under high load.
> > Our customers are already reporting this issue.
> > Please help as soon as possible.
>
> --
> 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.



Re: [appengine-java] Re: Not Able To Move To The Cloud

2010-09-29 Thread andy stevko
Dave is correct the  tag must match the app id.
The  is best incremented from deployment to deployment as well.
This is easily maintained using the eclipse project properties google
appengine tab.

Your web xml url pattern is the problem.
Try using a absolute uri rather than a relative uri as the regular
expression decodes to.
/jwigapp


On Wed, Sep 29, 2010 at 8:15 AM, David C. Hicks  wrote:

>  Someone hopefully will correct me if I'm wrong about these...
>
> I believe that the  name in appengine.xml must match the name
> of the application as it is defined on Google.  So, if you're trying to
> upload to an application named "guestbook", then you need to change it to be
> "guestbook" in appengine.xml.
>
> Also, make sure that you have defined it correctly in the Project setup in
> Eclipse.  Right-click on the Project, select "Properties", then look for the
> "Google" section.  There is a place to define the application name in there,
> as well.
>
> Dave
>
>
> On 09/29/2010 10:56 AM, turncom wrote:
>
>> My application id is jwigapp.  The application is the example,
>> Guestbook, from the AppEngine website, for Java. No state secrets
>> there.
>>
>> So, here is my appengine-web.xml
>>
>> http://appengine.google.com/ns/1.0";>
>>jwigapp
>>2
>>
>>
>>
>>> value="WEB-INF/
>> logging.properties"/>
>>
>>
>> 
>>
>>
>> Now, this morning I got an idea. Maybe I should change my web.xml to
>> reflect my jwigapp name. So here is what it looks like now (in part):
>>
>>
>>guestbook
>>guestbook.GuestbookServlet
>>
>>
>>guestbook
>>jwigapp
>>
>>
>> I did this thinking perhaps that would help. It works on my computer.
>> But here is the error message I get when I try to upload it using the
>> Google Plugin:
>>
>> Creating staging directory
>> Scanning for jsp files.
>> Compiling jsp files.
>> Scanning files on local disk.
>> Initiating update.
>> java.io.IOException: Error posting to URL:
>>
>> https://appengine.google.com/api/appversion/create?app_id=jwigapp&version=2&;
>> 400 Bad Request
>> Error when loading application configuration:
>> Unable to assign value 'jwigapp' to attribute 'url':
>> Value 'jwigapp' for key url does not match expression '^(?!\^)/|\.|(\
>> (.).*(?!\$).$'
>>
>>
>> I am guessing that expression is a regular expression, which I don't
>> know how to understand.
>>
>> I have a feeling the answer is very simple, and that I am looking
>> right at it, and just miss it.
>>
>> I have a presentation tomorrow and I would like to show it off.
>>
>> Gr.
>>
>>
>>
>> On Sep 28, 7:28 pm, "David C. Hicks"  wrote:
>>
>>>   It sounds like the application id you've given to your local
>>> application isn't the same as the application you created on AppEngine.
>>>  You might want to verify that you're uploading to an application that is
>>> valid.
>>>
>>> Dave
>>>
>>> On 09/28/2010 07:35 PM, turncom wrote:
>>>
>>>
>>>
>>>
>>>
>>>  I am using Eclipse (I'm a newbie with Eclipse) and Java (which
 I know).
 The app I created (the standard Guestbook) works on my laptop. When I
 attempt to upload it using the Google Plugin (and on the command line,
 too, for that matter) I get this message:
 Unable to update app: Error posting to URL:
 https://appengine.google.com/api/appversion/create?app_id=jwigapp&ver.
 ..
 <
 https://appengine.google.com/api/appversion/create?app_id=jwigapp&ver..
 .>
 400 Bad Request
 Error when loading application configuration:
 Unable to assign value 'guestbook' to attribute 'url':
 Value 'guestbook' for key url does not match expression
 '^(?!\^)/|\.|(\(.).*(?!\$).$'
 So..what am I doing wrong? Is there something I am missing in
 configuring Eclipse? I've been banging my head on this for two days. I
 will do a presentation on Thursday, and I would love to show this off.
 --
 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 emai

Re: [appengine-java] Re: Not Able To Move To The Cloud

2010-09-29 Thread andy stevko
Yes, it is simple - You are missing the leading slash in your .

Perhaps you can learn how to configure tomcat web.xml files with this very
nice blog post.
http://tomcat-configure.blogspot.com/2009/01/tomcat-web-xml.html

You can also learn how what matches the regular expression by using this
tester tool:
http://www.regular-expressions.info/javascriptexample.html


On Wed, Sep 29, 2010 at 8:36 AM, turncom wrote:

> Yo! Google folkshelp us out here!
>
> As I understand it, appengine-web.xml has the application id, which in
> my case is jwigapp. That is how it knows which application of yours to
> apply the upload to. (I think we can have 9 or 10 apps). And that is
> the name of the application to the world.
>
> So, I changed my web.xml back to Guestbook, as it has always been
> until this morning's experiment, and tried to upload it, and here are
> the messages I got:
>
>
> **
> Creating staging directory
> Scanning for jsp files.
> Compiling jsp files.
> Scanning files on local disk.
> Initiating update.
> java.io.IOException: Error posting to URL:
>
> https://appengine.google.com/api/appversion/create?app_id=jwigapp&version=2&;
> 400 Bad Request
> Error when loading application configuration:
> Unable to assign value 'Guestbook' to attribute 'url':
> Value 'Guestbook' for key url does not match expression '^(?!\^)/|\.|(\
> (.).*(?!\$).$'
>
> ***
>
> Again, I wonder what that regular expression means, and why I am told
> it violates it, and how to fix it.
>
> This has GOT to be really simple.
>
>
>
> On Sep 29, 10:15 am, "David C. Hicks"  wrote:
> >   Someone hopefully will correct me if I'm wrong about these...
> >
> > I believe that the  name in appengine.xml must match the
> > name of the application as it is defined on Google.  So, if you're
> > trying to upload to an application named "guestbook", then you need to
> > change it to be "guestbook" in appengine.xml.
> >
> > Also, make sure that you have defined it correctly in the Project setup
> > in Eclipse.  Right-click on the Project, select "Properties", then look
> > for the "Google" section.  There is a place to define the application
> > name in there, as well.
> >
> > Dave
> >
> > On 09/29/2010 10:56 AM, turncom wrote:
> >
> >
> >
> > > My application id is jwigapp.  The application is the example,
> > > Guestbook, from the AppEngine website, for Java. No state secrets
> > > there.
> >
> > > So, here is my appengine-web.xml
> >
> > > http://appengine.google.com/ns/1.0";>
> > >jwigapp
> > >2
> >
> > >
> > >
> > > value="WEB-INF/
> > > logging.properties"/>
> > >
> >
> > > 
> >
> > > Now, this morning I got an idea. Maybe I should change my web.xml to
> > > reflect my jwigapp name. So here is what it looks like now (in part):
> >
> > >
> > >guestbook
> > >guestbook.GuestbookServlet
> > >
> > >
> > >guestbook
> > >jwigapp
> > >
> >
> > > I did this thinking perhaps that would help. It works on my computer.
> > > But here is the error message I get when I try to upload it using the
> > > Google Plugin:
> >
> > > Creating staging directory
> > > Scanning for jsp files.
> > > Compiling jsp files.
> > > Scanning files on local disk.
> > > Initiating update.
> > > java.io.IOException: Error posting to URL:
> > >https://appengine.google.com/api/appversion/create?app_id=jwigapp&ver.
> ..
> > > 400 Bad Request
> > > Error when loading application configuration:
> > > Unable to assign value 'jwigapp' to attribute 'url':
> > > Value 'jwigapp' for key url does not match expression '^(?!\^)/|\.|(\
> > > (.).*(?!\$).$'
> >
> > > I am guessing that expression is a regular expression, which I don't
> > > know how to understand.
> >
> > > I have a feeling the answer is very simple, and that I am looking
> > > right at it, and just miss it.
> >
> > > I have a presentation tomorrow and I would like to show it off.
> >
> > > Gr.
> >
> > > On Sep 28, 7:28 pm, "David C. Hicks"  wrote:
> > >>It sounds like the application id you've given to your local
> > >> application isn't the same as the application you created on
> AppEngine.
> > >> You might want to verify that you're uploading to an application that
> is
> > >> valid.
> >
> > >> Dave
> >
> > >> On 09/28/2010 07:35 PM, turncom wrote:
> >
> > >>>  I am using Eclipse (I'm a newbie with Eclipse) and Java
> (which
> > >>>  I know).
> > >>> The app I created (the standard Guestbook) works on my laptop. When I
> > >>> attempt to upload it using the Google Plugin (and on the command
> line,
> > >>> too, for that matter) I get this message:
> > >>> Unable to update app: Error posting to URL:
> > >>>
> https://appengine.google.com/api/appversion/create?app_id=jwigapp&ver...
> > >>> <
> https://appengine.google.com/api/appversio

Re: [appengine-java] Problem with persist a child class

2010-09-30 Thread andy stevko
My only thought is that you should clean your project and have datanucleus
rebuild the persistent classes entirely.


On Wed, Sep 29, 2010 at 2:34 PM, lisandrodc  wrote:

> Hi andy! I have tried delete my local_db and the problem persist.
> The exception is in the next code, in the call of the build method
> "RegFechaUsuario":
>
> ControladorFecha cF = new ControladorFecha();
>System.out.println("nombre " +
> nuevaFecha.getNombre());
>System.out.println("fecha ini " +
> fechaOriginal.getFechaIni());
>System.out.println("fecha fin " +
> fechaOriginal.getFechaFin());
>System.out.println("idUsuario " + idUsuario);
>System.out.println("idFecha " +
> fechaOriginal.getId().getId());
>System.out.println("partidos " +
> nuevaFecha.getPartidos());
> /*Here print in console:
> na fecha 4
> us id 7
> nombre f1
> fecha ini Fri Jan 01 00:00:00 UTC 2010
> fecha fin Fri Jan 01 00:00:00 UTC 2010
> idUsuario 7
> idFecha 4
> partidos [model.part...@973678]*/
>RegFechaUsuario regFechaUsuario = new
>
> RegFechaUsuario(nuevaFecha.getNombre(),fechaOriginal.getFechaIni(),fechaOriginal.getFechaFin(),idUsuario,fechaOriginal.getId().getId(),nuevaFecha.getPartidos());
>cF.crearRegFechaUsuario(regFechaUsuario);
>
> .
>
> The code of method:
>
> public void crearRegFechaUsuario(RegFechaUsuario regFechaUsuario) {
>
>Transaction tx = pm.currentTransaction();
>try {
>tx.begin();
>//here is exception
>pm.makePersistentAll(regFechaUsuario);
>tx.commit();
>} finally {
>// pm.close();
>if (tx.isActive()) {
>tx.rollback();
>}
>}
>
>}
>
> --
> 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.



Re: [appengine-java] Creating Folder/Directory at Runtime

2010-09-30 Thread andy stevko
No - all local disk write access is not permitted.

http://code.google.com/appengine/docs/java/runtime.html
The Filesystem

A Java application cannot use any classes used to write to the filesystem,
such as java.io.FileWriter. An application can read its own files from the
filesystem using classes such as java.io.FileReader. An application can also
access its own files as "resources", such as with Class.getResource() or
ServletContext.getResource().

Only files that are considered "resource files" are accessible to the
application via the filesystem. By default, all files in the WAR are
"resource files." You can exclude files from this set using the
appengine-web.xml
 file.


On Thu, Sep 30, 2010 at 6:52 PM, Norberto Ramirez II  wrote:

> Hi!
>
> Is creating a folder at runtime allowed? I was trying to create a folder
> but I'm getting the following error.
> *java.security.AccessControlException: access denied
> (java.io.FilePermission \testfolder write)*
>
> 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-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.



Re: [appengine-java] JDO unique Long ID keys across entity groups

2010-09-30 Thread andy stevko
Perhaps you can weaken the P-C relationship by making C separate entities
and, instead of P storing a list of C objects, P stores a list of C ids.


On Thu, Sep 30, 2010 at 3:28 AM, Fred  wrote:

> Hi Group,
>
> I know key ids are only unique across entity groups so what GAE + JDO
> gives me is:
> /Parent[1]/Child[1]
> /Parent[1]/Child[2]
> /Parent[1]/Child[3]
>
> /Parent[2]/Child[1]
> /Parent[2]/Child[2]
>
> /Parent[3]/Child[1]
>
> etc.
>
> What I need to achieve (aka implement) is a way to assign keys in the
> following fashion:
> /Parent[1]/Child[1]
> /Parent[1]/Child[2]
> /Parent[1]/Child[3]
>
> /Parent[2]/Child[4]
> /Parent[2]/Child[5]
>
> /Parent[3]/Child[6]
>
> etc... so child ids are in sequence across entity groups (or at least
> unique). Does anyone have experience with this or any thoughts on how
> to go about it in a secure fashion?
> I can't seem to come up with a secure way of doing this, but don't
> want to give up on it because it would give my use case a lot of
> querying power.
>
> Hope someone can help.
> Thanks in advance,
> Fred
>
>
> --
> 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.



Re: [appengine-java] Re: Creating Folder/Directory at Runtime

2010-10-01 Thread andy stevko
I don't see how this could work without updating the deployed image.

What I mean is that if one deployed instance was able to create the
directory or alter any of the files in the deployed image, none of these
changes are replicated to other deployed instances.

Perhaps you can script the file system changes you desire and have them
pushed out as a deployed new version? You may be able to do that using an
automated change/build/test/deploy tool like Cruise.


On Fri, Oct 1, 2010 at 3:53 AM, jr  wrote:

> Thank you for the quick response. However it is said that files in WAR
> are accessible to the application via the filesystem. Does that mean
> that I can create a directory at runtime in the /war directory? Or the
> statement means another thing? I wish to create a directory at runtime
> so I can create a "domain". For example, if I have www.webpage.com, I
> will create a domain new_domain. I will then have
> www.webpage.com/new_domain/
> if I can create this directory at runtime. Thanks again!
>
> On Oct 1, 11:00 am, andy stevko  wrote:
> > No - all local disk write access is not permitted.
> >
> > http://code.google.com/appengine/docs/java/runtime.html
> > The Filesystem
> >
> > A Java application cannot use any classes used to write to the
> filesystem,
> > such as java.io.FileWriter. An application can read its own files from
> the
> > filesystem using classes such as java.io.FileReader. An application can
> also
> > access its own files as "resources", such as with Class.getResource() or
> > ServletContext.getResource().
> >
> > Only files that are considered "resource files" are accessible to the
> > application via the filesystem. By default, all files in the WAR are
> > "resource files." You can exclude files from this set using the
> > appengine-web.xml<
> http://code.google.com/appengine/docs/java/config/appconfig.html>
> >  file.
> >
> > On Thu, Sep 30, 2010 at 6:52 PM, Norberto Ramirez II <
> ramirez.j...@gmail.com
> >
> >
> >
> >
> >
> >
> >
> > > wrote:
> > > Hi!
> >
> > > Is creating a folder at runtime allowed? I was trying to create a
> folder
> > > but I'm getting the following error.
> > > *java.security.AccessControlException: access denied
> > > (java.io.FilePermission \testfolder write)*
> >
> > > 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-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.



Re: [appengine-java] Simplest key query

2010-10-02 Thread andy stevko
Hi Paul,

FWIW, Here is a slightly edited version of my JDO query by id.
Perhaps it can help you get over this bump.

@SuppressWarnings("unchecked")
public Account lookupAccountById( PersistenceManager pm, Long accountId) {
logger.fine("looking up account id=" + accountId );
// look up
Query q1 = pm.newQuery(Account.class, "id == accountId");
q1.declareParameters("Long accountId");
List accounts = (List) q1.execute(accountId);
if (accounts == null || accounts.isEmpty()) {
logger.warning("Account Id = " + accountId + " not found.");
return null;
}
return (accounts.get(0));
}





On Fri, Oct 1, 2010 at 4:13 PM, Paul  wrote:

> Hi,
>
> I must admit that my db knowledge is very lacking, thus I need some
> help with making a simple query. I know I am just missing smth obvious
> and easy.
>
> Anyway, what I need is just a boolean method to check if enity
> exists.
>
> I am using Guice too, for binding all stuff.
>
> I know that the query syntax is SELECT * FROM entity WHERE __key__ =
> KEY('entity', 'key name')
>
> My class for DB queries looks like that [yeah, from gae-wicket
> template]:
>
> public abstract class JdoQueries
> {
>private final Class clazz;
>private final Provider pmProvider;
>
>protected JdoQueries(Class clazz, Provider
> pmProvider)
>{
>this.clazz = clazz;
>this.pmProvider = pmProvider;
>}
>
>protected Query newQuery()
>{
>return pmProvider.get().newQuery(clazz);
>}
>
>@SuppressWarnings("unchecked")
>protected Collection toCollection(Object queryResult)
>{
>return (Collection) queryResult;
>}
>
>protected List toList(Object queryResult)
>{
>return new ArrayList(toCollection(queryResult));
>}
> }
>
>
> I know I should create public interface for query I need, then create
> a class extending JdoQueries and implementing my interface, but it's
> just theory and I cannot write that final part :)
>
> --
> 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.



Re: [appengine-java] is there any proper way to create shortcut(s) for the current window object in gwt

2010-10-03 Thread andy stevko
 google-appengine-java  is probably
the wrong group to ask this question.
http://groups.google.com/group/google-web-toolkit is a better community for
GWT questions.

Also - did your Widget has focus when you used the keyboard?

On Sun, Oct 3, 2010 at 2:30 AM, wingdings  wrote:

> just for like CTRL+1 or CTRL+2 .. how do i assigns shortcuts ?
>
> something like this i did but it aint executing , also am i doing it
> right ?
> mayday mayday !
>
> public class quotation implements KeyboardListener
> {
>
> public static Widget getSomeWidget()
> {
>
> return new Widget;
> }
> @Override
>public void onKeyDown(Widget sender, char keyCode, int modifiers) {
>// TODO Auto-generated method stub
>
>}
>
>@Override
>public void onKeyPress(Widget sender, char keyCode, int modifiers) {
>if(KeyboardListener.KEY_CTRL == keyCode)
>{
>
>}
>
>}
>
>@Override
>public void onKeyUp(Widget sender, char keyCode, int modifiers) {
>// TODO Auto-generated method stub
>
>}
> }
>
> --
> 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.



Re: [appengine-java] Many to many relation ship

2010-10-06 Thread andy stevko
Not sure why the datastore needs to know that a Car is associated with a
particular User.
There is no easy way for the datastore to handle cascading deletes in a
M-to-M relationship w/o reference counting.
Also setting the Fetch policy to load children with the parent load is not
an option due to them being in separate entity groups.

Regardless, you can use
 
*getObjectById
*(java.lang.Class cls, java.lang.Object key)

to verify the Key is referencing a particular class and an object exists.


On Wed, Oct 6, 2010 at 2:15 PM, hadf  wrote:

> Hello,
>
> I read that many to many relation ship must resolved by using sets of
> Key.
> But what I don't understand is how do I specify the type the Key is
> referencing.
> I mean that if I have a many to many relation ship between Car and
> User, how jpa or jdo knows that Car is associated to User ?
>
> public class Car {
>@OneToMany
>private Set users; //this relation ship is untyped
> }
>
> --
> 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.



Re: [appengine-java] Datastore, Java, JSP, JSON, AJAX, Web Page. Is it going to work?

2010-10-06 Thread andy stevko
Hi  x_maras,

re: using email as a primary key
http://code.google.com/appengine/docs/java/users/overview.html
The User object exposes a unique user ID that is guaranteed to be stable for
the lifetime of the user's account, even if the email address is changed.
You can use this value in a datastore entity key or property value.

re: Datastore, Java, JSP, JSON, AJAX, Web Page
Writing a RESTful service that can respond to AJAX requests with JSON
payloads is very much a mainstream way to do things on app-engine.
Be careful to keep the processing response times really short. The max
response time is 30 seconds, the sweet spot is to average about 1 second
response time.

Happy Coding,
--Stevko


On Wed, Oct 6, 2010 at 4:34 PM, x_maras  wrote:

> Hi,
>
> I am new to GAE and I want to make a web application page on it.
> I was used to work with PHP for web applications but lately I am
> struggling to get in the thinking of a GAE web application.
>
> After reading tutorials and trying to do different things I came up
> with a thinking how I want my project to be and how to make the
> communication through the different layers. I will explain you my
> thinking and I would like to tell me if am I in the right way and if I
> am not I would like someone to put back into it.
>
> e.g.
>
> I thought to have a user @persistent class for storing the information
> of a user, such as name, email(as a primary key), registration date
> etc... (I will use the User class for logging in, but I want to keep
> some data also for every user)
>
> Then I need to create a java (dao) class that reads and inserts data
> to the datastore "tables-objects". I thought to create a different one
> for each @persistent class
>
> Then Java files that execute the  functions from the DAO classes and
> give information to the jsp files which through JSON give information
> to the Ajax functions in the HTML page (which I was thinking also to
> be the welcome-file in my web.xml)
>
> So here comes the questions. Is something like this right? Is it going
> to work? And if not what do you propose me to do.
>
> Any links or examples are very very welcome.
>
> --
> 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.



Re: [appengine-java] Task queue with HTTP POST not working.

2010-10-10 Thread andy stevko
Does your servlet respond to POST requests?
On Oct 10, 2010 10:28 AM, "apple"  wrote:
> I followed the codes in GAE document to make a simple task queue:
>
> Queue queue = QueueFactory.getDefaultQueue();
> queue.add(TaskOptions.Builder.method(TaskOptions.Method.GET).url("/
> security"));
>
> This works perfectly.
>
> However, if I changed method to HTTP POST:
>
> Queue queue = QueueFactory.getDefaultQueue();
>
> queue.add(TaskOptions.Builder.method(TaskOptions.Method.POST).url("/
> security"));
>
> The task is not executed.
>
> What's wrong in my code?
>
> --
> 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.



Re: [appengine-java] what is sharding?

2010-10-11 Thread andy stevko
This is a bit of a stretch for this forum.

Perhaps this explanation will help you understand the database design term.
http://stackoverflow.com/questions/992988/what-is-sharding-and-why-is-it-important



On Mon, Oct 11, 2010 at 4:30 AM, sagar misal wrote:

> can  anyone please make me understand what is this sharding and how to
> implement it in java?
>
> --
> 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.



Re: [appengine-java] OneToOne relationship with java.lang.Long ids

2010-10-11 Thread andy stevko
The ID for the owned child User instances has to be a Key or String type
because the it contains both the reference to the parent(s) and the unique
id of the object.  A Long alone will not contain enough information to
navigate the object model to it. I usually stick with String ids for all my
types.

You can create/encode/decode Keys easily using the KeyFactory.



On Mon, Oct 11, 2010 at 8:03 PM, Rick Curtis  wrote:

> Hello all! I am new to GAE and have a pretty simple domain model that I'm
> trying to persist. I am creating an Event(with a generated ID) and a
> User(with a pre-defined ID) which is hosting the event. This is a one to one
> relationship owned by the Event(@See below for code snippets).
>
> Upon commiting the transaction, I'm getting an exception which states
> "Error in meta-data for User._id: Cannot have a java.lang.Long primary key
> and be a child object (owning field is Event._host)." I did some searching
> and came across this[1] post which suggested that I need to change my key
> from a java.lang.Long to a com.google.appengine.api.datastore.Key.
>
> Since "The App Engine Java SDK includes an implementation of JPA 1.0 for
> the App Engine datastore"[2]... I don't really need to use these internal
> GAE classes to describe this mapping do I? Maybe I'm being a bit naive here,
> but I have a hard time believing that this requirement/limitation is due to
> the underlying database not being a relational database.
>
> Hopefully someone can shed some light on my findings.
>
> Thanks,
> Rick
>
> @Entity
> public class Event {
> @Id
> @GeneratedValue(strategy=GenerationType.IDENTITY)
> Long _id;
>
> @OneToOne
> User _host;
> ...
> }
>
>
> @Entity
> public class User {
> @Id
> Long _id;
> ...
> }
>
> [1] http://code.google.com/p/datanucleus-appengine/issues/detail?id=26
> [2]http://code.google.com/appengine/docs/java/datastore/usingjpa.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-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] Is there a way to turn off Task Queue timeouts?

2010-10-12 Thread andy stevko
I really want to be able to debug step through a Task Queue initiated task
and have it not time out.

 http method POST against URL http://0.0.0.0:8080/task/simple timed out.

Also - have you noticed that the dev server does retry tasks that throw
errors?
This is contrary to the docs - "the development server does not retry tasks.
"

-- 
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] bean.XMLEncoder AccessControlException

2010-10-15 Thread A. stevko
Hey Guys,
I'm use some very simple beans and have run into an java security exception
when I deployed into production servers.
{
ByteArrayOutputStream baos = new ByteArrayOutputStream( );
XMLEncoder encoder = new XMLEncoder(baos);
encoder.writeObject( myBean );
encoder.close();
return baos.toString();
}

XMLEncoder is on the JRE
whitelist<http://code.google.com/appengine/docs/java/jrewhitelist.html>


This does not happen in Development Mode, only in production.

java.security.AccessControlException: access denied
(java.util.PropertyPermission java.version read)
at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:355)
at 
java.security.AccessController.checkPermission(AccessController.java:567)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at 
com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:45)
at 
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
at java.lang.System.getProperty(System.java:669)
at java.beans.XMLEncoder.flush(XMLEncoder.java:406)
at java.beans.XMLEncoder.close(XMLEncoder.java:446)


Does anyone have an idea of what could cause this?
--Stevko

-- 
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] Size of Nearly Empty Entity

2010-10-17 Thread A. Stevko
Hello Rud,

My very limited knowledge of the way the persistence layers works seems to
indicate that the Big Tables tracks everything as name-value pairs so the
cost of every persisted object would include literally every parameter name.

You might want to check out the writings in the Gae Java Persistence Blog.
Your idea with having multiple version'd entities per object could also be
impacted by the way indexing works.
Specifically
http://gae-java-persistence.blogspot.com/2009/11/unindexed-properties.html

Did you know that, by default, the App Engine Datastore writes two index
> records for every entity property that isn't a
> com.google.appengine.api.datastore.Blob or a
> com.google.appengine.api.datastore.Text?  It's true!  These index records
> allow you to execute a variety of queries involving the property without
> creating a composite index.
>
> Now, these index records don't come for free.  They take time to write and
> they take up space on disk.  If you have a property that you're absolutely
> positively sure you'll never want to filter or sort by, you can opt-out of
> the default indexing that is going on
>

-- Stevko


On Sun, Oct 17, 2010 at 9:07 PM, Rud  wrote:

> My app has a UserProfile class (entity) with many fields. These are
> your typical user demographics - age, marital status, etc. Over time
> users will change the fields, i.e. get married or divorced.
>
> I need to keep a history of changes. I am wondering if creating
> another entity of the entire class containing only the data in the
> changed field would be efficient. Ignore the mechanics of tracking how
> the new entity relates to the old since I think that is just detail
> chasing.
>
> The question is whether the new entity with only a single field
> populated is only the size of that field, or nearly so. Or is the
> stored entity have a default field for every field in the entity,
> basically making it as large as the original entity.
>
> The other approach would be to keep a name-value pair containing the
> change in a 'delta' entity.
>
> Which would be more efficient in the datastore?
>
> Rud
> http://www.mysticlakesoftware.com
>
> --
> 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.



Re: [appengine-java] Required jars in war/web-inf/lib folder for uploading to appengine cloud?

2010-10-22 Thread A. Stevko
Hello Suresh,
If you can get the development mode running, you should be able to upload to
a server with no problem.

In order to get development mode running, I suggest starting with the "New
Web Application Project" wizard which will populate your lib with the basic
jars. You can then add Objectify as you add code.
--Stevko

On Fri, Oct 22, 2010 at 1:50 AM, suersh babu wrote:

>
> Hi,
>
> I am using eclipse IDE. My environment is
> App engine sdk 1.3.8,
> Servlet and JSP
> Objectify
>
> So what is the basic jars need to be added to war/web-inf/lib folder.
>
> --
> Regards
>
> Suresh Babu G
>
>  --
> 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.



Re: [appengine-java] Re: Create entity and get ID

2010-10-22 Thread A. Stevko
In order to make the object accessible after the commit() you need to make
it detatchable.

@PersistenceCapable(identityType = IdentityType.APPLICATION,
detachable="true")
public class Meeting


Then used this...
pm.makePersistent(meeting);
Long meetingID=meeting.getId();

On Fri, Oct 22, 2010 at 3:19 PM, Cosmin Stefan <
cosmin.stefandob...@gmail.com> wrote:

> And I really want to emphasize that this doesn't happen EVERY time.
>
> Thanks and sorry for replying again!
>
> On Oct 23, 1:17 am, Cosmin Stefan 
> wrote:
> > Hey,
> >
> > Unfortunately, the first solution you suggested does not work and I
> > don't really need a transaction for what I want.
> >
> > The thing is that I somehow need to persist the new entity and find
> > out it's key. How can I do this? Does anybody have an ideea?
> >
> > Thanks a lot,
> > Cosmin
> >
> > On Oct 22, 9:18 am, Ian Marshall  wrote:
> >
> > > Have you tried replacing
> >
> > >   pm.makePersistent(meeting);
> > >   Long meetingID=meeting.getId();
> >
> > > with
> >
> > >   meeting = pm.makePersistent(meeting);
> > >   Long meetingID=meeting.getId();
> >
> > > and see if this solves your problem. You might also want to commit
> > > your transaction if you are doing this persistence in a transaction
> > > before testing your meeting's ID (the ID might not get allocated until
> > > transaction committal).
> >
> > > On Oct 20, 11:19 pm, Cosmin Stefan 
> > > wrote:
> >
> > > > Hey,
> >
> > > > I have encountered a weird case while trying to create a new entity
> in
> > > > the database:
> >
> > > > I have this code:
> >
> > > > Meeting meeting=new Meeting(...)
> > > > pm.makePersistent(meeting);
> > > > Long meetingID=meeting.getId();
> >
> > > > if(meetingID==null)
> > > > throw new Exception("meetingID is null...");
> >
> > > > and in the Meeting Class:
> > > > /** The id. */
> > > >@PrimaryKey
> > > >@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > > >private Long id;
> > > > so the id is Long.
> >
> > > > The problem is that sometimes the above code throws an exception,
> some
> > > > other times it doesn't... What am I doing wrong?
> >
> > > > 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.
>
>

-- 
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: Create entity and get ID

2010-10-25 Thread A. Stevko
Can't hurt...
I define transactions for all my datastore access paths.

Thats the only way I can keep track of which entity is in context.
pm .currentTransaction.begin()
pm .currentTransaction.commit()

I'm also able to rollback() database access and not have the overhead of a
commit cleanup.
pm .currentTransaction.rollback()


On Mon, Oct 25, 2010 at 3:45 PM, Cosmin Stefan <
cosmin.stefandob...@gmail.com> wrote:

> Hey,
>
> The thing is I don't have a transaction. And, I also am using
> IdentityType.Datastore, as I need the id to be generated by the
> datastore.
>
> Anyway, this is what I currently have (and doesn't properly work):
>
> @PersistenceCapable(detachable="true")
> @Embeddable
> public class GMeeting
> {
> ...
> /** The id. */
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Long id;
> ...}
>
> and the using code:
> {
> 
> meeting=new Meeting();
>//Adding the new meeting
>pm.makePersistent(meeting);
>meeting=pm.detachCopy(meeting);
>Long meetingID=meeting.getId();
> }
>
> Anyway, this still doesn't work. Do I need to use a transaction?
>
> Thanks,
> Cosmin
>
>
> On Oct 23, 2:09 am, "A. Stevko"  wrote:
> > In order to make the object accessible after the commit() you need to
> make
> > it detatchable.
> >
> > @PersistenceCapable(identityType = IdentityType.APPLICATION,
> > detachable="true")
> > public class Meeting
> >
> > Then used this...
> > pm.makePersistent(meeting);
> > Long meetingID=meeting.getId();
> >
> > On Fri, Oct 22, 2010 at 3:19 PM, Cosmin Stefan <
> >
> > cosmin.stefandob...@gmail.com> wrote:
> > > And I really want to emphasize that this doesn't happen EVERY time.
> >
> > > Thanks and sorry for replying again!
> >
> > > On Oct 23, 1:17 am, Cosmin Stefan 
> > > wrote:
> > > > Hey,
> >
> > > > Unfortunately, the first solution you suggested does not work and I
> > > > don't really need a transaction for what I want.
> >
> > > > The thing is that I somehow need to persist the new entity and find
> > > > out it's key. How can I do this? Does anybody have an ideea?
> >
> > > > Thanks a lot,
> > > > Cosmin
> >
> > > > On Oct 22, 9:18 am, Ian Marshall  wrote:
> >
> > > > > Have you tried replacing
> >
> > > > >   pm.makePersistent(meeting);
> > > > >   Long meetingID=meeting.getId();
> >
> > > > > with
> >
> > > > >   meeting = pm.makePersistent(meeting);
> > > > >   Long meetingID=meeting.getId();
> >
> > > > > and see if this solves your problem. You might also want to commit
> > > > > your transaction if you are doing this persistence in a transaction
> > > > > before testing your meeting's ID (the ID might not get allocated
> until
> > > > > transaction committal).
> >
> > > > > On Oct 20, 11:19 pm, Cosmin Stefan 
> > > > > wrote:
> >
> > > > > > Hey,
> >
> > > > > > I have encountered a weird case while trying to create a new
> entity
> > > in
> > > > > > the database:
> >
> > > > > > I have this code:
> >
> > > > > > Meeting meeting=new Meeting(...)
> > > > > > pm.makePersistent(meeting);
> > > > > > Long meetingID=meeting.getId();
> >
> > > > > > if(meetingID==null)
> > > > > > throw new Exception("meetingID is null...");
> >
> > > > > > and in the Meeting Class:
> > > > > > /** The id. */
> > > > > >@PrimaryKey
> > > > > >@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > > > > >private Long id;
> > > > > > so the id is Long.
> >
> > > > > > The problem is that sometimes the above code throws an exception,
> > > some
> > > > > > other times it doesn't... What am I doing wrong?
> >
> > > > > > 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.
>
> --
> 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.



Re: [appengine-java] Re: uploaded file how to view in browser

2010-10-26 Thread A. Stevko
use Content Type "application/octet-stream" for download
and Content Type  "application/pdf" to view

On Tue, Oct 26, 2010 at 9:09 PM, prabu  wrote:

> Hi..
>   Thanks lot for ur reply
>
> response.setContentType("application/pdf");
>
> response.setHeader("Content-disposition","inline; filename=test.pdf");
>
> OutputStream out = response.getOutputStream();
>
> out.write(fileBlob.getBytes());
>
>
> In this way i was tried...
>
> --
> 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.



Re: [appengine-java] Problem with persistence

2010-10-29 Thread A. Stevko
I can understand why this might seem to work.

The problem I see is that unTomeo was detached from the database and either
needs to be reattached or refetched before adding unEquipo to it.

Here is some documentation that may help explain.
http://www.jpox.org/docs/1_1/attach_detach.html

try this

  tx.begin();

   pm.makePersistent(unTorneo);

   unTorneo.agregarEquipo(unEquipo);

   tx.commit();


On Fri, Oct 29, 2010 at 6:22 PM, lisandrodc  wrote:

> Hi ! I have a problem with persist a class. The problem is that
> sometimes, persist and sometimes not persist the class "Equipo" . I
> have a persist class "Torneo" that has to many class "Equipo", and
> when persist "Equipo" sometimes persist in the datastore and sometimes
> not persist.
> I have to try restarting the application in order that sometimes it
> work. Someone will be able to help me?
> The code to persist:
>
>public void agregarEquipoConTorneo(Torneo unTorneo, Equipo unEquipo)
> {
>/*add Equipo with a existing "Torneo" in the datastore, the
> "unTorneo"(param) class obtain with: Torneo b =
> pm.getObjectById(model.Torneo.class, idTorneo);*/
>Transaction tx = pm.currentTransaction();
>
>try {
>tx.begin();
>
>unTorneo.agregarEquipo(unEquipo);
>//pm.makePersistent(unEquipo);
>
>pm.makePersistentAll(unTorneo);
>
>tx.commit();
>
>System.out.println("persistioTorneoConEquipo");
>} finally {
> pm.close();
>if (tx.isActive()) {
>tx.rollback();
>}
>}
>
> }
>
> 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-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] Application Versions - what is versioned? and what is not versioned?

2010-11-22 Thread A. Stevko
Looking through the documentation, I could not find any mention of the
coverage of the application versions.

Experience and my gut tells me that these components are not versioned:
* Database Indexes and the persistence layers
war/WEB-INF/appengine-generated/datastore-indexes.xml
war/WEB-INF/appengine-generated/datastore-indexes-auto.xml

* crontab
war/WEB-INF/cron.xml

* task queues
war/WEB-INF/queue.xml

* Dos entries
war/WEB-INF/dos.xml
-

Is the web.xml versioned?
war/WEB-INF/web.xml

Is the logging.properties versioned?
war/WEB-INF/logging.properties

Are static files (html, css, images, jsp, swf, etc)  versioned?

-- 
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 rollback a stuck deployment in java?

2010-11-23 Thread A. Stevko
How do I rollback a stuck java deployment?

Using eclipse, I was deploying when the admin console crashed.
Now its stuck with an inprgress deployment and returning this error

409 Conflict
Another transaction by user andy is already in progress for this app and
major version. That user can undo the transaction with appcfg.py's
"rollback" command.

I created an app.yaml for my application and tried to execute the rollback
suggested but I get this response

Error parsing yaml file:
Missing required value 'runtime'.
  in "Memories/app.yaml", line 4, column 1

Here is my app.yaml
application: ninuku-archivist
version: down
api_version: 1
runtime: java

-- 
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 rollback a stuck deployment in java?

2010-11-23 Thread A. Stevko
Thanks Don, that worked.

On Tue, Nov 23, 2010 at 2:11 PM, Don Schwarz  wrote:

> You don't need an app.yaml file.  You do need to use the command line
> appcfg utility that comes with the App Engine Java SDK, however:
>
>
> http://code.google.com/appengine/docs/java/tools/uploadinganapp.html#Command_Line_Arguments
>
> On Tue, Nov 23, 2010 at 4:01 PM, A. Stevko  wrote:
> > How do I rollback a stuck java deployment?
> > Using eclipse, I was deploying when the admin console crashed.
> > Now its stuck with an inprgress deployment and returning this error
> > 409 Conflict
> > Another transaction by user andy is already in progress for this app and
> > major version. That user can undo the transaction with appcfg.py's
> > "rollback" command.
> > I created an app.yaml for my application and tried to execute the
> rollback
> > suggested but I get this response
> > Error parsing yaml file:
> > Missing required value 'runtime'.
> >   in "Memories/app.yaml", line 4, column 1
> > Here is my app.yaml
> > application: ninuku-archivist
> > version: down
> > api_version: 1
> > runtime: java
> >
> >
> > --
> > 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.



Re: [appengine-java] calling blobstore from inside the webapp

2010-11-29 Thread A. Stevko
There are numerous posts concerning the differences between the dev and prod
blobstore behaviors.
Perhaps this is your issue:
http://code.google.com/p/googleappengine/issues/detail?id=3273

Another
resource to check are the blobstore posts on
http://stackoverflow.com/questions/tagged/blobstore


On Sun, Nov 28, 2010 at 5:08 AM, Zsombor  wrote:

> Hello,
>
>  I would like to modify the content of the BlobStore from inside my
> webapp. I mean, the user uploads a picture into blobstore, after in
> the background the app should create thumbnails, and stores that
> thumbnails too in the BlobStore.
>  I figured out, that from my 'servlet', I can call
> BlobstoreServiceFactory.getBlobstoreService().createUploadUrl("/
> internal/uploadBlob/"+id);
> and to the acquired URL I can post the content - with proper multi-
> part encoding. It works in the development mode, however in the live
> system, it always fails with a generic server error message. I'm sure
> that my code doesn't gets called - nothing refers to /internal/
> uploadBlob/ in the request log. From the response headers, it seems
> that the upload server responding :
> {server=[Upload Server Built on Nov 11 2010 15:36:58 (1289518618)],
> date=[Sun, 28 Nov 2010 12:54:40 GMT], pragma=[no-cache], expires=[Fri,
> 01 Jan 1990 00:00:00 GMT], cache-control=[no-cache, no-store, must-
> revalidate], content-length=[456], content-type=[text/html], x-google-
> cache-control=[remote-fetch], via=[HTTP/1.1 GWA]}
>
> Is there anybody, how noticed similar behaviour? Or better, know how
> to do it correctly ?
>
> BR,
>  Zsombor
>
> --
> 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.



Re: [appengine-java] Re: Old Tasks stopped working -- http://gae/api/appversion/cloneblobs?... return HTTP 500!

2010-12-03 Thread A. Stevko
This issue is not noise... Admin 500 responses and push failures really
scare me too.
I've just struggled with the same errors pushing out a release to a new
version.

=
Insanity: doing the same thing over and over again and expecting different
results.
Albert Einstein


On Thu, Dec 2, 2010 at 6:17 PM, Dom Derrien wrote:

> Before posting my message here, I looked at various sources to see if
> someone else was experiencing the same issue... After 20 minutes of
> successives retries, being afraid to be really stuck, I decided to
> post my message.
>
> And guess what: 5-10mn later my update finally passes through!!!
> Hurray :D
>
> Forgive me for the noise.
>
> Going back to see what's wrong with the tasks.
>
> A+, Dom
> --
> On Dec 2, 8:54 pm, Dom Derrien  wrote:
> > Hi,
> >
> > I've an application heavily relying on tasks and sooner this
> > afternoon, the tasks stopped to be scheduled as normal. No error
> > reported, just them having disappeared.
> >
> > Thinking it might be a side-effect of the deprecation of the API from
> > the labs, I updated my environment for 1.4.0, upgraded mock classes,
> > ran series of unit tests, etc. and when I was ready to deploy the
> > updated code with a new version number, I got something starting with:
> >
> >
> >
> > Unable to update:
> > java.io.IOException: Error posting to URL:
> https://appengine.google.com/api/appversion/cloneblobs?app_id=another...
> > 500 Internal Server Error
> >
> > 
> > 
> > 500 Server Error
> > 
> > 
> > Error: Server Error
> > The server encountered an error and could not complete your
> > request.If the problem persists, please report your problem and
> > mention this error message and the query that caused it.
> > 
> > 
> >
> > at
> >
> com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
> > 149)
> > at
> >
> com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
> > 82)
> > at
> >
> com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
> > 582)
> > at
> >
> com.google.appengine.tools.admin.AppVersionUpload.cloneFiles(AppVersionUpload.java:
> > 452)
> > at
> >
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
> > 414)
> > at
> >
> com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
> > 112)
> > at
> > com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
> > 56)
> > at com.google.appengine.tools.admin.AppCfg
> > $UpdateAction.execute(AppCfg.java:547)
> > at
> com.google.appengine.tools.admin.AppCfg.(AppCfg.java:138)
> > at com.google.appengine.tools.admin.AppCfg.(AppCfg.java:61)
> > at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:57)
> > com.google.appengine.tools.admin.AdminException: Unable to update app:
> > Error posting to URL:
> https://appengine.google.com/api/appversion/cloneblobs?app_id=another...
> > 500 Internal Server Error
> > 
> >
> > As it is an error server-side, it seems my users are stuck with a
> > broken app I cannot update :(
> >
> > Any suggestion?
> >
> > A+, Dom
>
> --
> 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.



Re: [appengine-java] migrating to 1.4 task queues

2010-12-09 Thread A. Stevko
The only other surprise was when I upgrade the eclipse project to using 1.4,
it _silently failed_ to copy the 1.4 jar files into my project.
This resulted in class not found exceptions during startup.
I've seen other posts that stated this happened when the files where
manually put into place but that is not my case. I've always relied on the
eclipse project tool for managing the gae & gwt versions.

Manually deleting the various 1.3.8 jars and resetting the project's app
engine version to 1.4.0 put the whole thing back on track.

One other thing that is bothering me now although it may or may not be
related to the 1.4 upgrade migration,
Many UI 500 responses are context startup initialization failures like:

12-09 10:22AM 56.796

Failed startup of context
com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@1cc5461{/,/base/data/home/apps/ninuku-archivist/1-0-6d.346785216597395753}
com.google.apphosting.api.DeadlineExceededException: This request
(96acdaff3e9f45cd) started at 2010/12/09 18:22:28.108 UTC and was
still executing at 2010/12/09 18:22:56.787 UTC.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)



 and -
12-09 09:58AM 28.574

Failed startup of context
com.google.apphosting.utils.jetty.runtimeappenginewebappcont...@15780d9{/,/base/data/home/apps/ninuku-archivist/1-0-6d.346785216597395753}
com.google.inject.CreationException: Guice creation errors:

1) Error injecting method,
com.google.inject.internal.ComputationException:
com.google.inject.internal.ComputationException:
java.lang.SecurityException: Unable to get members for class
com.ninuku.memories.server.handler.journal.DeletePhotoChapterHandler
  at 
net.customware.gwt.dispatch.server.guice.ActionHandlerLinker.linkHandlers(ActionHandlerLinker.java:30)

1 error
at 
com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:354)
at 
com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:173)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
at com.google.inject.Guice.createInjector(Guice.java:92)





On Wed, Dec 8, 2010 at 12:39 PM, Stevko  wrote:

> I'm dealing with the change in task queue apis away from .labs.
>
> One change I've encoutered that is not mentioned in the release notes:
> http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes
>
> import static
> com.google.appengine.api.labs.taskqueue.TaskOptions.Builder.url;
> is now undefined.
>
> I suspect this is the proper replacement method
> import static
> com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl;
>
> Any other surprises with migrating to 1.4 task queues?
>
> --
> 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.



Re: [appengine-java] Re: Issue processing the Receive Mail Handle multiple times

2010-12-13 Thread A. Stevko
The Message-Id: header is suppose to be unique for every email.

On Mon, Dec 13, 2010 at 8:53 AM, Max <6738...@gmail.com> wrote:

> Hi,
>
> OK, that makes sense.  How could I make a GAE mail handler idempotent?  Is
> there any unique identifier associated with an inbound email that I can
> reference, or will I truly need to build the ".equals" logic to analyze the
> email elements (including attachments) to know if it is a duplicate?
>
> thanks
> MG
>
> On Dec 12, 2010, at 11:34 PM, Didier Durand wrote:
>
> > Hi,
> >
> > Yes, your code gets (probably) executed more than once because it is
> > scheduled as a task in a task queue defined in the architecture of
> > GAE.
> >
> > As such your code as to be idempotent (the word you were looking for)
> > because it can be executed multiple times: Google highly recommend to
> > guarantee to work on a true idempotence of the code in such cases.
> >
> > regards
> >
> > didier
> >
> > On Dec 12, 10:22 pm, Max <6738...@gmail.com> wrote:
> >> Hi,
> >>
> >> My application receives emails and performs duties based on the content
> of the email.  I'm sometimes having an issue (< 5%) where a single email
> that goes in to the application causes the handler to execute twice.  Is
> this an issue with GAE that would be intended to be fixed?  Or is the nature
> of the environment one that requires writing code that can be executed
> multiple times without negative consequences (can't remember the word for
> this)?
> >>
> >> If I need to write code to support running multiple times over the same
> inbound email, are there any suggestions on how to manage this?  I'm
> assuming I'd need to come up with an ".equals" method that makes sure it
> isn't a repeat of a prior message.  Any advice?
> >>
> >> thanks!
> >> MG
> >
> > --
> > 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.



Re: [appengine-java] Re: Not sending email with Javamail and no error

2010-12-16 Thread A. Stevko
Does the email address used in your From have administrator privileges for
your app?

   msg.setFrom(new InternetAddress(user.getEmail()));

I read somewhere that system could only send email from registered email
addresses.


On Thu, Dec 16, 2010 at 7:13 PM, Moretto  wrote:

> I've changed the code to initialize the Session object passing
> properties as a parameter. Nothing changed. Still does not send emails
> and doesnt throws any exception. Ideias??
>
>  Properties props = new Properties();
>Session session = Session.getDefaultInstance(props, null);
>
>
> UserService userService = UserServiceFactory.getUserService();
>User user = userService.getCurrentUser();
>try {
>Message msg = new MimeMessage(session);
>msg.setFrom(new InternetAddress(user.getEmail()));
>msg.addRecipient(Message.RecipientType.TO,
>new InternetAddress(email, destinatario));
>msg.setSubject(titulo);
>msg.setText(texto);
>Transport.send(msg);
>
>} catch (AddressException e) {
>e.printStackTrace();
>return false;
>} catch (MessagingException e) {
>e.printStackTrace();
>return false;
>} catch (Exception e) {
>e.printStackTrace();
>return false;
>}
>return true;
>
> On Dec 14, 12:11 pm, Amit Pandey  wrote:
> > Just try creating session object using property object. May be it can
> > help(Not sure).
> >
> > Properties props = new Properties();
> > Session session = Session.getDefaultInstance(props, null);
> >
> >
> >
> > On Tue, Dec 14, 2010 at 9:21 AM, Moretto  wrote:
> > > Hi,
> >
> > > I'm using JAVAMAIL to send mail from my GAE app located at
> > >http://k-share.appspot.com/.
> >
> > > I can't send email and no error occurs. The first time i've deployed
> > > my app, it send 2 email then no more.
> >
> > > Take a look at the source code below:
> >
> > > /*
> > >  * To change this template, choose Tools | Templates
> > >  * and open the template in the editor.
> > >  */
> > > package com.appspot.kshare.control;
> >
> > > import com.google.appengine.api.users.User;
> > > import com.google.appengine.api.users.UserService;
> > > import com.google.appengine.api.users.UserServiceFactory;
> > > import java.io.UnsupportedEncodingException;
> > > import javax.mail.Message;
> > > import javax.mail.MessagingException;
> > > import javax.mail.Session;
> > > import javax.mail.Transport;
> > > import javax.mail.internet.AddressException;
> > > import javax.mail.internet.InternetAddress;
> > > import javax.mail.internet.MimeMessage;
> >
> > > /**
> > >  *
> > >  * @author malacma
> > >  */
> > > public class EmailControlUtil {
> >
> > >public static boolean sendMail(String email, String destinatario,
> > > String titulo, String texto, Object anexo) throws
> > > UnsupportedEncodingException {
> > >Session session = Session.getDefaultInstance(null);
> >
> > >UserService userService = UserServiceFactory.getUserService();
> > >User user = userService.getCurrentUser();
> > >try {
> > >Message msg = new MimeMessage(session);
> > >msg.setFrom(new InternetAddress(user.getEmail()));
> > >msg.addRecipient(Message.RecipientType.TO,
> > >new InternetAddress(email, destinatario));
> > >msg.setSubject(titulo);
> > >msg.setText(texto);
> > >Transport.send(msg);
> >
> > >} catch (AddressException e) {
> > >e.printStackTrace();
> > >return false;
> > >} catch (MessagingException e) {
> > >e.printStackTrace();
> > >return false;
> > >} catch (Exception e) {
> > >e.printStackTrace();
> > >return false;
> > >}
> > >return true;
> > >}
> > > }
> >
> > > Any ideia? Need help hurry :(
> >
> > > --
> > > 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 p

Re: [appengine-java] Re: Not sending email with Javamail and no error

2010-12-16 Thread A. Stevko
I now recall the conditions...
http://code.google.com/appengine/docs/java/mail/overview.html

> App Engine applications can send email messages on behalf of the app's
> administrators, and on behalf of users with Google Accounts.



On Thu, Dec 16, 2010 at 7:49 PM, A. Stevko  wrote:

> Does the email address used in your From have administrator privileges for
> your app?
>
>
>msg.setFrom(new InternetAddress(user.getEmail()));
>
> I read somewhere that system could only send email from registered email
> addresses.
>
>
> On Thu, Dec 16, 2010 at 7:13 PM, Moretto  wrote:
>
>> I've changed the code to initialize the Session object passing
>> properties as a parameter. Nothing changed. Still does not send emails
>> and doesnt throws any exception. Ideias??
>>
>>  Properties props = new Properties();
>>Session session = Session.getDefaultInstance(props, null);
>>
>>
>> UserService userService = UserServiceFactory.getUserService();
>>User user = userService.getCurrentUser();
>>try {
>>Message msg = new MimeMessage(session);
>>msg.setFrom(new InternetAddress(user.getEmail()));
>>msg.addRecipient(Message.RecipientType.TO,
>>new InternetAddress(email, destinatario));
>>msg.setSubject(titulo);
>>msg.setText(texto);
>>Transport.send(msg);
>>
>>} catch (AddressException e) {
>>e.printStackTrace();
>>return false;
>>} catch (MessagingException e) {
>>e.printStackTrace();
>>return false;
>>} catch (Exception e) {
>>e.printStackTrace();
>>return false;
>>}
>>return true;
>>
>> On Dec 14, 12:11 pm, Amit Pandey  wrote:
>> > Just try creating session object using property object. May be it can
>> > help(Not sure).
>> >
>> > Properties props = new Properties();
>> > Session session = Session.getDefaultInstance(props, null);
>> >
>> >
>> >
>> > On Tue, Dec 14, 2010 at 9:21 AM, Moretto  wrote:
>> > > Hi,
>> >
>> > > I'm using JAVAMAIL to send mail from my GAE app located at
>> > >http://k-share.appspot.com/.
>> >
>> > > I can't send email and no error occurs. The first time i've deployed
>> > > my app, it send 2 email then no more.
>> >
>> > > Take a look at the source code below:
>> >
>> > > /*
>> > >  * To change this template, choose Tools | Templates
>> > >  * and open the template in the editor.
>> > >  */
>> > > package com.appspot.kshare.control;
>> >
>> > > import com.google.appengine.api.users.User;
>> > > import com.google.appengine.api.users.UserService;
>> > > import com.google.appengine.api.users.UserServiceFactory;
>> > > import java.io.UnsupportedEncodingException;
>> > > import javax.mail.Message;
>> > > import javax.mail.MessagingException;
>> > > import javax.mail.Session;
>> > > import javax.mail.Transport;
>> > > import javax.mail.internet.AddressException;
>> > > import javax.mail.internet.InternetAddress;
>> > > import javax.mail.internet.MimeMessage;
>> >
>> > > /**
>> > >  *
>> > >  * @author malacma
>> > >  */
>> > > public class EmailControlUtil {
>> >
>> > >public static boolean sendMail(String email, String destinatario,
>> > > String titulo, String texto, Object anexo) throws
>> > > UnsupportedEncodingException {
>> > >Session session = Session.getDefaultInstance(null);
>> >
>> > >UserService userService = UserServiceFactory.getUserService();
>> > >User user = userService.getCurrentUser();
>> > >try {
>> > >Message msg = new MimeMessage(session);
>> > >msg.setFrom(new InternetAddress(user.getEmail()));
>> > >msg.addRecipient(Message.RecipientType.TO,
>> > >new InternetAddress(email, destinatario));
>> > >msg.setSubject(titulo);
>> > >msg.setText(texto);
>> > >Transport.send(msg);
>> >
>> > >} catch (AddressException e) {
>> > >e.printStackTrace();
>> > >

Re: [appengine-java] Re: Not sending email with Javamail and no error

2010-12-16 Thread A. Stevko
I have much the same code although I set more headers.
How about adding yourself as a BCC and/or CC?
Also, do you see any utilization  in your Quota details - Mail API Calls
and Recipients Emailed ?



On Thu, Dec 16, 2010 at 8:12 PM, Moretto  wrote:

> Still no messagesand no errors
>
>  Properties props = new Properties();
>Session session = Session.getDefaultInstance(props, null);
>
>
>  //  UserService userService =
> UserServiceFactory.getUserService();
>//User user = userService.getCurrentUser();
>try {
>Message msg = new MimeMessage(session);
>//msg.setFrom(new InternetAddress(user.getEmail()));
> msg.setFrom(new InternetAddress("mala...@gmail.com", "[k-
> share]"));
> msg.addRecipient(Message.RecipientType.TO,
>new InternetAddress(email, destinatario));
>msg.setSubject(titulo);
>msg.setText(texto);
>Transport.send(msg);
>
>} catch (AddressException e) {
>e.printStackTrace();
>return false;
>} catch (MessagingException e) {
>e.printStackTrace();
>return false;
>} catch (Exception e) {
>e.printStackTrace();
>return false;
>}
>return true;
>
> On Dec 17, 2:03 am, Moretto  wrote:
> > "can send email messages on behalf of the app's administrators, and on
> > behalf of users with Google Accounts."
> >
> > UserService userService = UserServiceFactory.getUserService();
> > User user = userService.getCurrentUser();
> >
> > These two lines of code retrieve the current google user logged in.
> > i'll change it and test.
> >
> > On Dec 17, 1:52 am, "A. Stevko"  wrote:
> >
> >
> >
> > > I now recall the conditions...
> http://code.google.com/appengine/docs/java/mail/overview.html
> >
> > > > App Engine applications can send email messages on behalf of the
> app's
> > > > administrators, and on behalf of users with Google Accounts.
> > > On Thu, Dec 16, 2010 at 7:49 PM, A. Stevko 
> wrote:
> > > > Does the email address used in your From have administrator
> privileges for
> > > > your app?
> >
> > > >msg.setFrom(new InternetAddress(user.getEmail()));
> >
> > > > I read somewhere that system could only send email from registered
> email
> > > > addresses.
> >
> > > > On Thu, Dec 16, 2010 at 7:13 PM, Moretto  wrote:
> >
> > > >> I've changed the code to initialize the Session object passing
> > > >> properties as a parameter. Nothing changed. Still does not send
> emails
> > > >> and doesnt throws any exception. Ideias??
> >
> > > >>  Properties props = new Properties();
> > > >>Session session = Session.getDefaultInstance(props, null);
> >
> > > >> UserService userService =
> UserServiceFactory.getUserService();
> > > >>User user = userService.getCurrentUser();
> > > >>try {
> > > >>Message msg = new MimeMessage(session);
> > > >>msg.setFrom(new InternetAddress(user.getEmail()));
> > > >>msg.addRecipient(Message.RecipientType.TO,
> > > >>new InternetAddress(email, destinatario));
> > > >>msg.setSubject(titulo);
> > > >>msg.setText(texto);
> > > >>Transport.send(msg);
> >
> > > >>} catch (AddressException e) {
> > > >>e.printStackTrace();
> > > >>return false;
> > > >>} catch (MessagingException e) {
> > > >>e.printStackTrace();
> > > >>return false;
> > > >>} catch (Exception e) {
> > > >>e.printStackTrace();
> > > >>return false;
> > > >>}
> > > >>return true;
> >
> > > >> On Dec 14, 12:11 pm, Amit Pandey  wrote:
> > > >> > Just try creating session object using property object. May be it
> can
> > > >> > help(Not sure).
> >
> > > >> > Properties props = new Properties();
> > > >> > Session session = Session.getDefaultInstance(props, null);
> >
> > > >> > On Tue, Dec 14, 2010 at 9:21 AM

Re: [appengine-java] Re: Not sending email with Javamail and no error

2010-12-17 Thread A. Stevko
Straight zero utilizations means the email api is not accepting your
requests rather than the message getting lost in transit.
Where the error goes is not obvious due to Issue 1800
I suggest continuing to replace your fields with static values to see which
one is not accepted.
My gut says to check the character set - UTF-8 works fine for me.
Otherwise you may be encountering a known issue with the mail server:
http://code.google.com/p/googleappengine/issues/list?can=2&q=component%3DMail&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles

Here is my code, I've embedded it into a queue task and it works thousands
of times daily.

Message msg = new MimeMessage(session);

msg.setFrom(new InternetAddress(fromAddress, fromName));

msg.addRecipient(Message.RecipientType.TO,

new InternetAddress( toAddress, toName ));

msg.setReplyTo( ADMIN_ADDRESSES );

msg.addHeader( "Return-Path" , ADMIN_ADDRESS );

if ( bccSupport != null && !bccSupport.isEmpty() ) {

// only add support bcc if specified

msg.addRecipient( Message.RecipientType.BCC, new InternetAddress( bccSupport
> ));

}

msg.setSubject(subject);

msg.setText( body );

Transport.send(msg);


<http://code.google.com/p/googleappengine/issues/list?can=2&q=component%3DMail&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles>

On Thu, Dec 16, 2010 at 10:01 PM, Moretto  wrote:

> As you see the first time i've deployed my app, 2 email were sent. It
> appeared at my cota details. Now  Could you post your headers details?
>
> Mail API Calls   0%  0 of 7,000  Okay
> Recipients Emailed   0%  0 of 2,000  Okay
> Admins Emailed   0%  0 of 5,000  Okay
> Message Body Data Sent   0%  0.00 of 0.06 GBytes Okay
> Attachments Sent 0%  0 of 2,000  Okay
> Attachment Data Sent 0%  0.00 of 0.10 GBytes Okay
>
> On Dec 17, 2:21 am, "A. Stevko"  wrote:
> > I have much the same code although I set more headers.
> > How about adding yourself as a BCC and/or CC?
> > Also, do you see any utilization  in your Quota details - Mail API Calls
> > and Recipients Emailed ?
> >
> >
> >
> > On Thu, Dec 16, 2010 at 8:12 PM, Moretto  wrote:
> > > Still no messagesand no errors
> >
> > >  Properties props = new Properties();
> > >Session session = Session.getDefaultInstance(props, null);
> >
> > >  //  UserService userService =
> > > UserServiceFactory.getUserService();
> > >//User user = userService.getCurrentUser();
> > >try {
> > >Message msg = new MimeMessage(session);
> > >//msg.setFrom(new InternetAddress(user.getEmail()));
> > > msg.setFrom(new InternetAddress("mala...@gmail.com", "[k-
> > > share]"));
> > > msg.addRecipient(Message.RecipientType.TO,
> > >new InternetAddress(email, destinatario));
> > >msg.setSubject(titulo);
> > >msg.setText(texto);
> > >Transport.send(msg);
> >
> > >} catch (AddressException e) {
> > >e.printStackTrace();
> > >return false;
> > >} catch (MessagingException e) {
> > >e.printStackTrace();
> > >return false;
> > >} catch (Exception e) {
> > >e.printStackTrace();
> > >return false;
> > >}
> > >return true;
> >
> > > On Dec 17, 2:03 am, Moretto  wrote:
> > > > "can send email messages on behalf of the app's administrators, and
> on
> > > > behalf of users with Google Accounts."
> >
> > > > UserService userService = UserServiceFactory.getUserService();
> > > > User user = userService.getCurrentUser();
> >
> > > > These two lines of code retrieve the current google user logged in.
> > > > i'll change it and test.
> >
> > > > On Dec 17, 1:52 am, "A. Stevko"  wrote:
> >
> > > > > I now recall the conditions...
> > >http://code.google.com/appengine/docs/java/mail/overview.html
> >
> > > > > > App Engine applications can send email messages on behalf of the
> > > app's
> > > > > > administrators, and on behalf of users with Google Accounts.
> > > > > On Thu, Dec 16, 2010 at 7:49 PM, A. Stevko 
> > > wrote:
> > > > > > Does the email addr

Re: [appengine-java] May I use AppEngine SDK internally without deploy to Google AppEngine?

2010-12-20 Thread A. Stevko
Trung,
The dev server is not the only way to run app engine locally.
Take a look at these projects to see if they can meet your needs...
http://code.google.com/p/appscale/
http://code.google.com/p/typhoonae/


On Mon, Dec 20, 2010 at 11:54 AM, Ikai Lan (Google) <
ikai.l+gro...@google.com > wrote:

> You sure can, but you should be aware of many of the limitations of the
> development server:
>
> - it's slow
> - the datastore can be wiped on upgrade (this is an ugly bug that pops it
> head up now and then)
> - it's single threaded
> - no real accounts support
> - ... many, many more limitations
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blogger: http://googleappengine.blogspot.com
> Reddit: http://www.reddit.com/r/appengine
> Twitter: http://twitter.com/app_engine
>
>
>
> On Mon, Dec 20, 2010 at 7:13 AM, Trung  wrote:
>
>> For some reasons, I would like to run our GAE apps internally (with
>> some custom hooks instead of re-writing the app).
>>
>> May I do 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-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.



Re: [appengine-java] NoClassDefFoundError even though the jar is in WEB-INF/lib

2010-12-20 Thread A. Stevko
maybe something on this page that can help you -
http://code.google.com/p/googleappengine/wiki/WillItPlayInJava


On Mon, Dec 20, 2010 at 7:35 AM, Madhusuthanan Seetharam  wrote:

> Any help on this is highly appreciated.
>
> Thanks,
>   - Madhu
>
>
> On Sun, Dec 19, 2010 at 8:36 AM, Madhu  wrote:
>
>> Hi,
>>I'm facing a peculiar issue. One of my JSPs uses
>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage to get
>> localized message from resource bundles. I have copied the jakarta-
>> taglibs-standard-1.1.2.jar and jakarta-taglibs-jstl-1.1.2.jar into WEB-
>> INF/lib directory. On my local SDK the application works just fine.
>> But when I deploy it on GAE it gives out the following error.
>>
>> java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/common/
>> fmt/BundleSupport
>>at
>>
>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage(LocaleSupport.java:
>> 143)
>>at
>>
>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage(LocaleSupport.java:
>> 63)
>>at
>>
>> org.apache.jsp.templates.default_.LoginContent_jsp._jspService(LoginContent_jsp.java:
>> 547)
>>
>>This happens on both 1.3.8 and 1.4.0 SDKs. Any clues on what is
>> happening?
>>
>> Thanks,
>>  - Madhu
>>
>> --
>> 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.



Re: [appengine-java] Any easy way to run demos on 1.4 release?

2010-12-21 Thread A. Stevko
Perhaps they are not GWT/GAE projects?
Right click on Project in Project Explorer,
select context menu item "Google Web Toolkit",
select "Convert project to GWT project..."


On Tue, Dec 21, 2010 at 8:04 AM, NeoK  wrote:

> I'm pretty newbie here who has a great interest learning GAE.
> I think the best way to learn new concepts and dev environment is to see
> the sample codes.
> I found several sample codes of demos under
>  
> \eclipse\plugins\com.google.appengine.eclipse.sdkbundle.1.4.0_1.4.0.v201012021502\appengine-java-sdk-1.4.0\demos
>
> guestbook
> helloorm
> helloxmpp
> ...
>
> But none of them is working in my Eclipse(3.6).
> I built them using their ant build.xml file.
>
> Eclipse File->New->Java Project from Ant Buildfile
>
> Or using the existing eclipse project file(Only 'sticky' demo has the
> project file).
>
> But all of them are throwing some annoying exceptions rather than expected
> results when I tried to access to http://localhost: on my browser.
> (something like entitymanager is null, uninitialized ,... )
> More than that some of them can't get compiled.
>
> Are those project maintained in this 1.4 GAE release? Or am I missing
> something like configuration file...??
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] NoClassDefFoundError even though the jar is in WEB-INF/lib

2010-12-21 Thread A. Stevko
According to previous threads, the repackaged jars are for internal use
only.
Folks have used them from time to time but find that they do not always
behave as expected or are missing from the next release.

Assuming that the jar is being uploaded, the expected behavior for a
forbidden class is usually a Security Exception rather than a
ClassDefNotFound exception.

I wonder if anyone else on this list has successfully used JSTL Resource
Bundles?



On Tue, Dec 21, 2010 at 12:15 AM, Madhusuthanan Seetharam <
mseet...@gmail.com> wrote:

> Thanks for the info, Stevko. But I couldn't really find out if this class 
> org.apache.taglibs.standard.tag.common.fmt.BundleSupport
> is in the white-list though. On the development box I could see this class
> in the lib/tools/jsp/repackaged-appengine-jakarta-standard-1.1.2.jar. Does
> this mean that this class or library cannot be used?
>
> Thanks,
>   - Madhu
>
> On Tue, Dec 21, 2010 at 2:01 AM, A. Stevko  wrote:
>
>> maybe something on this page that can help you -
>> http://code.google.com/p/googleappengine/wiki/WillItPlayInJava
>>
>>
>> On Mon, Dec 20, 2010 at 7:35 AM, Madhusuthanan Seetharam <
>> mseet...@gmail.com> wrote:
>>
>>> Any help on this is highly appreciated.
>>>
>>> Thanks,
>>>   - Madhu
>>>
>>>
>>> On Sun, Dec 19, 2010 at 8:36 AM, Madhu  wrote:
>>>
>>>> Hi,
>>>>I'm facing a peculiar issue. One of my JSPs uses
>>>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage to get
>>>> localized message from resource bundles. I have copied the jakarta-
>>>> taglibs-standard-1.1.2.jar and jakarta-taglibs-jstl-1.1.2.jar into WEB-
>>>> INF/lib directory. On my local SDK the application works just fine.
>>>> But when I deploy it on GAE it gives out the following error.
>>>>
>>>> java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/common/
>>>> fmt/BundleSupport
>>>>at
>>>>
>>>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage(LocaleSupport.java:
>>>> 143)
>>>>at
>>>>
>>>> javax.servlet.jsp.jstl.fmt.LocaleSupport.getLocalizedMessage(LocaleSupport.java:
>>>> 63)
>>>>at
>>>>
>>>> org.apache.jsp.templates.default_.LoginContent_jsp._jspService(LoginContent_jsp.java:
>>>> 547)
>>>>
>>>>This happens on both 1.3.8 and 1.4.0 SDKs. Any clues on what is
>>>> happening?
>>>>
>>>> Thanks,
>>>>  - Madhu
>>>>
>>>> --
>>>> 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.
>>
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] removing data in JDO collections - clear vs delete

2010-12-21 Thread A. Stevko
I've got to release a huge tree of JDO persistent data like
/**
 * books associated with this library
 * books are huge trees of similarly declared objects (100s MBs, 1000s
objects, 5 layers deep)
 */
@Persistent(mappedBy = "library")
@Element(dependent = "true")
private List books = new ArrayList();

Which is better for the DB to call?
books.clear()
or
books = null;

Will orphaning a dependent child collection actually remove it from storage?
I'm asking this because I'm getting nasty NPEs from within ArrayList.clear()
as I reported in issue 224
http://code.google.com/p/datanucleus-appengine/issues/detail?id=224


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: Persist child - Problem

2010-12-21 Thread A. Stevko
Perhaps Equipo is not properly linked to Fetcha?

something like:

@Persistent
private Equipo myEquipo;

public setEquipo( Equipo e ) { this.myEquipo = e; };


On Mon, Dec 20, 2010 at 1:36 PM, lisandrodc  wrote:

> Thanks andrew! My class Equipo has @persistence capable and
> and serializable... The code:
> import java.io.Serializable;
> import javax.jdo.annotations.IdGeneratorStrategy;
> import javax.jdo.annotations.IdentityType;
> import javax.jdo.annotations.PersistenceCapable;
> import javax.jdo.annotations.Persistent;
> import javax.jdo.annotations.PrimaryKey;
>
>
> import com.google.appengine.api.datastore.Key;
>
> @PersistenceCapable(identityType =
> IdentityType.APPLICATION,detachable="true")
> public class Equipo implements Serializable {
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>private Key id;
>@Persistent
>private String nombre;
>@Persistent
>private String imagen;
>
>
>
> I'm not understand because it not pesist in the datastore.
> Regards!
> Lisandro
>
> On 20 dic, 04:02, andrew  wrote:
> > Is the child annotated as @persistence capable?
> > Is it serializable?
> > It also depends on the type of keys used and key generator strategy.
> >
> > Show us the code defining each class and we'll let you know.
> >
> > Quizas asi te ayudamos a poner tu equipo en primera división! :-)
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: Cant retrieve a list of objects when using GAE and JPA.

2010-12-22 Thread A. Stevko
Data Transfer Object (DTO) pattern is explained in this page
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html

<http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html>The
Sample Code Implementing the Transfer Object Pattern
gives a pretty clear explanation of how to implement the pattern (substitute
JDO object for EntityBean) .

On Wed, Dec 22, 2010 at 3:34 PM, Cesar Ruiz  wrote:

> Hey can you please explaine me the DTO way, with some code or an example, I
> really need to retrieve those objects. Thank you in advanced.
>
> Kido.
>
>
> On 21 December 2010 20:18, Stevko  wrote:
>
>> I may be dated on this with not keeping up on the latest gwt advances.
>> The problems is a JPA or JDO augmented class is not directly
>> portable (serialize/deserialize)  from the GAE/J class to a GWT/js class
>> like non-persistent classes are.
>>
>> The classic DTO case (and not elegant) is to copy+paste your persistent
>> classes into a shared model w/o the database twist and write the
>> transporters.
>> Many folks today have decided to skip the JPA layer and use Objectify for
>> GAE database access. Its led to less headaches for some bloggers.
>>
>>
>>
>>
>>  --
>> 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.
>>
>
>
>
> --
> Cesar Ruiz.
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Issues redirecting to domain

2010-12-22 Thread A. Stevko
Both urls work the same for me.
Downforeveryoneorjustme says its up too
http://www.downforeveryoneorjustme.com/www.sakshum.com
<http://www.downforeveryoneorjustme.com/www.sakshum.com>

On Wed, Dec 22, 2010 at 8:55 PM, Vik  wrote:

> Hie
>
> Our app is at: http://2.latest.sakshumweb.appspot.com/
>
> And we have added our domain http://www.sakshum.com   This was all working
> fine from last 6+ months. But from yesterday http://www.sakshum.com fails
> to load the app. It says browser could not find the page.
>
> We havent done any changes from our site and our NGO is suffering heavily
> because of this.
>
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] GWT and GAE debugging problem

2010-12-23 Thread A. Stevko
Are you trying to transport a query result set from GAE to GWT?
Sorry but JDO/JPA persistent objects are not serializable (just like
EntityBeans).
You will need to do something to make the objects portable.
I suggest checking out Objectify or creating your own Data Transfer Objects.
http://code.google.com/p/objectify-appengine/


On Thu, Dec 23, 2010 at 4:44 AM, Cesar Ruiz  wrote:

> Yest, its fixed!.
>
> But another real important question appeared. When trying to retrieve the
> list of objects "Book", an exception is thrown, sayin:
>
> GRAVE: javax.servlet.ServletContext log: Exception while dispatching
> incoming RPC call
> com.google.gwt.user.client.
> rpc.SerializationException: Type
> 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
> included in the set of types which can be serialized by this
> SerializationPolicy or its Class object could not be loaded.
>
> Apparently, its a big problem Google hasnt fixed yet?. What can I do?.
>
> Thank you.
>
>
> On 22 December 2010 21:39, Ikai Lan (Google) 
> 
> > wrote:
>
>> Have you asked your question here?
>>
>> http://groups.google.com/group/Google-Web-Toolkit
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> Blogger: http://googleappengine.blogspot.com
>> Reddit: http://www.reddit.com/r/appengine
>> Twitter: http://twitter.com/app_engine
>>
>>
>>
>> On Wed, Dec 15, 2010 at 10:06 AM, kidowell  wrote:
>>
>>> Hey.
>>>
>>> Im starting with GAE, and im making an RCP program (a book address), on
>>> the server side I've got all the methods for manipulating the datastore (I'm
>>> using JPA), and on the client side I'm using GWT as a framework.
>>>
>>> When debugging it turns out, that I can only see the server side, and
>>> program never stops in any breakpoint on the client side.
>>>
>>> Is there any way that I can debug on both side sas the program runs.
>>> Because, just debugging on the server side is not very helpful.
>>>
>>> Thank you in advanced for your recomendation.
>>>
>>> Kido.
>>>
>>> --
>>> 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.
>>
>
>
>
> --
> Cesar Ruiz.
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Dashboard not showing Avg cpu and /favicon.ico -> This URI uses a high amount of CPU and should be optimized.??

2010-12-23 Thread A. Stevko
I suggest clicking thru that link and seeing what is logged.
Likely the .ico hit is causing an instance to be warmed up.


On Thu, Dec 23, 2010 at 1:22 PM, Gal Dolber  wrote:

>  *Current Load [image: 
> help]<http://code.google.com/appengine/kb/general.html#currentload>
> *  URI  Requestslast 13 hrs Avg CPU (API)last hr % CPUlast 13 hrs
> /favicon.ico<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2Ffavicon.ico%22&severity_level_override=1&view=Search>
>  92 884 (0) 33%
> /testapp/service<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2Ftestapp%2Fservice%22&severity_level_override=1&view=Search>
>  52 0 (0) 23%
> /authLogin<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2FauthLogin%22&severity_level_override=1&view=Search>
>  20 160 (88) 5%
> /testapp/testapp.nocache.js<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2Ftestapp%2Ftestapp.nocache.js%22&severity_level_override=1&view=Search>
>  16 0 (0) 0%
> /testapp.html<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2Ftestapp.html%22&severity_level_override=1&view=Search>
>  8 0 (0) 0%
> /logo.png<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2Flogo.png%22&severity_level_override=1&view=Search>
>  7 0 (0) 0%
> /_ah/warmup<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2F_ah%2Fwarmup%22&severity_level_override=1&view=Search>
>  6 0 (0) 29%
> /authCallback<https://appengine.google.com/logs?version_id=1.347113262656974029&app_id=21nubes-demo&filter_type=labels&filter=path%3A%22%2FauthCallback%22&severity_level_override=1&view=Search>
>  4 390 (194) 2%
> I am using appstats, could that cause this problem?
> appid: 21nubes-demo
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/
>
>
>
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] GWT Project error when using external jars with CORBA calls

2010-12-27 Thread A. Stevko
on
> $RequestHandler.content(HttpConnection.java:938)
>at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
>at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.NoClassDefFoundError: org.omg.CORBA.ORB is a
> restricted class. Please see the Google  App Engine developer's guide
> for more details.
>at
>
> com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
> 51)
>at
> com.starbase.caliber.server.CaliberServer.initORB(CaliberServer.java:
> 812)
>at
> com.starbase.caliber.server.CaliberServer.(CaliberServer.java:
> 76)
>at com.mmsi.caliberadapter.Facade.(Facade.java:14)
>at com.mmsi.caliberadapter.Facade.getInstance(Facade.java:23)
>at
>
> com.mmsi.calibersync.server.CaliberServiceImpl.getProjects(CaliberServiceImpl.java:
> 14)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>at java.lang.reflect.Method.invoke(Unknown Source)
>at
>
> com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
> 100)
>at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 562)
>... 30 more
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Mail API inquiry

2010-12-27 Thread A. Stevko
Please explain why your program needs a password to send a message. App
Engine mail servers do not require one.
Are you trying to use an mail server external to goggle appengine for
sending?


On Mon, Dec 27, 2010 at 5:50 AM, Ahmed Shoeib  wrote:

> hi all ,
>
> i know how to send mail message using Java Mail API
> but my code need email password to send the message .
>
> is there is any other way to send mail without needs to email password
> ( for example using UserService associated with GAE ) .
>
>
> please help me.
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Instant messenger

2010-12-27 Thread A. Stevko
A lot of questions/topics in this message -

re: Will it be good to use JSP ,servelet or should i use PHP. which will be
> better ?


Selecting app engine limits your language options to java or python (you are
asking this in a java biased forum).
Java JSPs and servlets are pretty much the same although JSPs are better for
serving html web pages and servlets tend to be better for writing APIs.

An option I would use is to write a Web 2.0 user interface in Google Web
Toolkit (GWT <http://code.google.com/webtoolkit/>) and use Channel
API<http://code.google.com/appengine/docs/java/channel/>to keep it
updated while writing a stateless app engine service to manage
the XMPP wrangling. This will limit the complexity of both the client and
the server portions while decoupling the client logic from the server logic.

You do not specify which APIs you what to use. I suggest you consult these
two pages for compatibility:
http://code.google.com/appengine/docs/java/jrewhitelist.html
http://code.google.com/p/googleappengine/wiki/WillItPlayInJava

re: I came to know i have to use XMPP , Jabber server.But i dont know how to
> make use of that.

Have you looked at this page?
http://code.google.com/appengine/docs/java/xmpp/

You seem to have a lot of ground to cover here.
I suggest writing a couple of simple apps to get acquainted with the
technologies and form a foundation for the user experience then link it to
the 3rd party services.

On Mon, Dec 27, 2010 at 5:01 AM, Piyush Zarkar  wrote:

> Hi, I am a newbie in web development. I am trying to create a web page
> which contains chatting messengers like ebuddy. i want to know that can i
> use google app engine to create that kind of web page and embed all APIs.
> Also i want to transport my message from Google ID to Yahoo ID kind of. I
> came to know i have to use XMPP , Jabber server.But i dont know how to make
> use of that. Also Will it be good to use JSP ,servelet or should i use PHP.
> which will be better ?
> Please help me on this topic .
> 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-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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] java.security.AccessControlException: access denied

2010-12-27 Thread A. Stevko
gt;
> at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(*
> DevAppEngineWebAppContext.java:70*)
>
> at org.mortbay.jetty.handler.HandlerWrapper.handle(*
> HandlerWrapper.java:152*)
>
> at
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(
> *JettyContainerService.java:349*)
>
> at org.mortbay.jetty.handler.HandlerWrapper.handle(*
> HandlerWrapper.java:152*)
>
> at org.mortbay.jetty.Server.handle(*Server.java:326*)
>
> at org.mortbay.jetty.HttpConnection.handleRequest(*HttpConnection.java:542
> *)
>
> at org.mortbay.jetty.HttpConnection$RequestHandler.content(*
> HttpConnection.java:938*)
>
> at org.mortbay.jetty.HttpParser.parseNext(*HttpParser.java:755*)
>
> at org.mortbay.jetty.HttpParser.parseAvailable(*HttpParser.java:218*)
>
> at org.mortbay.jetty.HttpConnection.handle(*HttpConnection.java:404*)
>
> at org.mortbay.io.nio.SelectChannelEndPoint.run(*
> SelectChannelEndPoint.java:409*)
>
> at org.mortbay.thread.QueuedThreadPool$PoolThread.run(*
> QueuedThreadPool.java:582*)
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: 500 Internal server error from UserService

2010-12-27 Thread A. Stevko
The high amount of cpu is common when an app instance is being started up.
The 'serious problem' warning message below is what you should be looking
for the cause of.
I suggest adding log messages to identify the exact line of code that is
failing.


On Sat, Dec 25, 2010 at 11:15 PM, deepfriedbrain  wrote:

> In the app engine log, I see warning messages like the following:
>
>
>1. 12-25 09:58PM 22.787 /pmproc/login 500 10689ms 0cpu_ms 0kb Mozilla/5.0
>(Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko)
>Chrome/8.0.552.224 Safari/534.10,gzip(gfe),gzip(gfe),gzip(gfe)
>
>58.146.184.252 - - [25/Dec/2010:21:58:33 -0800] "POST /pmproc/login 
> HTTP/1.1" 500 0 "http://www.brainbok.com/"; "Mozilla/5.0 (Windows; U; Windows 
> NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 
> Safari/534.10,gzip(gfe),gzip(gfe),gzip(gfe)" "www.brainbok.com" ms=10689 
> cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000120 exit_code=203
>
>2. W12-25 09:58PM 33.459
>
>A serious problem was encountered with the process that handled this 
> request, causing it to exit. This is likely to cause a new process to be used 
> for the next request to your application. If you see this message frequently, 
> you should contact the App Engine team. (Error code 203)
>
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Instant messenger

2010-12-28 Thread A. Stevko
Hello Piyush,

re: Authentication and Authorization APIs
Every service has their own authentication API. Many are coming to use the
OAuth standard although I've not seen many successful integration efforts
yet.
http://code.google.com/appengine/docs/java/oauth/

<http://code.google.com/appengine/docs/java/oauth/>There is google user
authentication support into the appengine platform with this package:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html

The external services you are referring are out of the scope of this forum.
You might want to research them directly.
I've included some links to expedite your efforts.
http://code.google.com/apis/accounts/docs/GettingStarted.html
http://developers.facebook.com/docs/authentication/
http://developer.yahoo.com/auth/

Another resource that is is of broader scope and therefore more appropriate
for many the issues you are going to face is http://stackoverflow.com/

BTW, I'm open for hire presently...



<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html>
On Tue, Dec 28, 2010 at 2:14 AM, Piyush Zarkar  wrote:

> Thanks Stevko for quick reply.
> Your suggestions are really helpful to start with.
> I have decided to select servlets for writing code, GWT for creating GUI as
> you suggested.
> But i am still confused how to authenticate google users , facebook users
> ,yahoo users etc. Is there any authentication API ?
> I am just collecting requirements at this moment. Once all the requirements
> freezes, i will start working on code and GUI.
> If you have any suggestion please let me know.
> Hope you will help me.
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: Instant messenger

2010-12-29 Thread A. Stevko
>
> Have you worked on XMPP or instant messenger before ?


No, I haven't had the opportunity yet to work with the IM libraries although
they do seem to be straight forward.

Do i need any other tool other than eclipse,GWT fro development ?


Besides using nearly every kind of browser (with the gwt dev addon), you can
get away with just using eclipse with the google plug-in to do everything.
There are a bunch of tools and best practices out there that will make your
life easier in the long run. The links below are for Windows specific utils
since I'm mostly working on Windows for local and Linux for remote.

* Definitely use a version control system - I recommend SVN, There are
others that are as good.
http://tortoisesvn.tigris.org/  (windows shell svn extensions)
http://subversion.tigris.org/

* While many people are drawn to using JDO or JPA for the persistent data
layers - both have a tough learning curve. I recommend using Objectify to
hide much of the complexities in using Big Table's no-sql nature.
http://code.google.com/p/objectify-appengine/

* As you advance, you will want to use Google Guice & GIN to simplify &
document the dependencies
http://code.google.com/p/google-guice/

* A local proxy service brings daylight to the way the components
communicate on the network.
http://www.fiddler2.com/fiddler2/

* Firefox add-ons that are invaluable
Firebug! - allows you to view the GWT client logs in the browser window
instead of viewing them in the eclipse dev console (also works w/ production
instances)
Scrapbook Plus - for literally snapshotting the current page state with live
html/image/js
Web Developer - for inspecting the page contents and layout
View Cookies - for inspecting/editing cookies

* The MVP pattern is a great way to design a medium to highly complex
application's architecture.

* Take the time to look at the Session Videos from the last two years of
Google IO. They will change your life - they did mine.
http://www.google.com/events/io/2010/sessions.html

I've got an GAE/GWT application deployed that was developed using all of the
above technologies. If you are a Facebook user, give it a free trial.
www.ninuku.com

--Andy Stevko


On Wed, Dec 29, 2010 at 4:49 AM, pdzarkar  wrote:

> Hi Andy,
> I can't hire you because i am just a small developer and doing this
> for learning API's and new technology.
> Have you worked on XMPP or instant messenger before ?
> Do i need any other tool other than eclipse,GWT fro development ?
>
>
> On Dec 28, 10:50 pm, "A. Stevko"  wrote:
> > Hello Piyush,
> >
> > re: Authentication and Authorization APIs
> > Every service has their own authentication API. Many are coming to use
> the
> > OAuth standard although I've not seen many successful integration efforts
> > yet.http://code.google.com/appengine/docs/java/oauth/
> >
> > <http://code.google.com/appengine/docs/java/oauth/>There is google user
> > authentication support into the appengine platform with this package:
> http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...
> >
> > The external services you are referring are out of the scope of this
> forum.
> > You might want to research them directly.
> > I've included some links to expedite your efforts.
> http://code.google.com/apis/accounts/docs/GettingStarted.htmlhttp://developers.facebook.com/docs/authentication/http://developer.yahoo.com/auth/
> >
> > Another resource that is is of broader scope and therefore more
> appropriate
> > for many the issues you are going to face ishttp://stackoverflow.com/
> >
> > BTW, I'm open for hire presently...
> >
> > <http://code.google.com/appengine/docs/java/javadoc/com/google/appengi..
> .>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Dec 28, 2010 at 2:14 AM, Piyush Zarkar 
> wrote:
> > > Thanks Stevko for quick reply.
> > > Your suggestions are really helpful to start with.
> > > I have decided to select servlets for writing code, GWT for creating
> GUI as
> > > you suggested.
> > > But i am still confused how to authenticate google users , facebook
> users
> > > ,yahoo users etc. Is there any authentication API ?
> > > I am just collecting requirements at this moment. Once all the
> requirements
> > > freezes, i will start working on code and GUI.
> > > If you have any suggestion please let me know.
> > > Hope you will help me.
> >
> > > --
> > > 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-app

Re: [appengine-java] Instant messenger

2010-12-29 Thread A. Stevko
A couple of other resources Piyusk are:
The issue ticket base at
http://code.google.com/p/googleappengine/issues/list<http://code.google.com/p/googleappengine/issues/list?can=2&q=oauth&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles#>
<http://code.google.com/p/googleappengine/issues/list?can=2&q=oauth&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles#>and
the twice monthly IRC chat with the GAE developers.



On Wed, Dec 29, 2010 at 2:45 PM, Sumi  wrote:

>
> Why do you say not many successful oAuth integrations?I have tried using
> them but with so success...is there anyone from google who can comment on
> this... i did everything mentioned in gdata oauth integrations but still no
> luck..
>
>
>
> On Tue, Dec 28, 2010 at 9:50 AM, A. Stevko  wrote:
>
>> Hello Piyush,
>>
>> re: Authentication and Authorization APIs
>> Every service has their own authentication API. Many are coming to use the
>> OAuth standard although I've not seen many successful integration efforts
>> yet.
>> http://code.google.com/appengine/docs/java/oauth/
>>
>> <http://code.google.com/appengine/docs/java/oauth/>There is google user
>> authentication support into the appengine platform with this package:
>>
>> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html
>>
>> The external services you are referring are out of the scope of this
>> forum. You might want to research them directly.
>> I've included some links to expedite your efforts.
>> http://code.google.com/apis/accounts/docs/GettingStarted.html
>> http://developers.facebook.com/docs/authentication/
>> http://developer.yahoo.com/auth/
>>
>> Another resource that is is of broader scope and therefore more
>> appropriate for many the issues you are going to face is
>> http://stackoverflow.com/
>>
>> BTW, I'm open for hire presently...
>>
>>
>>
>>
>> <http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html>
>> On Tue, Dec 28, 2010 at 2:14 AM, Piyush Zarkar wrote:
>>
>>> Thanks Stevko for quick reply.
>>> Your suggestions are really helpful to start with.
>>> I have decided to select servlets for writing code, GWT for creating
>>> GUI as you suggested.
>>> But i am still confused how to authenticate google users , facebook users
>>> ,yahoo users etc. Is there any authentication API ?
>>> I am just collecting requirements at this moment. Once all the
>>> requirements freezes, i will start working on code and GUI.
>>> If you have any suggestion please let me know.
>>> Hope you will help me.
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> -- A. Stevko
>> ===
>> "If everything seems under control, you're just not going fast enough."
>> M. Andretti
>>
>>
>>
>>
>>
>>  --
>> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Instant messenger

2010-12-29 Thread A. Stevko
Sumi - I personally have not seen lots of successful examples of oauth
deployed although it seems to be the right direction.
I suggest you start another thread with your experiences and details...

On Wed, Dec 29, 2010 at 6:03 PM, A. Stevko  wrote:

> A couple of other resources Piyusk are:
> The issue ticket base at
> http://code.google.com/p/googleappengine/issues/list<http://code.google.com/p/googleappengine/issues/list?can=2&q=oauth&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles#>
> <http://code.google.com/p/googleappengine/issues/list?can=2&q=oauth&colspec=ID+Type+Component+Status+Stars+Summary+Language+Priority+Owner+Log&cells=tiles#>and
> the twice monthly IRC chat with the GAE developers.
>
>
>
> On Wed, Dec 29, 2010 at 2:45 PM, Sumi  wrote:
>
>>
>> Why do you say not many successful oAuth integrations?I have tried using
>> them but with so success...is there anyone from google who can comment on
>> this... i did everything mentioned in gdata oauth integrations but still no
>> luck..
>>
>>
>>
>> On Tue, Dec 28, 2010 at 9:50 AM, A. Stevko  wrote:
>>
>>> Hello Piyush,
>>>
>>> re: Authentication and Authorization APIs
>>> Every service has their own authentication API. Many are coming to use
>>> the OAuth standard although I've not seen many successful integration
>>> efforts yet.
>>> http://code.google.com/appengine/docs/java/oauth/
>>>
>>> <http://code.google.com/appengine/docs/java/oauth/>There is google user
>>> authentication support into the appengine platform with this package:
>>>
>>> http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html
>>>
>>> The external services you are referring are out of the scope of this
>>> forum. You might want to research them directly.
>>> I've included some links to expedite your efforts.
>>> http://code.google.com/apis/accounts/docs/GettingStarted.html
>>> http://developers.facebook.com/docs/authentication/
>>> http://developer.yahoo.com/auth/
>>>
>>> Another resource that is is of broader scope and therefore more
>>> appropriate for many the issues you are going to face is
>>> http://stackoverflow.com/
>>>
>>> BTW, I'm open for hire presently...
>>>
>>>
>>>
>>>
>>> <http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/users/package-summary.html>
>>> On Tue, Dec 28, 2010 at 2:14 AM, Piyush Zarkar wrote:
>>>
>>>> Thanks Stevko for quick reply.
>>>> Your suggestions are really helpful to start with.
>>>> I have decided to select servlets for writing code, GWT for creating
>>>> GUI as you suggested.
>>>> But i am still confused how to authenticate google users , facebook
>>>> users ,yahoo users etc. Is there any authentication API ?
>>>> I am just collecting requirements at this moment. Once all the
>>>> requirements freezes, i will start working on code and GUI.
>>>> If you have any suggestion please let me know.
>>>> Hope you will help me.
>>>>
>>>> --
>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> -- A. Stevko
>>> ===
>>> "If everything seems under control, you're just not going fast enough."
>>> M. Andretti
>>>
>>>
>>>
>>>
>>>
>>>  --
>>> 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 mes

Re: [appengine-java] App calling another secured App

2010-12-31 Thread A. Stevko
Perhaps you can use a shared keyed encryption method to secure the
communications between your two apps.
Trying to use the browser based authentication methods for app to app
communications forces you to manage sessions etc. which allows for attacks
like man-in-the-middle and session stealing. If you control both ends of the
handshake, a shared secret is simple to implement and easiest to maintain.




On Fri, Dec 31, 2010 at 7:18 AM, Andy  wrote:

> Hi,
>
> I am trying to build 2 apps.  App 1 is calling App 2 through URL Fetch but
> App 2's URL is secured so when APP 1 is fetching something from APP 2, it
> requires authentication, both apps belong to the same gmail account though.
>  How do I do that?  Do I use URL Fetch with GET and submit login to APP 2?
>  Any idea?
>
> Thanks,
>
> Andy
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Update an Existing object in the datastore - Problem

2011-01-03 Thread A. Stevko
I think the inconsistent saving that you are experiencing has to do with how
the parent object, Torneo, is being accessed.
You are passing an database object reference into a transaction.
Is that object "detachable" ?

If not, then you should be retrieving it and updating it within the same
transaction.
See Updating an Object in
http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html

If so, then you should re-attach it prior to updating it.
http://www.jpox.org/docs/1_2/jdo/attach_detach.html

Hope this helps.
--Andy

On Mon, Jan 3, 2011 at 3:47 AM, lisandrodc  wrote:

> Hi! I have a problem with the persistence of an existing object
> "Torneo" (with a empty collection of objects "Equipo").
> When I add elements to the collection and want to persist,
> sometimes persist and sometimes not persist in the
> datastore(Restarting the server of the application). The code of
> example:
> public void agregarEquipoConTorneo(Torneo unTorneo, Equipo  unEquipo)
> {
>/*add Equipo with a existing "Torneo" in the
>   datastore, the  "unTorneo"(param) class obtain with:
> Torneo b =
>   pm.getObjectById(model.Torneo.class, idTorneo);*/
>Transaction tx = pm.currentTransaction();
>try {
>tx.begin();
>unTorneo.agregarEquipo(unEquipo);
>//add unEquipo to collection "equipos"
>pm.makePersistentAll(unTorneo);
>tx.commit();
> System.out.println("persistioTorneoConEquipo");
>} finally {
> pm.close();
>if (tx.isActive()) {
>tx.rollback();
>}
>}
> Does it design someone of what this one happening?
> Thanks!
> Regards
> Lisandro
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: Update an Existing object in the datastore - Problem

2011-01-03 Thread A. Stevko
Yes it is detachable.
So you need to detach & re-attach the object using the code samples in
http://www.jpox.org/docs/1_2/jdo/attach_detach.html

On Mon, Jan 3, 2011 at 5:44 AM, lisandrodc  wrote:

> Hi Stevko! The class "Torneo", it's  definite:
>
>
> @PersistenceCapable(identityType=IdentityType.APPLICATION,detachable="true")
> public class Torneo implements Serializable {
>/*
> * @author Lisandro della Croce
> */
>@PrimaryKey
>@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
>
>private Key id;
>@Persistent
>private String nombre;
>..
>@Persistent(defaultFetchGroup = "true")
>    private List equiposTorneo;
>
>
> Is correct?
>
> Regards
>
> On Jan 3, 9:06 am, "A. Stevko"  wrote:
> > I think the inconsistent saving that you are experiencing has to do with
> how
> > the parent object, Torneo, is being accessed.
> > You are passing an database object reference into a transaction.
> > Is that object "detachable" ?
> >
> > If not, then you should be retrieving it and updating it within the same
> > transaction.
> > See Updating an Object inhttp://
> code.google.com/appengine/docs/java/datastore/creatinggettinga...
> >
> > If so, then you should re-attach it prior to updating it.
> http://www.jpox.org/docs/1_2/jdo/attach_detach.html
> >
> > Hope this helps.
> > --Andy
> >
> >
> >
> >
> >
> > On Mon, Jan 3, 2011 at 3:47 AM, lisandrodc  wrote:
> > > Hi! I have a problem with the persistence of an existing object
> > > "Torneo" (with a empty collection of objects "Equipo").
> > > When I add elements to the collection and want to persist,
> > > sometimes persist and sometimes not persist in the
> > > datastore(Restarting the server of the application). The code of
> > > example:
> > > public void agregarEquipoConTorneo(Torneo unTorneo, Equipo  unEquipo)
> > > {
> > >/*add Equipo with a existing "Torneo" in the
> > >   datastore, the  "unTorneo"(param) class obtain with:
> > > Torneo b =
> > >   pm.getObjectById(model.Torneo.class, idTorneo);*/
> > >Transaction tx = pm.currentTransaction();
> > >try {
> > >tx.begin();
> > >unTorneo.agregarEquipo(unEquipo);
> > >//add unEquipo to collection "equipos"
> > >pm.makePersistentAll(unTorneo);
> > >tx.commit();
> > > System.out.println("persistioTorneoConEquipo");
> > >} finally {
> > > pm.close();
> > >if (tx.isActive()) {
> > >tx.rollback();
> > >}
> > >}
> > > Does it design someone of what this one happening?
> > > Thanks!
> > > Regards
> > > Lisandro
> >
> > > --
> > > 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.
> >
> > --
> > -- A. Stevko
> > ===
> > "If everything seems under control, you're just not going fast enough."
> M.
> > Andretti
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: JDO - I can't update an object with One-to-One Relationships

2011-01-03 Thread A. Stevko
Hello Yoann,
Please check out the section titled "Dependent Children and Cascading
Deletes" at
http://code.google.com/appengine/docs/java/datastore/relationships.html

Add the annotation

@Persistent(dependent = "true")


to make the tie the POJOLocation life cycle to the parent.


On Mon, Jan 3, 2011 at 3:52 AM, yoyo  wrote:

> I answer to myself.
>
> Before to do the setXXX(), I must delete the previous object.
>
> Like this :
>
> POJOUser user = pm.getObjectById(POJOUser.class, username);
> pm.deletePersistent(user.getLastLocation());
> user.setLastLocation(new POJOLocation(newLocation));
>
> And now, it works. Moreover, old references are deleted of the store.
>
> I hope this tips will help someone.
>
> Yoann
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: Update an Existing object in the datastore - Problem

2011-01-03 Thread A. Stevko
This is not the most elegant or efficient way to do things but here is
something to make your code work.


  public Torneo devolverTorneo(Long idTorneo) {
   Torneo dbTorneo = pm.getObjectById(Torneo.class, idTorneo);
   // detach a copy of the persistent object
   return pm.detachCopy(dbTorneo );
   }

   public void agregarEquipoConTorneo(Torneo unTorneo, Equipo
unEquipo) {
   Transaction tx = pm.currentTransaction();

   try {
   tx.begin();
   // sync unTorneo with database before changing it
   Torneo dbTorneo = pm.makePersistent(unTorneo);
   dbTorneo.agregarEquipo(unEquipo);
   /*add an "Equipo" to collection "equipos" That has
the class "Torneo"
   Debugs adds, but sometimes he does not persist*/

   tx.commit();
System.out.println("persistioTorneoConEquipo");
   } finally {

   if (tx.isActive()) {
   tx.rollback();
   }

   }
   }


Another way to do all this is to redesign your ControladorTorneo class to
only store the ID of the Torneo and fetch it from the database in the
transaction you want to change it.
 public void agregarEquipoConTorneo(  torACargar, Equipo unEquipo)...

-- 
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] example maven ,sping, jpa, gae

2011-01-05 Thread A. Stevko
Guice
http://code.google.com/p/google-guice/

On Wed, Jan 5, 2011 at 1:40 PM, fachhoch  wrote:

> if spring is too slow what framework  you suggest for dependency injection
> ?
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] example maven ,sping, jpa, gae

2011-01-05 Thread A. Stevko
Also, if you are interested in a quicker than JDO/JPA learning curve, try
Objectify for your persistence layer.
http://code.google.com/p/objectify-appengine/
<http://code.google.com/p/objectify-appengine/>

On Wed, Jan 5, 2011 at 4:22 PM, A. Stevko  wrote:

> Guice
> http://code.google.com/p/google-guice/
>
>
> On Wed, Jan 5, 2011 at 1:40 PM, fachhoch  wrote:
>
>> if spring is too slow what framework  you suggest for dependency injection
>> ?
>>
>> --
>> 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.
>>
>
>
>
> --
> -- A. Stevko
> ===
> "If everything seems under control, you're just not going fast enough." M.
> Andretti
>
>
>
>
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Error Running GuestBook !~

2011-01-05 Thread A. Stevko
achedChain.doFilter(ServletHandler.java:1157)
>   at 
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
>   at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
>   at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>   at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>   at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>   at 
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>   at 
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:349)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>   at org.mortbay.jetty.Server.handle(Server.java:326)
>   at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>   at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> --
> *Powered by Jetty://*
>
> --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] Cygwin Vista Newbie

2011-01-08 Thread A. Stevko
seems like a question for the android ndk forum rather than this one...

On Sat, Jan 8, 2011 at 11:07 AM, John Handal  wrote:

> Error Message from Cygwin:
>
> Juan-PC /cygdrive/c/users/juan/desktop/ndk/ndk5.0/android-ndk-r5/samples
> $ ndk-build
> Android NDK: Could not find application project directory !
> Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
>
> /cygdrive/c/users/juan/desktop/ndk/ndk5.0/android-ndk-r5/build/core/build-local.
> mk:85: *** Android NDK: Aborting.  Stop.
>
>
>
> System Variable : NDK_PROJECT_PATH
> Variable value  :
> ;C:\Users\Juan\Desktop\NDK\NDK5.0\android-ndk-r5\build\core\build-local.mk
>
> Runing Windows Vista
>
>
>
> What's wrong with the NDK_PROJECT_PATH
>
> [?] THX
>
>
>
>  --
> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

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

<<361.gif>>

Re: [appengine-java] Custom location for local_db.bin?

2011-01-15 Thread A. Stevko
Why not just back it up or check-in to version control?
Another option is to use ln -s to move it.

On Sat, Jan 15, 2011 at 10:29 AM, Daniel Kvasnicka jr. <
daniel.kvasnicka...@gmail.com> wrote:

> Hey,
>
> is it possible to customize the location of local_db.bin? I need it to be
> somewhere outside the application, so that it doesn't get harmed.
> I'm using NetBeans to develop apps and Clean & Build always destroys my
> data.
> There must be some option for this, e.g. in appengine-web.xml, 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: passing multiple parameters to JDOQL

2011-01-20 Thread A. Stevko
re: how do i print the complete query executed in the logs when
this approach is used?

Simple. Print the query string and then print the parameters.


On Thu, Jan 20, 2011 at 6:35 AM, Vik  wrote:

> hie
>
> any updates on this please?
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
>
> On Wed, Jan 5, 2011 at 9:58 AM, Vik  wrote:
>
>> Hie
>>
>> Thanks..
>>
>> This worked for me. But how do i print the complete query executed in the
>> logs when this approach is used?
>>
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> www.sakshum.blogspot.com
>>
>>
>> On Thu, Dec 30, 2010 at 9:43 PM, Yegor  wrote:
>>
>>> >   query.declareParameters("Long bind_pocId, Date bind_startDate, Date
>>> > bind_endDate");
>>>
>>> This is correct. However, I personally prefer the shorter form, where
>>> instead of using filter "column == alias" along with
>>> query.declareParameters("Type alias") you just use filter "column
>>> == :alias" (note the colon before the alias name). Your query can be
>>> rewritten as follows:
>>>
>>> Query query = pm.newQuery(PocVacationSchedule.class);
>>> query.setFilter("pocId == :pi && startDate == :sd && endDate == :ed");
>>> List rulesList = (List)
>>> query.execute(pocId, startFrom, endFrom);
>>>
>>> --
>>> 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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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: passing multiple parameters to JDOQL

2011-01-24 Thread A. Stevko
Sorry Vik,
There is no single string created for prepared queries - the JDO2
standard d<http://db.apache.org/jdo/api23/apidocs/index.html>oes
not allow for retrieving query information.
http://db.apache.org/jdo/api23/apidocs/javax/jdo/Query.html

Now if you were working with the low level database api, that Query has the
methods you are looking for
*Query.getFilterPredicates<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.html#getFilterPredicates()>
*()

Query.FilterPredicate.*getPropertyName<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getPropertyName()>
*()
*Query.FilterPredicate.getOperator<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getOperator()>
*()
*Query.FilterPredicate.getValue<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getValue()>
*()



On Mon, Jan 24, 2011 at 10:04 PM, Vik  wrote:

> anyone please some update on this? I am unable to find it by googling
> either...
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
>
> On Sat, Jan 22, 2011 at 1:59 PM, Vik  wrote:
>
>> any help on this please as it is blocking us to effectively log the
>> queries
>>
>> Thankx and Regards
>>
>> Vik
>> Founder
>> www.sakshum.com
>> www.sakshum.blogspot.com
>>
>>
>> On Fri, Jan 21, 2011 at 9:47 AM, Vik  wrote:
>>
>>> Well That's fine But I would be more interested in logging the exact
>>> query fired by engine instead of separately printing individual stuff.
>>>
>>> The individual printing these elements this way is painful as well in the
>>> development process. So, any better way to print the query exactly fired by
>>> engine?
>>>
>>>
>>> Thankx and Regards
>>>
>>> Vik
>>> Founder
>>> www.sakshum.com
>>> www.sakshum.blogspot.com
>>>
>>>
>>> On Fri, Jan 21, 2011 at 3:49 AM, A. Stevko wrote:
>>>
>>>> re: how do i print the complete query executed in the logs when
>>>> this approach is used?
>>>>
>>>> Simple. Print the query string and then print the parameters.
>>>>
>>>>
>>>> On Thu, Jan 20, 2011 at 6:35 AM, Vik  wrote:
>>>>
>>>>> hie
>>>>>
>>>>> any updates on this please?
>>>>>
>>>>> Thankx and Regards
>>>>>
>>>>> Vik
>>>>> Founder
>>>>> www.sakshum.com
>>>>> www.sakshum.blogspot.com
>>>>>
>>>>>
>>>>> On Wed, Jan 5, 2011 at 9:58 AM, Vik  wrote:
>>>>>
>>>>>> Hie
>>>>>>
>>>>>> Thanks..
>>>>>>
>>>>>> This worked for me. But how do i print the complete query executed in
>>>>>> the logs when this approach is used?
>>>>>>
>>>>>>
>>>>>> Thankx and Regards
>>>>>>
>>>>>> Vik
>>>>>> Founder
>>>>>> www.sakshum.com
>>>>>> www.sakshum.blogspot.com
>>>>>>
>>>>>>
>>>>>> On Thu, Dec 30, 2010 at 9:43 PM, Yegor wrote:
>>>>>>
>>>>>>> >   query.declareParameters("Long bind_pocId, Date bind_startDate,
>>>>>>> Date
>>>>>>> > bind_endDate");
>>>>>>>
>>>>>>> This is correct. However, I personally prefer the shorter form, where
>>>>>>> instead of using filter "column == alias" along with
>>>>>>> query.declareParameters("Type alias") you just use filter "column
>>>>>>> == :alias" (note the colon before the alias name). Your query can be
>>>>>>> rewritten as follows:
>>>>>>>
>>>>>>> Query query = pm.newQuery(PocVacationSchedule.class);
>>>>>>> query.setFilter("pocId == :pi && startDate == :sd && endDate ==
>>>>>>> :ed");
>>>>>>> List rulesList = (List)
>>>>>>> query.execute(pocId, startFrom, endFrom);
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the

Re: [appengine-java] Problem using activemq with GWT

2011-03-10 Thread A. Stevko
You might want to contact the developers directly by opening an issue...

On Wed, Mar 9, 2011 at 7:46 AM, Ramya  wrote:

> Hi,
>
> I am trying to use activemq inside a GWT project. I followed the
> steps given in http://code.google.com/p/gwt-activemq/.
> But when I tried to run the GWT project it gave me the following
> error:
>
>
> [ERROR] javax.servlet.ServletContext log: unavailable
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission modifyThreadGroup)
>
>
> Can anyone help me with this ?
>
> Ramya
>
> --
> 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.
>
>


-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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] app engine performance statistics

2011-04-14 Thread A. Stevko
Sounds like you better get started coding your metrics. Here is a hint - use
@cached within your objectify entity.
On Apr 14, 2011 8:57 AM, "chintan vora"  wrote:
> hello I am currently developing an ecommerce solution on App engine.
> I have to prepare a report n d performance parameters of the app engine
and
> show dem why to choose appengine over d normal 3 tier web architecture
> kindly help me and if u can provide me with the statistics of how app
engine
> is reliable, what difference does memcache make in performance
> In short want a comparision about performance parameters on 3 tier
> architecture and on Google cloud
> Please reply as soon as possible as I hav deadline in 3 days
>
> 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.
>

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