[appengine-java] File path in App Engine

2010-01-06 Thread Ftaylor
Hello, I have recently started using App Engine for a project I am working on, and I have a simple question. I have a file in the war/WEB-INF directory of my app . When I try BufferedReader b = new BufferedReader(new FileReader(new File())); I get a FileNotFoundException. What path should I use

[appengine-java] Re: java.lang.NullPointerException cannot be cast to javax.servlet.ServletException

2010-01-07 Thread Ftaylor
This problem still exists. On Dec 16 2009, 9:42 pm, polyurethan wrote: > Hey there, > > I still get this ClassCastException. When will the JVM be fixed? > It's Dec and the issue was raised in Jul. Is there any progress? > > Thanks, > Alexander > > On Oct 22, 10:13 am, Marc Guillemot wrote: > > >

[appengine-java] Re: File path in App Engine

2010-01-07 Thread Ftaylor
Hello, I have tried this but I always get a java.security.AccessControlException: access denied (java.io.FilePermission /names.txt read) Anyone know how to resolve this? Thanks, Finbarr On Jan 7, 3:32 am, m seleron wrote: > Hi, > > It might be solved by this though is not a direct answer. > >

[appengine-java] Re: File path in App Engine

2010-01-07 Thread Ftaylor
I got it to work by just using a File. Didn't change anything, it just seemed to start working of its own accord. Finbarr On Jan 7, 10:46 am, Ftaylor wrote: > Hello, > > I have tried this but I always get a > java.security.AccessControlException: access denied > (ja

[appengine-java] Help with One to Many owned relationship and Datastore

2010-01-13 Thread Ftaylor
I have a class Page with a variable List images. @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Page { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private final List images; ... } My IMG class looks like this: @

[appengine-java] Need Help with One to Many relationships in Datastore

2010-01-13 Thread Ftaylor
I have a class Page with a variable List images. @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Page { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private final List images; ... } My IMG

[appengine-java] Unsupported method while parsing expression:

2010-01-28 Thread Ftaylor
Code: Class Page { List aliases; ... query = pm.newQuery(Page.class); query.setFilter(":aliases.contains(alias)"); query.declareVariables("String alias"); List results = (List)query.execute(alias); ... } I want to select Page objects where the aliases property con

[appengine-java] Re: Unsupported method while parsing expression:

2010-02-03 Thread Ftaylor
There actually seems to be a mistake in the documentation: > // Give me all Employees with lastName equal to Smith or Jones Query query = pm.newQuery(Employee.class, ":p.contains(lastName)"); query.execute(Arrays.asList("Smith", "Jones")); Surely it should be

[appengine-java] Re: Unsupported method while parsing expression:

2010-02-03 Thread Ftaylor
Wow that mistake in the documentation wasted days of my time. Thankyou datanucleus. On Feb 3, 5:40 pm, Ftaylor wrote: > There actually seems to be a mistake in the documentation: > > > // Give me all Employees with lastName equal to Smith or Jones > >     Query query = pm.newQu

[appengine-java] Batch load from DataStore?

2010-02-21 Thread Ftaylor
Is this the fastest way to load all of the Elements of a given type from the DataStore? @SuppressWarnings("unchecked") public static final List loadAllPagesFromDataStore() { List pages = new ArrayList(); PersistenceManager pm = PMF.get().getPersistenceManage