[google-appengine] jars in WEB-INF/lib for deployment

2010-11-10 Thread haole
i'm wondering which jars are required to be in the WEB-INF/lib
directory when i deploy. i have a bunch that were automatically added
when i created an appengine project in eclipse, but it seems like the
app should already have a lot of these jars in the production
classpath. am i supposed to add these to the project in some other way
than to just add them to the WEB-INF/lib directory?

here's what's in my WEB-INF/lib:

appengine-api-1.0-sdk-1.3.8.jar
appengine-api-labs-1.3.8.jar
appengine-jsr107cache-1.3.8.jar
datanucleus-appengine-1.0.7.final.jar
datanucleus-core-1.1.5.jar
datanucleus-jpa-1.1.5.jar
gdatacore10.jar
geronimo-jpa_3.0_spec-1.1.1.jar
geronimo-jta_1.1_spec-1.1.1.jar
gwt-servlet.jar
jdo2-api-2.3-eb.jar
jsr107cache-1.1.jar
mail.jar
recaptcha4j-0.0.7.jar

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



[appengine-java] Re: Class XXX has collection field x and this has no mapping in the table for the element class YYY owner field y

2010-09-20 Thread haole
i had the same issue pop up after making some modifications to
existing code that worked. turned out that one of the child classes
was being referenced as a child from two different parent classes.
this wasn't intended, it was just sloppy refactoring on my part.

for example: Knife child of Kitchen but also child of Drawer.

for each child class, search for all references to that class in your
project. the other way to do it is to comment out one child member in
the parent class at a time and recompile/retest. you can narrow down
the culprit that way, even if it doesn't end up being the same problem
that i had.

unfortunately, datanucleus exceptions are vague and sometimes even
misleading.

-- 
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] preferred method of deleting child objects (quota/fees)

2010-09-19 Thread haole
say i have a persistent parent class, Employee, with a collection of
child objects, PhoneNumber:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
class Employee implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Long id;

@Persistent(mappedBy = employee)
ListPhoneNumber phoneNumbers;
}

@PersistenceCapable(identityType = IdentityType.APPLICATION)
class PhoneNumber implements Serializable
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Key key;

@Persistent(mappedBy = phoneNumbers)
Employee employee;

@Persistent
Integer phoneNumber;
}

when deleting all child objects (PhoneNumber), there are two possible
ways to do this:

(1) set the collection of child objects on the parent object to an
empty collection (or null):
static void deletePhoneNumbers( Long p_employeeId, PersistentManager
p_manager )
{
Employee l_employee = p_manager.getObjectById( Employee.class,
p_employeeId );
l_employee.phoneNumbers = new ArrayListPhoneNumber();
p_manager.makePersistent( l_employee );
}

or

(2) delete all child objects belonging to the parent object:
static void deletePhoneNumbers( Employee p_employee,
PersistenceManager p_manager )
{
Query l_query = p_manager.newQuery( PhoneNumber.class );
l_query.setFilter( employee == p_employee );
l_query.declareParameters( Employee p_employee );
l_query.deletePersistentAll( p_employee );
}

both ways seem to have the same effect. as one might expect, the
collection of child objects in the parent array are removed and the
child objects themselves are removed from the data store.

my question is:

as far as hits on the data store (and the quota/fees associated with
those hits) are concerned, which incurs a greater number of calls
against the datastore (and, subsequently, incurs more fees)?

when you look at what's happening in the low-level API, do both ways
of deleting child objects result in the same number of calls against
the data store or is one way less costly than the other?

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



[google-appengine] AES encryption available on GAE java VM?

2010-04-30 Thread haole
Are the AES libraries included in the stardard JDK available under the
GAE java VM?

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



[google-appengine] updating to new release of eclipse plugin causing datanucleus errors (again)

2010-03-22 Thread haole
after updating to the newest release (20100319) of the eclipse plugin
(on 3/22), datanucleus enhancer is throwing null pointer exceptions
again. last time, it was due to classpath that was too long. removing
some unneeded jars out of my WEB-INF/lib directory seemed to do the
trick. this time, i cannot figure out what the problem is. i even
tried renaming jars to shorter names to no avail. PLEASE either (1)
fix this, or (2) give some kind of more detailed error message so we
know what is causing this.

furthermore, i cannot figure out how to rollback the google eclipse
plugin to the previous version. is this possible? if so, how?

