[appengine-java] Re: Cannot install app engine plugin in eclipse 3.5 (Galileo)

2010-01-05 Thread Uros
Hi Jason,

thanks for your reply. I found the problem was not in the connection
but in my sluggish hardware. The packages were downloaded but somehow,
install process did not finish in time, so it has timed out. NOD
antivirus (ekern.exe) ate 100% of my CPU during installation. Turning
it off helped me resolve the problem.

After several attempts to install the plugin, app engine and gwt my
eclipse environment got corrupted. Plugin with SDKs was listed as
installed but there were no options present in the GUI (no google
icons in toolbar, no menu File/New/Web AppIication project,...). So I
have removed .eclipse directory from home directory, restarted
eclipse and then installed the plugin with SDKs again. It works now.

Regards,
Uros

On Jan 4, 5:32 pm, Jason Parekh jasonpar...@gmail.com wrote:
 Hi Uros,

 Could you try installing again?  I think there may have been
 intermittent connection issues.

 jason

 On Mon, Dec 28, 2009 at 4:21 AM, Uros uipa...@gmail.com wrote:
  Hello,

  When I try toinstallapp engine plugin in eclipse I get the following
  error:

  An error occurred while collecting items to be installed
   session context was:(profile=epp.package.jee,
  phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect,
  operand=, action=).
   Unable to read repository at
 http://dl.google.com/eclipse/plugin/3.5/plugins/com.google.appengine.
   Read timed out

  An error occurred while collecting items to be installed
  An exception stack trace is not available.

  Unable to read repository at
 http://dl.google.com/eclipse/plugin/3.5/plugins/com.google.appengine.
  java.net.SocketTimeoutException: Read timed out
  at java.net.SocketInputStream.socketRead0(Native Method)
  at java.net.SocketInputStream.read(Unknown Source)
  at java.io.BufferedInputStream.fill(Unknown Source)
  at java.io.BufferedInputStream.read1(Unknown Source)
  at java.io.BufferedInputStream.read(Unknown Source)
  at org.apache.commons.httpclient.ContentLengthInputStream.read
  (ContentLengthInputStream.java:170)
  at java.io.FilterInputStream.read(Unknown Source)
  at org.apache.commons.httpclient.AutoCloseInputStream.read
  (AutoCloseInputStream.java:108)
  at java.io.FilterInputStream.read(Unknown Source)
  at org.apache.commons.httpclient.AutoCloseInputStream.read
  (AutoCloseInputStream.java:127)
  at
  org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer
  $1.performFileTransfer(AbstractRetrieveFileTransfer.java:140)
  at org.eclipse.ecf.filetransfer.FileTransferJob.run
  (FileTransferJob.java:73)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

  session context was:(profile=epp.package.jee,
  phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect,
  operand=, action=).
  An exception stack trace is not available.

  eclipse.buildId=M20090917-0800
  java.version=1.6.0_17
  java.vendor=Sun Microsystems Inc.
  BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
  Framework arguments:  -product org.eclipse.epp.package.jee.product
  Command-line arguments:  -os win32 -ws win32 -arch x86 -product
  org.eclipse.epp.package.jee.product

  Is there any workaround to this problem?

  Thanks,
  Uros

  --

  You received this message 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 
  athttp://groups.google.com/group/google-appengine-java?hl=en.

--

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




[appengine-java] Re: Problem accessing a file on file system

2010-01-05 Thread m seleron
Hi,

Though it doesn't confirm so much.

I put the file in /WEB-INF directly.
I think if you can access this form.
WEB-INF/myfile.dat

Please Try
Thanks.


On 1月5日, 午後4:57, Steph steph@gmail.com wrote:
 I am using a RandomAccessFile, which is whitelisted on Google App
 Engine.

 My simple code looks like:

   RandomAccessFile file = new RandomAccessFile(/WEB-INF/classes/
 myfile.dat, r);

 which gets a

 java.security.AccessControlException: access denied
 (java.io.FilePermission \WEB-INF\classes\myfile.dat read)
         at java.security.AccessControlContext.checkPermission
 (AccessControlContext.java:323)
         at java.security.AccessController.checkPermission
 (AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:
 532)

 Same thing if I put the file in /WEB-INF directly.

 Am I missing something? Thanks for your help.

--

You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] user by default

