[appengine-java] Query for a Long id using getObjectById JDO

2010-11-03 Thread giannisdag
Hi all,
I am a bit confused about how to retrieve an object using JDO. I am
using GWT, and I am trying the new approach GWT 2.1 using DTO objects
with request factory, which needs the entity objects to have their keys
stored as Long. But as I read the documentation about keys, I have the
following question.
I want to retrieve an object, specifically a user, by searching him
with his username. Before, using keys, I searched him using the
getObjectById call. But now, when I have a Long id, what should I do?
1. Using a query, and have as a parameter the username
2. Using the getObjectById.
The first is known, but is there an option to use the second, and pass
as a parameter again the username as I do with KeyFactory.
Because in documentation it says:

If the class uses a key field that is an unencoded string ID (String)
or numeric ID (Long), getObjectByID() can take the simple value as the
key parameter:

Employee e =
pm.getObjectById(Employee.class, alfred.sm...@example.com);
But what it means as a parameter in the Long situation, it needs the id
number?



-- 
You received this message 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] Simulating 500 error code

2010-11-03 Thread Ice13ill
Is it possible in App engine Java to simulate on development mode (or
production mode) the 500 internal server error ?

-- 
You received this message 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: 1.3.8 Console Logging Issue

2010-11-03 Thread Ice13ill
I also have this problem. In addition, it seams that the new 1.3.8
version does not recognize the 1.3.7 local_db.bin development mode
datastore (if i switch back it's ok)

On Nov 3, 4:38 am, timzon jerome.bre...@gmail.com wrote:
 Dropping default log level (.level) to TRACE, INFO or FINEST doesn't
 fix the problem.

 log.info (with default INFO level) used to work before 1.3.8 upgrade
 and doesn't work after the upgrade.

 On Oct 29, 2:49 pm, Rajeev Dayal rda...@google.com wrote:

  Drop you launch configuration's log level down to TRACE. Do you see the
  messages now?

  On Fri, Oct 29, 2010 at 1:23 PM, John Bito 
  j...@bobberinteractive.comwrote:

   Starred the issue:
  http://code.google.com/p/googleappengine/issues/detail?id=3969

    --
   You received this message 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%2B
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] Unable to start Dev Server : Failed startup of context com.google.apphosting.utils.jetty.DevAppEngineWebAppContext

2010-11-03 Thread Blaise Gervais
Hi everyone,
Since one day I'm unable to start my app. She was running in Dev mode
with Eclipse plugin. But this morning, I got the following error who
start Jetty but give me only HTTP ERROR: 503 pages. I have just added
a jar and four classes but now, I have removed the jar and classes but
the error stay.
ATTENTION: Failed startup of context
com.google.apphosting.utils.jetty.devappenginewebappcont...@19f9d2{/,D:\MyApps\appenginetest\war}
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
at
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)

-- 
You received this message 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] JPA transaction not active in Spring unit test

2010-11-03 Thread lp
hi all,

i am attempting to unit test my JPA code in a Spring unit test.

i read all the doco about gae unit tests.

i have this working in normal hibernate JPA with a specific tx
manager.

I cant see how the txManager is wired up.

however i get the following error

javax.persistence.TransactionRequiredException: This operation
requires a transaction yet it is not active
at
org.datanucleus.jpa.EntityManagerImpl.assertIsActive(EntityManagerImpl.java:
846)
at org.datanucleus.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:
545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator
$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:
365)
at $Proxy29.flush(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)


the test is simple enuff

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { classpath:WEB-INF/entitymanager-
context.xml, classpath:WEB-INF/applicationContext.xml  })
@TestExecutionListeners( { DependencyInjectionTestExecutionListener.class })
@TransactionConfiguration( defaultRollback=false,
transactionManager=transactionManager)
@Transactional
public abstract class MyTestCase  {

 private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new
LocalDatastoreServiceTestConfig());

@PersistenceContext
protected
EntityManager em;

