error in java action when retrieving list of objects

0
Hi, we have a java action that keeps throwing the following error when it tries to retrieve a list of objects from a table. The table has been populated a few instances before and when we inspect the table afterwards the records are all there (18,000+), but the error seems to indicate that there's nothing in that table or I'm interpreting incorrectly this error. Help?! ############ the java call ############ List<imendixobject> jobs = Core.retrieveXPathQuery(context, "//PipsAndSubbies.MendixExtract"); ################ the error ################ java.util.concurrent.ExecutionException: la: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at PipsAndSubbies.job_readFile (JavaAction : 'Read file') Advanced stacktrace: at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at gy.a(SourceFile:95) at gy.execute(SourceFile:69) at iW.a(SourceFile:304) at com.mendix.externalinterface.connector.RequestDispatching$Worker.a(SourceFile:148) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.a(SourceFile:140) at com.mendix.externalinterface.connector.RequestDispatching$Worker$a.apply(SourceFile:138) at akka.actor.Actor$class.apply(Actor.scala:545) at com.mendix.externalinterface.connector.RequestDispatching$Worker.apply(SourceFile:134) at akka.actor.LocalActorRef.invoke(ActorRef.scala:910) at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25) at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:223) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:123) at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:195) at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:192) Caused by: la: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at PipsAndSubbies.job_readFile (JavaAction : 'Read file') Advanced stacktrace: at mg.a(SourceFile:188) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at com.mendix.core.Core.execute(SourceFile:225) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.core.CoreRuntimeException: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at hC.b(SourceFile:194) Caused by: com.mendix.core.CoreRuntimeException: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at hC.b(SourceFile:194) Caused by: n: An exception has occurred for the following request(s): fu (depth = 0): //PipsAndSubbies.MendixExtract at x.a(SourceFile:57) Caused by: java.lang.IllegalArgumentException: Entity id should be not zero at ih.a(SourceFile:1494) at ie.b(SourceFile:99) at ie.<init>(SourceFile:89) at com.mendix.core.Core.createMendixIdentifier(SourceFile:1906) at p.a(SourceFile:106) at r.a(SourceFile:77) at q.a(SourceFile) at aU.f(SourceFile:456) at dJ.a(SourceFile:119) at dA.a(SourceFile:89) at dE.a(SourceFile:68) at x.a(SourceFile:43) at h.a(SourceFile:269) at hu.b(SourceFile:126) at hu.a(SourceFile:67) at hq.a(SourceFile:61) at hq.executeAction(SourceFile:21) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hC.b(SourceFile:183) at com.mendix.core.Core.retrieveXPathQuery(SourceFile:1043) at com.mendix.core.Core.retrieveXPathQuery(SourceFile:1220) at pipsandsubbies.actions.JobImporter.startImport(JobImporter.java:111) at pipsandsubbies.actions.ImportJobs.executeAction(ImportJobs.java:59) at pipsandsubbies.actions.ImportJobs.executeAction(ImportJobs.java:1) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at hC.b(SourceFile:183) at com.mendix.core.Core.execute(SourceFile:219) at lh.a(SourceFile:69) at mg.a(SourceFile:73) at mf.executeAction(SourceFile:101) at com.mendix.systemwideinterfaces.core.UserAction.execute(SourceFile:57) at com.mendix.core.actionmanagement.CoreAction.call(SourceFile:457) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
asked
1 answers
0

After the query you are probably doing something with the data retrieved. From the error I see: " Entity id should be not zero...." So it might be that you have data in your database that does not have the entity id set for some reason and subsequent actions fail. Maybe try to find the records by looping over the List before doing something else and log the entity id's or print them to the console when running from eclipse can help you investigate the issue.

answered