2010-01-05 Thread Acerezo
Can I get the user account by default if the user is al ready loggin
in igoogle, gmail, etc?

--

You received this message 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] Datanucleus initialization performance

2010-01-05 Thread Todd Lindner
Since Google App Engine will power down the app if there aren't any
requests for ~10 minutes, it has to re-initialize your application
often.  Not a problem  I was able to trim my app init down to
about 1.5 seconds, so its reasonable, but datanucleus itself takes
about 5 seconds on top of that (and I only have 5 persistent
entities!).  This is a real drag on my app and I almost want to keep
it awake with a pinger...

Any way to speed up initialization?  I'm using JPA.

Thanks
-Todd

--

You received this message 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: https on my domain

2010-01-05 Thread Pion
I have just found good discussion on HTTPS Support for appspot.com
on 
http://groups.google.com/group/google-appengine/browse_thread/thread/1aa08effbb5839ab/6c6552cf7bdaedaa?lnk=gstq=https#

On Jan 4, 9:43 am, Pion onlee2...@gmail.com wrote:
 I just found this SSL/HTTPSSupporton Google Apps domains (issue
 792) 
 onhttp://code.google.com/p/googleappengine/issues/detail?id=792q=https

 There are 50+ comments on this issue.

 On Jan 3, 10:26 am, Pion onlee2...@gmail.com wrote:

 http://www.slideshare.net/bess.ho/google-health-architecture-api
  (slide 28) shows that Google Health is using Google App Engine.

  I just registered to Google Health. After logging in, the url of the
  Google Health ishttps://health.google.com/health/p/--notice the
 httpsand no *.appspot.com

  How is it done?

  Thanks in advance for your help.

  On Jan 3, 10:01 am, Pion onlee2...@gmail.com wrote:

  http://code.google.com/appengine/kb/general.html#httpsappssays, Can
   I use SSL (HTTPS) on App Engine with my Google Apps domain?

   All secure traffic with Google App Engine must be served from your
   appspot.com domain (https://your-app-id.appspot.com). If you are
   serving your app off of a Google Apps domain, you must direct all
   secure traffic through your app's appspot domain.

   On Thursday, October 16, 
   2008,http://googleappengine.blogspot.com/2008/10/announcing-https-support-...
   says, You may be wondering why we're only supporting appspot.com
   right now, and not arbitrary Google Apps domains. This has to do with
   fundamental limitations in the SSL protocol. We're currently
   investigating workarounds for this using e.g. SNI, which provides a
   viable solution for newer browsers--we'll keep you posted! 

   I don't see it the product 
   roadmaphttp://code.google.com/appengine/docs/roadmap.html.

   What's the latest status/plan on this?

--

You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: HIPAA compliance

2010-01-05 Thread Pion
I found the following HIPAA related discussions:


HIPAA requirements vs. AppEngine security guidelines
http://groups.google.com/group/google-appengine/browse_thread/thread/78b40375b8b5af41/4cb5de1b17aae039?lnk=gstq=HIPAA#

IPAA and client data stored w/ Google's App Engine framework
http://groups.google.com/group/google-appengine/browse_thread/thread/9599673ca86d7f7c/d60097ab14c11966?lnk=gstq=HIPAA#

On Jan 3, 8:22 pm, Doug doug...@gmail.com wrote:
 From reading the Google Health FAQ I think the answer to your question
 is no, but they don't need to be.

 Is Google Health covered byHIPAA?

 Unlike a doctor or health plan, Google Health is not regulated by the
 Health Insurance Portability and Accountability Act (HIPAA), a federal
 law that establishes data confidentiality standards for patient health
 information. This is because Google does not store data on behalf of
 health care providers. Instead, our primary relationship is with you,
 the user. UnderHIPAA, you have a right to obtain a copy of your
 medical records. If you choose to use Google Health, we'll help you
 store and manage your medical records online.

 Although Google Health is not covered byHIPAA, we are committed to
 protecting your privacy. Our Google Health privacy policy governs what
 information Google Health collects and how we use it, and any
 violation of that policy can be enforced by the Federal Trade
 Commission, which takes action against companies that engage in unfair
 and deceptive trade practices -- including violations of their privacy
 policies.

 On Jan 3, 11:17 am, Pion onlee2...@gmail.com wrote:

 http://www.slideshare.net/bess.ho/google-health-architecture-api
  (slide 28) shows that Google Health is using Google App Engine.

  Is Google App EngineHIPAA(Health Insurance Portability and
  Accountability Act -http://en.wikipedia.org/wiki/HIPAA) compliance ?

--

You received this message 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] user by default

2010-01-05 Thread Don Schwarz
No, we cannot share a user's email address with an application until the
user has explicitly logged into your application.

On Tue, Jan 5, 2010 at 7:33 AM, Acerezo acerezoguil...@gmail.com wrote:

 Can I get the user account by default if the user is al ready loggin
 in igoogle, gmail, etc?

 --

 You received this message 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.comgoogle-appengine-java%2bunsubscr...@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] Datanucleus initialization performance

