Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:AppEngine 1.2.2 (Production) - Grails 1.1.1 - GORM-JPA 0.3
Description
Getting an exception when using GORM-JPA on AppEngine (not the development server but the actual appspot.com)
Uncaught exception from servlet
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: java.lang.StringBuilder.leftShift() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl) values: [(user.email = ?1 )]
Basically it looks like the StringBuilder in AppEngine doesn't like the leftShift operator, I was able to fix this in the JpAPluginSupport.groovy by changing line 152 to:
queryString.append("(${logicalName}.${first.field} ${expr})")
and line 163:
queryString.append("(${logicalName}.${second.field} ${expr})")
I am still getting the App ported over to GORM-JPA but this got it a little further.
Also after a long and brain dead day of staring aimlessly at the app after I started moving to GORM-JPA I finally worked out why all my findBy's returned nothing - I am still a little confused however it is now working after I changed line 185 of JpaPluginSupport.groovy:
query.setParameter(i, val)
Basically it looks like the parameter index starts at 0 not 1. I can't find anything in the release notes for DataNucleus that would explain the change - and it is probably worth validating.