@Test
public void findFriendsSimple() {



PositionUser user1 = new PositionUser();
user1.setFirstName(john);
user1.setLastName(smith);
user1.setGeohash(Geohash.encode(lat+=0.0001, lon));

em.persist(user1);
em.flush(); - throws here

 PositionUser find = em.find(PositionUser.class,
user1.getKey());
 assertEquals( john, find.getFirstName());
 assertEquals( 2, find.getFriends().size() );

 System.out.println(--running query now);
 Query query = em.createNamedQuery(PositionUser.FIND_FRIENDS);
 query.setParameter(userKey, user1.getKey());
 List resultList = query.getResultList();
 assertEquals( 2, resultList.size() );


}

-- 
You received this message 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] AppWrench 1.3 released. Data store Refactorings, Improved Import/Export wizards, full JDO/JPA support

2010-11-03 Thread kor
OnPositive Technologies is happy to announce final release of
AppWrench  1.3, the first collection of powerful productivity tools
created  specifically for Google App Engine.

AppWrench 1.3 introduces following majour improvement and features :

 * Powerfull Data store refactorings - allows to few click automation
of most frequent batch operations with data store
 * Improved Import/Export wizards allows to import and export data in
a few clicks
 * Improved JPA/JDO support, relation and blob visualization as well
as other enchancements in our data store viewer functionality.
 * Multiple bug fixes and improvements in our AppEngine Profiler and
Java Console tools.

(Full change list is accessible at http://appwrench.onpositive.com/changes.page)

The suite integrates into Eclipse 3.5+ and runs with the local App
Engine development server for free. 7-day trial licenses are
available
to test the suite with the production servers. Requires App Engine SDK
1.2.6+.

Learn more about AppWrench at http://appwrench.onpositive.com

We are highly devoted to develop this product in a way the community
wants, so please share your experience, ideas and suggestions on
http://appwrench.zendesk.com

Sincerely yours,
Pavel Petrochenko,
AppWrench development team.

-- 
You received this message 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: Simulating 500 error code

2010-11-03 Thread Peter Ondruska
def get(self)
self.error(500)

should work but never triwd myself

Ice13ill napsal(a):
 Is it possible in App engine Java to simulate on development mode (or
 production mode) the 500 internal server error ?

-- 
You received this message 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: Simulating 500 error code

2010-11-03 Thread Andrei Cosmin Fifiiţă
i dont think that is java...

On Wed, Nov 3, 2010 at 3:21 PM, Peter Ondruska peter.ondru...@gmail.comwrote:

 def get(self)
 self.error(500)

 should work but never triwd myself

 Ice13ill napsal(a):
  Is it possible in App engine Java to simulate on development mode (or
  production mode) the 500 internal server error ?

 --
 You received this message 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: 1.3.8 Console Logging Issue

2010-11-03 Thread Rajeev Dayal
No, I did not mean dropping it there - I meant changing it in the Web App
Launch Configuration UI - edit your launch configuration (in Eclipse), and
set the log level to TRACE. Does that help?

On Tue, Nov 2, 2010 at 10:38 PM, timzon jerome.bre...@gmail.com wrote:

 Dropping default log level (.level) to TRACE, INFO or FINEST doesn't
 fix the problem.

 log.info (with default INFO level) used to work before 1.3.8 upgrade
 and doesn't work after the upgrade.

 On Oct 29, 2:49 pm, Rajeev Dayal rda...@google.com wrote:
  Drop you launch configuration's log level down to TRACE. Do you see the
  messages now?
 
  On Fri, Oct 29, 2010 at 1:23 PM, John Bito j...@bobberinteractive.com
 wrote:
 
 
 
 
 
 
 
   Starred the issue:
  http://code.google.com/p/googleappengine/issues/detail?id=3969
 
--
   You received this message 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.comgoogle-appengine-java%2B
 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.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] simple joins with multiple conditions