2010-01-05 Thread Don Schwarz
Have you tried enabling offline precompilation?

On Tue, Jan 5, 2010 at 8:52 AM, Todd Lindner todd.lind...@gmail.com wrote:

 Since Google App Engine will power down the app if there aren't any
 requests for ~10 minutes, it has to re-initialize your application
 often.  Not a problem  I was able to trim my app init down to
 about 1.5 seconds, so its reasonable, but datanucleus itself takes
 about 5 seconds on top of that (and I only have 5 persistent
 entities!).  This is a real drag on my app and I almost want to keep
 it awake with a pinger...

 Any way to speed up initialization?  I'm using JPA.

 Thanks
 -Todd

 --

 You received this message 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 

You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.

To post to this group, send email to google-appengine-j...@googlegroups.com.

To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Request Too Large

2010-01-05 Thread Max
It seems there is 1MB limit

On Jan 4, 1:35 am, Max max.seven@gmail.com wrote:
 I am still getting that error

 com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
 request to API call datastore_v3.Put() was too large.
         at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall
 (ApiProxyImpl.java:212)
         at com.google.apphosting.runtime.ApiProxyImpl.access$000
 (ApiProxyImpl.java:43)
         at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
 96)
         at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
 94)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
 (ApiProxyImpl.java:94)
         at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
 (ApiProxyImpl.java:43)

 Could some advise where should I look for that problem?

 Thanks

 On Dec 31 2009, 2:00 am, Max max.seven@gmail.com wrote:

  I am doing bulk upload using my custom code.
  It uploaded most data but few blocks are not uploaded.
  I use makePersistentAll and my code guarantees that it does not upload
  more then 500 objects at once.

  I get following error

  com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
  request to API call datastore_v3.Put() was too large.
          at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall
  (ApiProxyImpl.java:212)
          at com.google.apphosting.runtime.ApiProxyImpl.access$000
  (ApiProxyImpl.java:43)
          at 
  com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
  96)
          at 
  com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:
  94)
          at java.security.AccessController.doPrivileged(Native Method)
          at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
  (ApiProxyImpl.java:94)
          at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall
  (ApiProxyImpl.java:43)
          at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:83)

  It is not  java.lang.IllegalArgumentException: cannot put more than
  500 entities in a single call

  What is too large? I wish to verify my data before I will submit it
  to datastore and ensure that it is not too large for the datastore :)

  Cheers, Max


-- 
You received this message 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] Datanucleus initialization performance

2010-01-05 Thread Toby Reyelts
Also, can you duplicate the slowness in the dev_appserver? If so, you can
hook up a profiling tool yourself and see if there are any obvious hotspots.

On Tue, Jan 5, 2010 at 12:44 PM, Don Schwarz schwa...@google.com wrote:

 Have you tried enabling offline precompilation?


 On Tue, Jan 5, 2010 at 8:52 AM, Todd Lindner todd.lind...@gmail.comwrote:

 Since Google App Engine will power down the app if there aren't any
 requests for ~10 minutes, it has to re-initialize your application
 often.  Not a problem  I was able to trim my app init down to
 about 1.5 seconds, so its reasonable, but datanucleus itself takes
 about 5 seconds on top of that (and I only have 5 persistent
 entities!).  This is a real drag on my app and I almost want to keep
 it awake with a pinger...

 Any way to speed up initialization?  I'm using JPA.

 Thanks
 -Todd

 --

 You received this message 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.comgoogle-appengine-java%2bunsubscr...@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.comgoogle-appengine-java%2bunsubscr...@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] Query with inequality operators on a single property fails

2010-01-05 Thread dantuluri
Hi,

 I have the following query with inequality operators on a single
