problematic results after Elastic Search upgrade - json

I've updated my Elastic Search from 0.19.4 to 0.20.6 and I'm not getting the desired results.. I'm doing a dynamic search after key presses and the code that was working fine before acts different now.
The Search:
'' = (empty field) fine
a = 9400 hits
ab = 126 hits ERROR
abc = 2 hits ERROR
abcd 0 hits fine
Dependencies I've changed:
runtime 'org.elasticsearch:elasticsearch-lang-groovy:1.1.0' --> runtime 'org.elasticsearch:elasticsearch-lang-groovy:1.3.0'
runtime 'org.elasticsearch:elasticsearch:0.19.4' --> runtime 'org.elasticsearch:elasticsearch:0.20.6'
runtime 'org.xerial.snappy:snappy-java:1.0.4.1' (new)
Stack:
2013-04-09 10:47:58,130 [http-bio-8080-exec-2] DEBUG xxxx.SearchController - result stuff is: [hits:org.elasticsearch.search.internal.InternalSearchHits#9b0d61b]
2013-04-09 10:47:58,137 [http-bio-8080-exec-2] ERROR xxxx.SearchController - Problem...
org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class org.elasticsearch.search.internal.InternalSearchHit
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.convertAnother(JSON.java:162)
at grails.converters.JSON.value(JSON.java:199)
at grails.converters.JSON.render(JSON.java:134)
at grails.converters.JSON.render(JSON.java:150)
at xxx.xxxx.xxxx.SearchController.autocomplete(SearchController.groovy:514)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
... 13 more
Caused by: java.lang.NullPointerException
at org.elasticsearch.common.compress.lzf.LZFCompressor.isCompressed(LZFCompressor.java:76)
at org.elasticsearch.common.compress.CompressorFactory.compressor(CompressorFactory.java:124)
at org.elasticsearch.common.compress.CompressorFactory.uncompressIfNeeded(CompressorFactory.java:174)
at org.elasticsearch.search.internal.InternalSearchHit.sourceRef(InternalSearchHit.java:172)
at org.elasticsearch.search.internal.InternalSearchHit.getSourceRef(InternalSearchHit.java:181)
... 13 more
Where the code fails:
try {
log.debug("result stuff is: ${results}");
render results as JSON
}
catch ( Exception e ) {
log.error("Problem...",e);
}

This was due to a slight change in ES structure, had to rewrite my conversion method :)

Related

Javascript error when executed under idm environment