java.lang.NullPointerException
at
com.google.gdt.eclipse.core.ProcessUtilities.cleanupProcess(ProcessUtilities.java:
367)
at
com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:
271)
at
com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:
78)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

eclipse.buildId=M20100211-1343
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

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



[appengine-java] DataNucleus: java.lang.IllegalArgumentException: Invalid MTJ Project

2010-03-12 Thread haole
There have been numerous posts on the subject of a
NullPointerException popping up when the DataNucleus Enhancer runs. At
one point, I was able to make this problem go away, and now, it is
AGAIN preventing me from running my project.

I've seen about 5 different explanations for what's happening. While i
can't reproduce the conditions, i do know that i removed all
references to PersistenceCapable in my code and it got rid of the
problem the last time. Something else is causing the problem this
time.

Is this going to be fixed? Shouldn't there be more verbose exception
handling within the datanucleus enhancer or plugin as to why the
enhancer is failing?

Message in Eclipse error log:
An internal error occurred during: DataNucleus Enhancer

Stack trace:
java.lang.NullPointerException
at
com.google.gdt.eclipse.core.ProcessUtilities.cleanupProcess(ProcessUtilities.java:
367)
at
com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:
271)
at
com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:
82)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Session data:
eclipse.buildId=M20100211-1343
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

And the entries from workspace/.metadata/log:
!SESSION 2010-03-10 06:29:11.124
---
eclipse.buildId=M20100211-1343
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

This is a continuation of log file C:\Users\Joe\workspace\.metadata
\.bak_0.log
Created Time: 2010-03-10 08:56:31.234

!ENTRY org.eclipse.mtj.core 4 0 2010-03-10 08:56:31.234
!MESSAGE Invalid MTJ Project.
!STACK 0
java.lang.IllegalArgumentException: Invalid MTJ Project.
at
org.eclipse.mtj.internal.core.build.MTJBuildProperties.init(Unknown
Source)
at
org.eclipse.mtj.internal.core.build.MTJBuildProperties.getBuildProperties(Unknown
Source)
at
org.eclipse.mtj.internal.core.util.MTJBuildPropertiesResourceListener.updateBuildProperties(Unknown
Source)
at
org.eclipse.mtj.internal.core.util.MTJBuildPropertiesResourceListener.resourceChanged(Unknown
Source)
at org.eclipse.core.internal.events.NotificationManager
$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:
285)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:
149)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:
313)
at
org.eclipse.core.internal.resources.Workspace.checkpoint(Workspace.java:
367)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation
$1.run(PerformChangeOperation.java:265)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1800)
at
org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:
308)
at
org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:
92)
at
org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:
220)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1800)
at
org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:
87)
at org.eclipse.jface.operation.ModalContext
$ModalContextThread.run(ModalContext.java:121)

!ENTRY org.eclipse.mtj.core 4 0 2010-03-10 09:02:39.870
!MESSAGE Invalid MTJ Project.
!STACK 0
java.lang.IllegalArgumentException: Invalid MTJ Project.
at
org.eclipse.mtj.internal.core.build.MTJBuildProperties.init(Unknown
Source)
at
org.eclipse.mtj.internal.core.build.MTJBuildProperties.getBuildProperties(Unknown
Source)
at
org.eclipse.mtj.internal.core.util.MTJBuildPropertiesResourceListener.updateBuildProperties(Unknown
Source)
at
org.eclipse.mtj.internal.core.util.MTJBuildPropertiesResourceListener.resourceChanged(Unknown
Source)
at org.eclipse.core.internal.events.NotificationManager
$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:
285)
at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:
149)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:
313)
  

[appengine-java] Re: DataNucleus: java.lang.IllegalArgumentException: Invalid MTJ Project

2010-03-12 Thread haole
removing all of the jars from my user-defined library for gdata and
including only those that i need (core, client, calendar) seemed to
fix the problem.

i remember reading somewhere about how long classpaths can cause this
problem.

is this going to be fixed? is the complexity of my app going to be
limited by a limit on how long classpaths can be?!

-- 
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 enhancer keeps running

2010-02-25 Thread haole
i'm using eclipse 3.5.1, GPE 3.5 (1.2.0.v200912062003), GAE
1.3.1.v201002101412, GWT 2.0.3.v201002191036
datanucleusenhancer continuously runs over and over again
temporary workaround: turn off build automatically feature in eclipse

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