property:

query = pm.newQuery(File.class);
query.setFilter(dueDate = beginDateParam  dueDate =
endDateParam);
ListFile storedFiles = (ListFile)query.executeWithArray(begin,
end);

Runtime is throwing this exception:
java.lang.RuntimeException:
org.datanucleus.store.appengine.query.DatastoreQuery
$UnsupportedDatastoreFeatureException: Problem with query SELECT FROM
Flow WHERE dueDate = beginDateParam  dueDate = endDateParam:
Operator  =  cannot be used as part of the join condition.  Use
'contains' if joining on a Collection field and equality if joining on
a single-value field.

AppEngine documentation clearly says it supports inequality operators
on a single property. Following is the quote from the documentation:

Inequality Filters Are Allowed On One Property Only
A query may only use inequality filters (, =, =, , !=) on one
property across all of its filters.
For example, this query is allowed:
select from Person where birthYear = minBirthYearParam
   birthYear = maxBirthYearParam

Can anyone with App Engine experience please explain whats wrong with
this query?

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.




Re: [appengine-java] Query with inequality operators on a single property fails

2010-01-05 Thread Max Ross (Google)
Implicit parameters need to be prefixed with a ':'

query.setFilter(dueDate = :beginDateParam  dueDate = :endDateParam);

Max
On Tue, Jan 5, 2010 at 10:53 AM, dantuluri pdantul...@gmail.com wrote:

 Hi,

 I have the following query with inequality operators on a single
 property:

 query = pm.newQuery(File.class);
 query.setFilter(dueDate = beginDateParam  dueDate =
 endDateParam);
 ListFile storedFiles = (ListFile)query.executeWithArray(begin,
 end);

 Runtime is throwing this exception:
 java.lang.RuntimeException:
 org.datanucleus.store.appengine.query.DatastoreQuery
 $UnsupportedDatastoreFeatureException: Problem with query SELECT FROM
 Flow WHERE dueDate = beginDateParam  dueDate = endDateParam:
 Operator  =  cannot be used as part of the join condition.  Use
 'contains' if joining on a Collection field and equality if joining on
 a single-value field.

 AppEngine documentation clearly says it supports inequality operators
 on a single property. Following is the quote from the documentation:

 Inequality Filters Are Allowed On One Property Only
 A query may only use inequality filters (, =, =, , !=) on one
 property across all of its filters.
 For example, this query is allowed:
 select from Person where birthYear = minBirthYearParam
   birthYear = maxBirthYearParam

 Can anyone with App Engine experience please explain whats wrong with
 this query?

 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.comgoogle-appengine-java%2bunsubscr...@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: getting wrong presence status for XMPP users

2010-01-05 Thread Don Schwarz
Did you try calling XMPPService.getPresence(JID, JID) with your bot's JID as
the second argument?

On Sat, Jan 2, 2010 at 11:54 AM, Sahil Mahajan sahilm2...@gmail.com wrote:

 Hi

 I am facing same problem.
 Did you find any solution to this problem?
 getPresence is always returning false.

 On Dec 30 2009, 2:27 pm, Ankur stiitan...@gmail.com wrote:
  Hi,
 
  I have a very simple application where i sent a chat message to my
  application and check if user is available.But i am always getting as
  false.
 
  here is my code.
 
  XMPPServicexmpp= XMPPServiceFactory.getXMPPService();
  Message message =xmpp.parseMessage(req);
 
  JID fromJid = message.getFromJid();
 
  Presence p=xmpp.getPresence(fromJid);
  String status =p.isAvailable().toString();
 
  I am getting status as false always.
 
  I even tried with fromJid.getId() to get user status but i get the
  same result.
 
  i tried with gmail chat and gtalk both.I can see my bot in my contact
  lists with available sign.
 
  is there any way to get the correct status or am i missing anything
  here.

 --

 You received this message 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.comgoogle-appengine-java%2bunsubscr...@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] can use like in entitymanager?

2010-01-05 Thread asianCoolz
I did the below testing

Map map = new HashMap();
map.put(username, abc);
List result = service.search(select c from
com.company.testing.model.Usertest c where c.username  = :username,
map) ;
System.out.println(+result.size());  //return 0   ;  cannot
search by field?