I got very wired problem. Scripts work all fine but when I ran this under ForgeRock idm it get error. I am not sure what that error is.
100] Jun 14, 2020 5:18:24.214 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
WARNING: Resource exception: 500 Internal Server Error: "onCreate script encountered exception"
org.forgerock.json.resource.InternalServerErrorException: onCreate script encountered exception
at org.forgerock.openidm.managed.ManagedObjectSet.lambda$execScript$3(ManagedObjectSet.java:517)
at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:51)
at org.forgerock.openidm.metrics.MetricsCollector.time(MetricsCollector.java:68)
at org.forgerock.openidm.managed.ManagedObjectSet.execScript(ManagedObjectSet.java:495)
at org.forgerock.openidm.managed.ManagedObjectSet.execScriptHook(ManagedObjectSet.java:474)
at org.forgerock.openidm.managed.ManagedObjectSet.createInstance(ManagedObjectSet.java:959)
at org.forgerock.json.resource.InterfaceCollectionHandler.handleCreate(InterfaceCollectionHandler.java:35)
at org.forgerock.json.resource.Router.handleCreate(Router.java:265)
at org.forgerock.openidm.managed.ManagedObjectService$ManagedObjectSetRequestHandler.handleCreate(ManagedObjectService.java:259)
at org.forgerock.json.resource.FilterChain$Cursor.handleCreate(FilterChain.java:65)
Caused by: javax.script.ScriptException: TypeError: Cannot call method "replace" of undefined
at org.forgerock.openidm.script.javascript.RhinoScriptEngine$3.newScriptException(RhinoScriptEngine.java:499)
at org.forgerock.openidm.script.javascript.RhinoScript.eval(RhinoScript.java:261)
at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.forgerock.openidm.script.registry.ScriptRegistryImpl$LibraryRecord.invoke(ScriptRegistryImpl.java:539)
at com.sun.proxy.$Proxy55.eval(Unknown Source)
at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:814)
at org.forgerock.openidm.script.registry.ScriptRegistryImpl$ScriptImpl.eval(ScriptRegistryImpl.java:825)
at org.forgerock.openidm.managed.ManagedObjectSet.lambda$execScript$3(ManagedObjectSet.java:509)
... 150 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "replace" of undefined (file:/opt/openidm/script/generateSamAccountName.js#24)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3693)
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3712)
at org.mozilla.javascript.ScriptRuntime.undefCallError(ScriptRuntime.java:3731)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2258)
at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2251)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41._c_replaceString_4(file:/opt/openidm/script/generateSamAccountName.js:24)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41.call(file:/opt/openidm/script/generateSamAccountName.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41._c_generateSamAccountName_5(file:/opt/openidm/script/generateSamAccountName.js:39)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41.call(file:/opt/openidm/script/generateSamAccountName.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41._c_anonymous_1(file:/opt/openidm/script/generateSamAccountName.js:6)
at org.mozilla.javascript.gen.file__opt_openidm_script_generateSamAccountName_js_41.call(file:/opt/openidm/script/generateSamAccountName.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen._1E59BF9390C34C7ACCB99E616798559AD7DDD85B_15._c_script_0(1E59BF9390C34C7ACCB99E616798559AD7DDD85B:2)
at org.mozilla.javascript.gen._1E59BF9390C34C7ACCB99E616798559AD7DDD85B_15.call(1E59BF9390C34C7ACCB99E616798559AD7DDD85B)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen._1E59BF9390C34C7ACCB99E616798559AD7DDD85B_15.call(1E59BF9390C34C7ACCB99E616798559AD7DDD85B)
at org.mozilla.javascript.gen._1E59BF9390C34C7ACCB99E616798559AD7DDD85B_15.exec(1E59BF9390C34C7ACCB99E616798559AD7DDD85B)
at org.forgerock.openidm.script.javascript.RhinoScript.eval(RhinoScript.java:231)
Does any one know why I am not able to run this ?
function replaceString(string) {
string = string.replace("รถ", "oe");
return string;
}

Datomic datalog: ArrayIndexOutOfBounds Exception when using aggregates

Given that db is a database value, the following query throws an exception:
(d/q
'[:find ?concert (count-distinct ?demand)
:in $ ?campaignId
:with ?concert
:where
[?c :campaign/id ?campaignId]
[?concert :crowd-concert/campaign ?c]
[?demand :demand/concert ?concert]
]
db "546b7e0f2348f10200abf5ea")
(The information model is that there are several concerts belonging to a campaign, and demands that , and we want to fetch the concert fields and the number of demands for each concert).
The stacktrace is here:
java.lang.Exception: processing rule: (q__25764 ?concert ?demand ?concert), message: processing clause: [?demand :demand/concert ?concert], message: java.lang.ArrayIndexOutOfBoundsException: 2
at datomic.datalog$eval_rule$fn__6161.invoke(datalog.clj:1441)
at datomic.datalog$eval_rule.invoke(datalog.clj:1421)
at datomic.datalog$eval_query.invoke(datalog.clj:1464)
at datomic.datalog$qsqr.invoke(datalog.clj:1553)
at datomic.datalog$qsqr.invoke(datalog.clj:1510)
at datomic.query$q.invoke(query.clj:674)
at datomic.api$q.doInvoke(api.clj:35)
at clojure.lang.RestFn.invoke(RestFn.java:439)
at bs.routes.campaigns$eval25762.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6782)
at clojure.lang.Compiler.eval(Compiler.java:6745)
at clojure.core$eval.invoke(core.clj:3081)
at clojure.main$repl$read_eval_print__7099$fn__7102.invoke(main.clj:240)
at clojure.main$repl$read_eval_print__7099.invoke(main.clj:240)
at clojure.main$repl$fn__7108.invoke(main.clj:258)
at clojure.main$repl.doInvoke(main.clj:258)
at clojure.lang.RestFn.invoke(RestFn.java:1523)
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1025.invoke(interruptible_eval.clj:53)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:51)
at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1067$fn__1070.invoke(interruptible_eval.clj:183)
at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1060.invoke(interruptible_eval.clj:152)
at clojure.lang.AFn.run(AFn.java:22)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: processing clause: [?demand :demand/concert ?concert], message: java.lang.ArrayIndexOutOfBoundsException: 2
at datomic.datalog$eval_clause$fn__6135.invoke(datalog.clj:1387)
at datomic.datalog$eval_clause.invoke(datalog.clj:1350)
at datomic.datalog$eval_rule$fn__6161.invoke(datalog.clj:1436)
... 29 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 2
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at clojure.core$deref_future.invoke(core.clj:2186)
at clojure.core$deref.invoke(core.clj:2207)
at clojure.core$mapv$fn__6727.invoke(core.clj:6616)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:333)
at clojure.core$reduce.invoke(core.clj:6518)
at clojure.core$mapv.invoke(core.clj:6616)
at datomic.datalog$fn__5678.invoke(datalog.clj:588)
at datomic.datalog$fn__5536$G__5508__5551.invoke(datalog.clj:51)
at datomic.datalog$join_project_coll.invoke(datalog.clj:116)
at datomic.datalog$fn__5607.invoke(datalog.clj:219)
at datomic.datalog$fn__5515$G__5510__5530.invoke(datalog.clj:51)
at datomic.datalog$eval_clause$fn__6135.invoke(datalog.clj:1356)
... 31 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at clojure.lang.RT.aset(RT.java:2326)
at datomic.datalog$fn__5678$project__5749.invoke(datalog.clj:480)
at datomic.datalog$fn__5678$join__5767.invoke(datalog.clj:578)
at datomic.datalog$fn__5678$fn__5772$fn__5773.invoke(datalog.clj:588)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invoke(core.clj:630)
at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:634)
at clojure.core$bound_fn_STAR_$fn__4439.doInvoke(core.clj:1890)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
Am I doing something wrong ?
Removing the :with clause solved the problem.
I don't know Datalog enough to know why exactly, but I assume that's because there's some redundancy in ?concert being in both :find and :with clauses.