2010-11-03 Thread hendrix.jason
This page shows how to do simple joins
http://gae-java-persistence.blogspot.com/2010/03/executing-simple-joins-across-owned.html

However, is there a way to join the same child element twice to check
for a child element that contains 2 specific items, like I'm trying to
do here but failing/returning 0 results?

javax.jdo.Query q5 = pm2.newQuery(select key from  +
Document.class.getName()
+  where 
+ DocumentSearchKeyValues.contains(dskv) 
dskv.DocumentSearchKey_Value == 'key 3 - sample value'
+   DocumentSearchKeyValues.contains(dskv2) 

dskv2.DocumentSearchKey_Value == 'test key 2 - sample value'
);
q5.declareVariables(DocumentSearchKeyValue.class.getName() +  
dskv;
 + DocumentSearchKeyValue.class.getName() +  dskv2);
ListKey q5_results = (ListKey) q5.execute();

-- 
You received this message 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] Class not found in Eclipse

2010-11-03 Thread Rajeev Dayal
Unfortunately, GPE does not handle the case of dependent projects correctly.
You can either manually jar up the classes from SimpleJavaProject, and drop
that JAR into your war/WEB-INF/lib folder for the Web Application Project,
or you can define the output folder for SimpleJavaProject to be equal to the
output path for your Web Applicaton Project.

On Tue, Oct 26, 2010 at 4:38 PM, tleroy cont...@arobass.com wrote:

 Hello everybody,

 I use the appengine eclipse plugin,  I have created a 'Web Application
 Project' and a 'Simple Java Project' linked to it. When I launch the
 Web Application Project, classes from the Simple project are not
 found. Where I have to configure the classpath? I tried in the
 '.lauch' file but it doesn't work.

 Could you help me?

 Merci.

 --
 You received this message 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] Cannot get JPA to work - Yes I'm bad

2010-11-03 Thread Patrick
So I'm trying to set up a REST server and I want to use JPA for
persistence.

But when I my app I get this error:

javax.persistence.PersistenceException: Provider error. Provider:
org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
at javax.persistence.Persistence.createFactory(Persistence.java:176)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
112)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
66)

Caused by: javax.jdo.JDOFatalUserException: No available StoreManager
found for the datastore URL key . Please make sure you have all
relevant plugins in the CLASSPATH (e.g datanucleus-rdbms?, datanucleus-
db4o?), and consider setting the persistence property
datanucleus.storeManagerType to the type of store you are using e.g
rdbms, db4o

I've checked and double checked the web-inf/lib and follow everything
I saw in : 
http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/usingjpa.html

Anyone know what probably cause this issue?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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] Unable to start Dev Server : Failed startup of context com.google.apphosting.utils.jetty.DevAppEngineWebAppContext

2010-11-03 Thread chander
HI

On Wed, Nov 3, 2010 at 5:11 PM, Blaise Gervais gervai...@gmail.com wrote:


 Hi everyone,
 Since one day I'm unable to start my app. She was running in Dev mode with
 Eclipse plugin. But this morning, I got the following error who start Jetty
 but give me only HTTP ERROR: 503 pages. I have just added a jar and four
 classes but now, I have removed the jar and classes but the error stay.


 ATTENTION: Failed startup of context
 com.google.apphosting.utils.jetty.devappenginewebappcont...@19f9d2
 {/,D:\MyApps\appenginetest\war}

 java.lang.NullPointerException

 at java.lang.Class.isAssignableFrom(Native Method)

 at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)

 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

 at
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)

 at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)

 at
 org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)

 at
 org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)

 at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)

 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

 at
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)

 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

 at
 org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)

 at org.mortbay.jetty.Server.doStart(Server.java:224)

 at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)

 at
 com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)

 at
 com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147)

 at
 com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)

 at
 com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)

 at
 com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)

 at
 com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)

 at
 com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)

  --
 You received this message 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.




-- 

Best Regards,

Chander Mohan