Map map = new HashMap();
map.put(username, abc);
List result = service.search(select c from
com.company.testing.model.Usertest c where c.username
like :username, map) ;
System.out.println(+result.size());  //objectmanager closed ,
hang; cannot use like   ?


-- 
You received this message 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] 1 query per transaction

2010-01-05 Thread asianCoolz
my i know is it correct, for each @transaction, i should only do one
query (persist or load) ? if yes, then i will have to annotation
@tranaction at the dao layer rather than method in service layer
-- 
You received this message 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: getting wrong presence status for XMPP users

2010-01-05 Thread Ankur
I tried...but i faced the same issue for 2 days...but now my older
code is giving correct status...nothing changed in my code but it is
working fine now:)

On Jan 6, 5:21 am, Don Schwarz schwa...@google.com wrote:
 Did you try calling XMPPService.getPresence(JID, JID) with your bot's JID as
 the second argument?

 On Sat, Jan 2, 2010 at 11:54 AM, Sahil Mahajan sahilm2...@gmail.com wrote:
  Hi

  I am facing same problem.
  Did you find any solution to this problem?
  getPresence is always returning false.

  On Dec 30 2009, 2:27 pm, Ankur stiitan...@gmail.com wrote:
   Hi,

   I have a very simple application where i sent a chat message to my
   application and check if user is available.But i am always getting as
   false.

   here is my code.

           XMPPServicexmpp= XMPPServiceFactory.getXMPPService();
           Message message =xmpp.parseMessage(req);

           JID fromJid = message.getFromJid();

           Presence p=xmpp.getPresence(fromJid);
           String status =p.isAvailable().toString();

   I am getting status as false always.

   I even tried with fromJid.getId() to get user status but i get the
   same result.

   i tried with gmail chat and gtalk both.I can see my bot in my contact
   lists with available sign.

   is there any way to get the correct status or am i missing anything
   here.

  --

  You received this message 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.comgoogle-appengine-java%2bunsubscr...@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 code attempted to create a EntityManagerFactory named transactions-optional,

2010-01-05 Thread lp
hi there

i am attempting a very simple task of running a junit + spring
+...@persistencecontext but getting the following error

Caused by: java.lang.IllegalStateException: Application code attempted
to create a EntityManagerFactory named transactions-optional, but one
with this name already exists!  Instances of EntityManagerFactory are
extremely slow to create and it is usually not necessary to create one
with a given name more than once.  Instead, create a singleton and
share it throughout your code.  If you really do need to create a
duplicate EntityManagerFactory (such as for a unittest suite), set the
appengine.orm.disable.duplicate.emf.exception system property to avoid
this error.
at
org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.checkForRepeatedAllocation
(DatastoreEntityM


the junit class is simple

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { classpath:entitymanager-
context.xml })

public class PositionUserBusinessTest extends LocalStorageTestCase {

@PersistenceContext
EntityManager em;

@Autowired
PositionUserBusiness business;

 @test
 void something test()


entitymanager-context.xml

!-- entity manager --
bean id=entityManagerFactory

class=org.springframework.orm.jpa.LocalEntityManagerFactoryBean
lazy-init=true
property name=persistenceUnitName 
value=transactions-optional /

/bean

bean name=transactionManager
class=org.springframework.orm.jpa.JpaTransactionManager
property name=entityManagerFactory 
ref=entityManagerFactory /
/bean

bean id=positionUserBusiness
 
class=com.asteriski.mingle.geo.business.PositionUserBusiness/




i dont understand why it is complaining about the mulitple instances
of persistence unit called ' transactions-optional' as it is only
being referenced by the spring binding.

what is the problem?

any help most appreciated.

-lp
-- 
You received this message 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: Querying by Category class

2010-01-05 Thread Itzik Yatom
I have changed to
query.setFilter(tags.contains(' + aTagValue + '));
 and it still works!

It took me a while to get into this concept, that although it's a
filter clause it's written in java object style and not SQL style, I
mean:
NOT tags contains tagParam BUT  tags.contains(tagParam)   as you wrote

Thanks


On Jan 4, 12:58 pm, datanucleus andy_jeffer...@yahoo.com wrote:
  I have tried the simplest approach and it works:
  query.setFilter(tags == ' + aTagValue + ' );

 It may work, but is actually invalid JDOQL and you should always use
 valid JDOQL syntax like
 tags.contains(tagParam)
 and your current query would fail in future releases.
-- 
You received this message 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.