graphhopper GHRequest not fetching

I have a problem with this code:
GraphHopperAPI gh = new GraphHopperWeb();
gh.load("http://localhost:8989/api/route");
GHResponse ph = gh.route(new GHRequest(45.104546,7.69043,45.104546,7.69043));
It gives me this error:
2014-03-29 09:33:00,036 [main] INFO graphhopper.http.GraphHopperWeb - Full request took:0.037406, API took:0.0
Exception in thread "main" java.lang.RuntimeException: Problem while fetching path 45.104546, 7.69043->45.104546, 7.69043
at com.graphhopper.http.GraphHopperWeb.route(GraphHopperWeb.java:119)
at provaMain.main(provaMain.java:23)
Caused by: org.json.JSONException: A JSONObject text must begin with '{' at character 0
at org.json.JSONTokener.syntaxError(JSONTokener.java:410)
at org.json.JSONObject.<init>(JSONObject.java:179)
at org.json.JSONObject.<init>(JSONObject.java:402)
at com.graphhopper.http.GraphHopperWeb.route(GraphHopperWeb.java:95)
... 1 more
The documentation currently undergoes a change (moving it from wiki to source). Where did you find that snippet? Please try gh.load("http://localhost:8989/"); for the latest branch and gh.load("http://localhost:8989/api"); before.

AppEngine + DataNucleus RDBMS + JPA 2 project throws exception when using #OneToMany annotation