-- 
You received this message 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: Cannot get JPA to work - Yes I'm bad

2010-11-03 Thread Patrick
I'm using JDO now. Everythings ok

On Nov 3, 2:04 pm, Patrick luss...@gmail.com wrote:
 So I'm trying to set up a REST server and I want to use JPA for
 persistence.

 But when I my app I get this error:

 javax.persistence.PersistenceException: Provider error. Provider:
 org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
         at javax.persistence.Persistence.createFactory(Persistence.java:176)
         at
 javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
 112)
         at
 javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
 66)

 Caused by: javax.jdo.JDOFatalUserException: No available StoreManager
 found for the datastore URL key . Please make sure you have all
 relevant plugins in the CLASSPATH (e.g datanucleus-rdbms?, datanucleus-
 db4o?), and consider setting the persistence property
 datanucleus.storeManagerType to the type of store you are using e.g
 rdbms, db4o

 I've checked and double checked the web-inf/lib and follow everything
 I saw in 
 :http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/using...

 Anyone know what probably cause this issue?

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

2010-11-03 Thread Ikai Lan (Google)
You should be able to run the App Engine for Java SDK. That's the promise of
Java, right? Interoperability across platforms that can run the JVM?

--
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 Tue, Nov 2, 2010 at 10:56 AM, Nicholas nick.sm...@gmail.com wrote:

 I have a Mac Pro G5 PowerPC running Ubuntu Linux.  Can I run app
 engine java SDK and do development or is it only for x86 systems?

 --
 You received this message 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: Query for a Long id using getObjectById JDO

2010-11-03 Thread giannisdag
After doing some reading, I realized that in GAE datastore, an entity
is stored using the key value and a key name or ID. The key name has to
be a string and the ID is long. The key name can be created by the
application and can be created like this as an example:

Key key =
KeyFactory.createKey(Employee.class.getSimpleName(), 
alfred.sm...@example.com);

The ID can only be created by the datastore, so we have to leave it
with a null value.
Now, when we want to retrieve-fetch an object from datastore, we have
two different situations. First, if we had created
the entityid with key name, we can retrieve the object by recreating
the key with the above syntax and then search for
the object using
Employee e = pm.getObjectById(Employee.class, k);
But if we have used the numeric ID, we can' t look for it using the
KeyFactory, as usually humans don' t search an
object using numbers, but easily remembered strings. So we have to use
a query.
In my question, I have to use a query.
If I am somewhere wrong, please inform 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.



Re: [appengine-java] Google App Engine Java on Linux PowerPC

2010-11-03 Thread Nasif Noorudeen
you can run app engine on power PC



On Wed, Nov 3, 2010 at 11:30 PM, Ikai Lan (Google)
ikai.l+gro...@google.comikai.l%2bgro...@google.com
 wrote:

 You should be able to run the App Engine for Java SDK. That's the promise
 of Java, right? Interoperability across platforms that can run the JVM?

 --
 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 Tue, Nov 2, 2010 at 10:56 AM, Nicholas nick.sm...@gmail.com wrote:

 I have a Mac Pro G5 PowerPC running Ubuntu Linux.  Can I run app
 engine java SDK and do development or is it only for x86 systems?

 --
 You received this message 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.



Re: [appengine-java] Re: Query for a Long id using getObjectById JDO

2010-11-03 Thread Cyrille Vincey
Both following syntaxes are ok for JDO :
Key key1 = KeyFactory.createKey(YourClass.class.getSimpleName(), 12345L);
//using Long

Key key2 = KeyFactory.createKey(YourClass.class.getSimpleName(),
yourtextid); //using String


It's up to you to define how you want your entities to be recorded :
1. Either you let the datastore generate a key for you when recording a new
entity = its key will be based on a Long
2. Or you 'force' the key with your own stringID or your own longID