Entity classes were created in Eclipse using the JPA wizard from an existing MySQL database, but had to remove the #OneToMany annotations because these errors pop up during enhancement (using DataNucleus Enhancer version 3.1.1).
java.lang.RuntimeException: Unexpected exception
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:76)
at com.google.appengine.tools.enhancer.Enhance.<init>(Enhance.java:71)
at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:51)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.appengine.tools.enhancer.Enhancer.execute(Enhancer.java:74)
... 2 more
Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch target 40
Exception Details:
Location:
cultivartehidroponia/Order.getOrderItems()Ljava/util/List; #4: ifnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2ab4 004a c600 242a b400 4a2a 07b9 006f
0000010: 0300 9a00 162a b400 4a2a 072a b601 0db9
0000020: 0098 0400 c001 0fb0 2ab6 0056 9900 2e2a
0000030: b400 5a05 32c0 005c 07b6 0079 9a00 1e2a
0000040: b400 5a06 32c0 005c 07b6 0079 9a00 0ebb
0000050: 007b 5913 0111 b700 80bf 2ab6 010d b0
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getDeclaredMethods(Class.java:1855)
at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getJavaBeanAccessorAnnotationsForClass(AbstractAnnotationReader.java:310)
at org.datanucleus.metadata.annotations.AbstractAnnotationReader.getMetaDataForClass(AbstractAnnotationReader.java:146)
at org.datanucleus.metadata.annotations.AnnotationManagerImpl.getMetaDataForClass(AnnotationManagerImpl.java:171)
at org.datanucleus.metadata.MetaDataManager.loadAnnotationsForClass(MetaDataManager.java:2650)
at org.datanucleus.metadata.MetaDataManager.loadClasses(MetaDataManager.java:496)
at org.datanucleus.enhancer.DataNucleusEnhancer.getFileMetadataForInput(DataNucleusEnhancer.java:734)
at org.datanucleus.enhancer.DataNucleusEnhancer.enhance(DataNucleusEnhancer.java:525)
at org.datanucleus.enhancer.DataNucleusEnhancer.main(DataNucleusEnhancer.java:1258)
... 7 more
I can use the entities fine, just without the mapped-by fields.
To bypass this issue, I had to temporarily implement this functionality using transient fields, such as:
#Transient private List<ViewProduct> products;
and simulate the #OneToMany feature manually as:
public List<ViewProduct> getProducts() {
EntityManager em = EMF.get().createEntityManager();
EntityTransaction trans = em.getTransaction();
try {
trans.begin();
this.products = em.createNamedQuery("ViewProduct.findByProductTemplate", ViewProduct.class).setParameter("prodTemplateId", this.getProdTemplateId()).getResultList();
trans.commit();
}...
But this defeats the purpose of having that nice feature... ;(
Maybe a configuration issue? But why does everything else work and not this?
Anyone out there with similar errors? Any recommendations?
Thanks in advance!!!
DataNucleus v3.1 is not supported/developed, and hasn't been for some time. You should use v3.2+, which has at least one fix to JDK 1.7 enhancement.
If you are using Eclipse and Google plug-in, you may need to upgrade the IDE. I was using Indigo with 1.9.4 and I have similar issues with the enhancer. Problem is gone after I switched to Kepler with the associated Google plug-in, etc.

play framework 1.2.5 exception occurred while running Bootstrap loading

environment: play-1.2.5
I need to put datas to the database while starting the play framework application, so I let it be done in the Bootstrap.java.
Basically, I'm just calling a Model and new an instance for it and storing data to the database repeatedly. Like below.
{
MagazineType magazineType = new MagazineType();
magazineType.abbreviation = "XX";
magazineType.save();
{
{
MagazineTypeFirstCat magazineTypeFirstCat = new MagazineTypeFirstCat();
magazineTypeFirstCat.name = "XX_First";
magazineTypeFirstCat.magazineType = magazineType;
magazineTypeFirstCat.save();
{
{
MagazineTypeSecondCat magazineTypeSecondCat = new MgazineTypeSecondCat();
magazineTypeSecondCat.name = "XX_Second_1";
magazineTypeSecondCat.magazineTypeFirstCat = magazineTypeFirstCat;
magazineTypeSecondCat.save();
}
{
MagazineTypeSecondCat magazineTypeSecondCat = new MgazineTypeSecondCat();
magazineTypeSecondCat.name = "XX_Second_2";
magazineTypeSecondCat.magazineTypeFirstCat = magazineTypeFirstCat;
magazineTypeSecondCat.save();
}
}
}
}
}
But the data is quite large, so the length of the code in Bootstrap.java is over 5000 lines.
When the length of code is under 3000 lines, the flamework will be started just fine, but exceptions occurred if the code length exceeds 3000 lines.
Below is the log for the exception, any suggestion will be appreciated. Thanks in advance.
14:42:20,855 WARN ~ You're running Play! in DEV mode
14:42:21,023 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...
14:42:35,275 ERROR ~
#6edp5mkl9
Internal Server Error (500) for request GET /
Oops: UnexpectedException
An unexpected error occured caused by exception UnexpectedException: While applying class
play.classloading.enhancers.PropertiesEnhancer on Bootstrap
play.exceptions.UnexpectedException: While applying play.CorePlugin#1f0b7d3 on Bootstrap
at play.plugins.PluginCollection.enhance(PluginCollection.java:454)
at play.classloading.ApplicationClasses$ApplicationClass.enhance
(ApplicationClasses.java:208)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:157)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:417)
at play.classloading.ApplicationClassloader.getAssignableClasses(ApplicationClassloader.java:441)
at {module:crud}/app/views/tags/crud/types.tag.(line:3)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:374)
at {module:crud}/conf/routes.(line:4)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
at play.templates.Template.render(Template.java:26)
at play.templates.GroovyTemplate.render(GroovyTemplate.java:184)
at play.mvc.Router.parse(Router.java:162)
at play.mvc.Router.parse(Router.java:190)
at play.mvc.Router.parse(Router.java:164)
at play.mvc.Router.load(Router.java:50)
at play.mvc.Router.detectChanges(Router.java:219)
at Invocation.HTTP Request(Play!)
Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.PropertiesEnhancer on Bootstrap
at play.CorePlugin.enhance(CorePlugin.java:296)
at play.plugins.PluginCollection.enhance(PluginCollection.java:451)
at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:208)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:157)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:417)
at play.classloading.ApplicationClassloader.getAssignableClasses(ApplicationClassloader.java:441)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
at Template_1001$_run_closure1.doCall(types.tag:6)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
at Template_1001$_run_closure1.doCall(types.tag)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:273)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at groovy.lang.Closure.call(Closure.java:282)
at groovy.lang.Closure.call(Closure.java:277)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:99)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$300(GroovyCategorySupport.java:61)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:239)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:333)
at org.codehaus.groovy.runtime.dgm$717.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:307)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
at Template_1001.run(types.tag:2)
at play.templates.GroovyTemplate.internalRender(GroovyTemplate.java:229)
at play.templates.GroovyTemplate$ExecutableTemplate.invokeTag(GroovyTemplate.java:374)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:362)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:161)
at Template_1000$_run_closure1.doCall(routes:41)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
at Template_1000$_run_closure1.doCall(routes)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at groovy.lang.Closure.call(Closure.java:282)
at groovy.lang.Closure.call(Closure.java:277)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:99)
at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$300(GroovyCategorySupport.java:61)
at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:239)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:333)
at org.codehaus.groovy.runtime.dgm$717.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:307)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:51)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
at Template_1000.run(routes:2)
... 9 more
Caused by: javassist.CannotCompileException: invalid opcode address
at javassist.expr.ExprEditor.doit(ExprEditor.java:116)
at javassist.CtBehavior.instrument(CtBehavior.java:618)
at play.classloading.enhancers.PropertiesEnhancer.enhanceThisClass(PropertiesEnhancer.java:130)
at play.CorePlugin.enhance(CorePlugin.java:293)
... 83 more
Caused by: javassist.bytecode.BadBytecode: invalid opcode address
at javassist.bytecode.CodeIterator.nextOpcode(CodeIterator.java:586)
at javassist.bytecode.CodeIterator.next(CodeIterator.java:157)
at javassist.bytecode.stackmap.Liveness.analyze(Liveness.java:237)
at javassist.bytecode.stackmap.Liveness.computeUsage(Liveness.java:216)
at javassist.bytecode.stackmap.Liveness.compute(Liveness.java:38)
at javassist.bytecode.stackmap.TypedBlock.makeBlocks(TypedBlock.java:54)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:91)
at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:404)
at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:389)
at javassist.expr.ExprEditor.doit(ExprEditor.java:112)
... 86 more
Java class size is limited to 64 kb so your class might be too big.
For such a use case I prefer to put all thi initialization in a sql file and use an sql load script in the bootstrap, it scales better.