From:  giannisdag pascoua...@gmail.com
Reply-To:  google-appengine-java@googlegroups.com
Date:  Wed, 3 Nov 2010 11:24:10 -0700 (PDT)
To:  google-appengine-java@googlegroups.com
Subject:  [appengine-java] Re: Query for a Long id using getObjectById JDO

After doing some reading, I realized that in GAE datastore, an entity is
stored using the key value and a key name or ID. The key name has to be a
string and the ID is long. The key name can be created by the application
and can be created like this as an example:
Key key = KeyFactory.createKey(Employee.class.getSimpleName(),
alfred.sm...@example.com);

The ID can only be created by the datastore, so we have to leave it with a
null value.
Now, when we want to retrieve-fetch an object from datastore, we have two
different situations. First, if we had created
the entityid with key name, we can retrieve the object by recreating the key
with the above syntax and then search for
the object using 
 Employee e = pm.getObjectById(Employee.class, k);
But if we have used the numeric ID, we can' t look for it using the
KeyFactory, as usually humans don' t search an
object using numbers, but easily remembered strings. So we have to use a
query.
 In my question, I have to use a query.
If I am somewhere wrong, please inform 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.


-- 
You received this message 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: Cannot get JPA to work - Yes I'm bad

2010-11-03 Thread Didier Durand
Hi,
You could also give a try to Objectify if you're looking for something
much simpler than JPA/JDO although highly efficient.
regards
didier

On Nov 3, 5:57 pm, Patrick luss...@gmail.com wrote:
 I'm using JDO now. Everythings ok

 On Nov 3, 2:04 pm, Patrick luss...@gmail.com wrote:

  So I'm trying to set up a REST server and I want to use JPA for
  persistence.

  But when I my app I get this error:

  javax.persistence.PersistenceException: Provider error. Provider:
  org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider
          at javax.persistence.Persistence.createFactory(Persistence.java:176)
          at
  javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
  112)
          at
  javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:
  66)

  Caused by: javax.jdo.JDOFatalUserException: No available StoreManager
  found for the datastore URL key . Please make sure you have all
  relevant plugins in the CLASSPATH (e.g datanucleus-rdbms?, datanucleus-
  db4o?), and consider setting the persistence property
  datanucleus.storeManagerType to the type of store you are using e.g
  rdbms, db4o

  I've checked and double checked the web-inf/lib and follow everything
  I saw in 
  :http://code.google.com/intl/fr-FR/appengine/docs/java/datastore/using...

  Anyone know what probably cause this issue?

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

2010-11-03 Thread Ikai Lan (Google)
This behavior doesn't seem right. No, the entire blob should not be getting
read. We'll look into this.

Do you have any more details? Could tasks be getting retried?

--
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 Tue, Nov 2, 2010 at 9:42 AM, Cyrille Vincey crll...@gmail.com wrote:

 I've been testing Ikai's bulkload mapper (see url below) with a pretty big
 csv file (200 Mb).
 It works great, and I encourage most of you to consider implementing this
 for entity uploads.

 Yet, I do face one last issue with an unexpected quota : blobstore bytes
 read.
 This quota cannot be tuned via the billing settings, and it's not clear
 whether it limits the speed of my process or not when it's reached.


 See ? Yep, it's a lot of bytes read…
 Could someone confirm that the blob csv file is *NOT* fully fetched each
 time the mapper iterates on a new line ?

 (ikai's post)
 http://ikaisays.com/2010/08/11/using-the-app-engine-mapper-for-bulk-data-import
 /

  --
 You received this message 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.

Capture d¹écran 2010-11-02 à 17	.17.25.png

[appengine-java] Re: Fwd: BlobstoreService not compatible with HTML5 multiple file upload?

2010-11-03 Thread Dan Dubois
Sorry to keep this thread alive but does anyone know of a work around
for the HTML5 multi-file upload problem?

To summarise HTML5 allows you to upload multiple files at the same
time. Unfortunately on most browsers it gives all the files the same
name. Therefore the app engine api MapString, BlobKey blobs =
blobstoreService.getUploadedBlobs(req) only returns one blob key as
all the others get overwritten due to the unique keys constraint of
java.util.Map.

For example is it possible to determine which blobs were uploaded by
manually parsing the headers of HttpServletRequest? I wonder how
blobstoreService.getUploadedBlobs(req) does it? I had a look and
couldn't find anything obvious in the HttpServletRequest object that
would allow me to link back to the blobs that were uploaded.

I suppose I could add some nasty applet or flash upload tool to the
page but I would rather not do that.

Any ideas?

Best wishes,
Dan

On Oct 24, 6:03 am, Mike! michael.d.en...@gmail.com wrote:
 It's my #1 request too, but GAE doesn't support any multiple file
 upload...I'm guessing that it's not far off though since the blobstore
 interface returns a Map of blobs

 Mike!

 On Oct 23, 3:55 pm, Dan Dubois uvico...@gmail.com wrote:

  Has anyone figured out a way around this problem yet?

  Best wishes,
  Dan

  -- Forwarded message --
  From: Dan Dubois uvico...@gmail.com
  Date: Aug 12, 10:41 pm
  Subject: BlobstoreService not compatible withHTML5multiple file

  upload?
  To: Google App Engine for Java

  I see this issue has already been raised:http://code.google.com/p/
  googleappengine/issues/detail?id=3351

  On Aug 10, 1:12 pm, Dan Dubois uvico...@gmail.com wrote:

   It might be nice for blobstoreService.getUploadedBlobs(req) to return
   a com.google.common.collect.MultimapString, BlobKey but it is
   probably too late to change that method of the API.

   On Aug 10, 1:06 pm, Dan Dubois uvico...@gmail.com wrote:

Dear All,

I would like to upload multiple files to my Blobstore usingHTML5's
multiple file upload feature.

input type=file multiple name=myfiles 

However, on Safari at least, I imagine each file that is uploaded will
be attributed with the same name myfiles.

Therefore MapString, BlobKey blobs =
blobstoreService.getUploadedBlobs(req); does not work as Map keys must
be unique so only one Map.Entry will be in the Map as the others will
get overwritten.

I can see on my dev server that all my files are actually uploaded to
the Datastore.

Is there a way around this?

I guess either Safari hasn't implemented multiple ofHTML5properly
or the BlobstoreService API needs to be changed to cater for the new
   HTML5feature...

Best wishes,
Dan

-- 
You received this message 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] Install portal on Google App Engine

2010-11-03 Thread Robert Naczinski
Hi,

it is possible to install a portal like Liferay or Jetspeed on Google
App Engine? If so, can someone give me a link to a tutorial etc..

Greetings,

Robert

-- 
You received this message 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: 500 Errors on blobstore upload, perhaps related to oauth?

2010-11-03 Thread tempy
After investigating further, things get more confusing.  I guess the
oauth stuff in the upload URL is as it should be, since disabling
oauth in my app did not change the presence of the oauth stuff in the
upload URL.

After watching the exchange between my client and GAE app with
fiddler, I realized that the 500 that was being returned was coming
from my GAE code and not the blobservice, and it contained an
exception that my GAE app produces when the blobstore calls the on-
success URL that is supplied to the
blobstoreService.createUploadUrl().  The exception is caused by the
blobstoreService.getUploadedBlobs() call returning an empty map.
What's confusing me is that evidently the blobstore is failing for
some reason, and yet it is still calling the on-success URL within
my app.  Is this the expected behavior when a blobstore upload fails?
It would be great to get some sort of meaningful error from the
blobstore, instead of just having the failure passed on to my app in
the form of an empty map.

On Nov 2, 9:59 pm, tempy fay...@gmail.com wrote:
 Hello,
 I have yet to get the blobstore functioning correctly in my app.  My
 code works in development, but not in production.

 I use the built-in oauth support and have an installed app connecting
 to the GAE app.  The installed app requests an upload URL from an
 endpoint that is secured by oauth, and I was surprised to see that
 BlobStoreService.CreateUploadURL() produces a URL that has all the
 oauth stuff in it.  Here is the URL it produced:

 http://MYAPPo.appspot.com/_ah/upload/?oauth_token=1%2FTRaFrr7-6m5...

 When my installed app then tried to POST to this URL, it gets a 500.
 The Blobstore then proceeds to call my GAE app with the URL I supplied
 to CreateUploadURL(), and passes along all the parameters that the
 client app sent to the Blobstore, but (as expected) without a
 Blobstore key.  I don't see any blobs in the blob viewer.

 I wonder if the oauth code is somehow at fault here, but other than
 that I don't really know where to start diagnosing this.

 Thanks,
 Mike

-- 
You received this message 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: Fwd: BlobstoreService not compatible with HTML5 multiple file upload?

2010-11-03 Thread Didier Durand
Hi Dan,

Just an idea: can't you change the file names (via javascript) on the
browser before upload starts to make them all different ?

regards

didier

On Nov 3, 9:00 pm, Dan Dubois uvico...@gmail.com wrote:
 Sorry to keep this thread alive but does anyone know of a work around
 for the HTML5 multi-file upload problem?

 To summarise HTML5 allows you to upload multiple files at the same
 time. Unfortunately on most browsers it gives all the files the same
 name. Therefore the app engine api MapString, BlobKey blobs =
 blobstoreService.getUploadedBlobs(req) only returns one blob key as
 all the others get overwritten due to the unique keys constraint of
 java.util.Map.

 For example is it possible to determine which blobs were uploaded by
 manually parsing the headers of HttpServletRequest? I wonder how
 blobstoreService.getUploadedBlobs(req) does it? I had a look and
 couldn't find anything obvious in the HttpServletRequest object that
 would allow me to link back to the blobs that were uploaded.

 I suppose I could add some nasty applet or flash upload tool to the
 page but I would rather not do that.

 Any ideas?

 Best wishes,
 Dan

 On Oct 24, 6:03 am, Mike! michael.d.en...@gmail.com wrote:

  It's my #1 request too, but GAE doesn't support any multiple file
  upload...I'm guessing that it's not far off though since the blobstore
  interface returns a Map of blobs

  Mike!

  On Oct 23, 3:55 pm, Dan Dubois uvico...@gmail.com wrote:

   Has anyone figured out a way around this problem yet?

   Best wishes,
   Dan

   -- Forwarded message --
   From: Dan Dubois uvico...@gmail.com
   Date: Aug 12, 10:41 pm
   Subject: BlobstoreService not compatible withHTML5multiple file

   upload?
   To: Google App Engine for Java

   I see this issue has already been raised:http://code.google.com/p/
   googleappengine/issues/detail?id=3351

   On Aug 10, 1:12 pm, Dan Dubois uvico...@gmail.com wrote:

It might be nice for blobstoreService.getUploadedBlobs(req) to return
a com.google.common.collect.MultimapString, BlobKey but it is
probably too late to change that method of the API.

On Aug 10, 1:06 pm, Dan Dubois uvico...@gmail.com wrote:

 Dear All,

 I would like to upload multiple files to my Blobstore usingHTML5's
 multiple file upload feature.

 input type=file multiple name=myfiles 

 However, on Safari at least, I imagine each file that is uploaded will
 be attributed with the same name myfiles.

 Therefore MapString, BlobKey blobs =
 blobstoreService.getUploadedBlobs(req); does not work as Map keys must
 be unique so only one Map.Entry will be in the Map as the others will
 get overwritten.

 I can see on my dev server that all my files are actually uploaded to
 the Datastore.

 Is there a way around this?

 I guess either Safari hasn't implemented multiple ofHTML5properly
 or the BlobstoreService API needs to be changed to cater for the new
HTML5feature...

 Best wishes,
 Dan

-- 
You received this message 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.