Interpreting Java's Post-Crash Call Stack - stack

I am new to Java and am having troubles interpreting the call stack below (from Crashlytics). I got some questions:
Can anybody tell me which method exactly raised ArrayIndexOutOfBoundsException() the exception?
To my confusion, both com.a.data.SystemParameters.getA() and com.a.data.SystemParameters.getC() are simple one-line getter methods, they return corresponding dictionaries. How can an exception "occur" there?
I never call getA() inside getC() nor vice versa. How can that be? What kind of call stack is this? It's not really a "stack", is it?
java.lang.RuntimeException: An error occured while executing
doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at com.a.data.SystemParameters.getA()
at com.a.data.SystemParameters.getC()
at com.a.data.SystemParameters.isOutOfDate()
at com.a.ui.activities.LoginActivity$SaveSystemParametersTask.doInBackground()
at com.a.ui.activities.LoginActivity$SaveSystemParametersTask.doInBackground()
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Related

Stitching - ImageJ

Hello Stackoverflow community,
I have been using the stitching algorithms several times in the past with no issues. But right now, I always get error messages in the console - even if there is nothing wrong in the log. Then, the fused image is not displayed. I tried with different image types, or different stitching methods, but all of them lead to the same type of error message. Here is an example:
[ERROR] null
java.lang.NoSuchMethodException: Could not find method net.imglib2.type.NativeType.createSuitableNativeImg(Lnet/imglib2/img/NativeImgFactory;[J)Lnet/imglib2/img/NativeImg;
There was a problem with the class net.imglib2.type.NativeType which can be found here:
/C:/Fiji.app/jars/imglib2-5.3.0.jar
java.lang.NoSuchMethodError: net.imglib2.type.NativeType.createSuitableNativeImg(Lnet/imglib2/img/NativeImgFactory;[J)Lnet/imglib2/img/NativeImg;
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:69)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:64)
at net.imglib2.img.ImgFactory.create(ImgFactory.java:174)
at mpicbg.stitching.fusion.OverlayFusion.createOverlay(OverlayFusion.java:176)
at plugin.Stitching_Pairwise.fuse(Stitching_Pairwise.java:481)
at plugin.Stitching_Pairwise.performPairWiseStitching(Stitching_Pairwise.java:448)
at plugin.Stitching_Pairwise.run(Stitching_Pairwise.java:299)
at ij.IJ.runUserPlugIn(IJ.java:233)
at ij.IJ.runPlugIn(IJ.java:196)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:745)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:69)
at net.imglib2.img.imageplus.ImagePlusImgFactory.create(ImagePlusImgFactory.java:64)
at net.imglib2.img.ImgFactory.create(ImgFactory.java:174)
at mpicbg.stitching.fusion.OverlayFusion.createOverlay(OverlayFusion.java:176)
at plugin.Stitching_Pairwise.fuse(Stitching_Pairwise.java:481)
at plugin.Stitching_Pairwise.performPairWiseStitching(Stitching_Pairwise.java:448)
at plugin.Stitching_Pairwise.run(Stitching_Pairwise.java:299)
at ij.IJ.runUserPlugIn(IJ.java:233)
at ij.IJ.runPlugIn(IJ.java:196)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:745)
I don't know, maybe I missed something obvious, has anyone encountered the same type of issue?
Thank you very much in advance!
Joti

How do I use heic format in Android P?

HeifEncoder was seen and implemented.
"MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC);"
If you do this, the following error will occur.
Blockquote
java.lang.IllegalArgumentException: Failed to initialize image/vnd.android.heic, error 0xfffffffe
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1811)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1777)
Is there a way to resolve the error?

grails 3.1 Exception - org.grails.datastore.mapping.core.ConnectionNotFoundException

Working with grails 3.1version, Getting this exception more often,mostly in production.
org.grails.datastore.mapping.core.ConnectionNotFoundException: No datastore session found. Call Datastore.connect(..) before calling Datastore.getCurrentSession()
at grails.mongodb.MongoEntity$Trait$Helper.getDboInternal(MongoEntity.groovy:128) ~[grails-datastore-gorm-mongodb-5.0.1.RELEASE.jar:na]
at grails.mongodb.MongoEntity$Trait$Helper.getAt(MongoEntity.groovy:118) ~[grails-datastore-gorm-mongodb-5.0.1.RELEASE.jar:na]
at grails.mongodb.MongoEntity$Trait$Helper.propertyMissing(MongoEntity.groovy:60) ~[grails-datastore-gorm-mongodb-5.0.1.RELEASE.jar:na]
at my.fanfest.framework.UserController.updatememe(UserController.groovy:1115) ~[classes/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_95]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_95]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
Any assistance to solve this exception would help me a lot.
It's hard to help you without any specific code which causes a problem. You can use this workaround:
SomeDomain.withNewSession { session ->
// your code here
}

what is correct format for list param in hql

RaceRegistration.executeQuery("select RaceRegistration.compositeEvent.id FROM RaceRegistration where RaceRegistration.id in :registrationIds group by RaceRegistration.compositeEvent.id",
[registrationIds: [1,2]])
In the above query my doubt is in the last part [registrationIds: [1,2]]. Here i am assuming that the format for the list is wrong. I appreciate any help in correcting the format. Thanks!
I get the following exception
Exception thrown
org.springframework.orm.hibernate3.HibernateQueryException: Unable to resolve path [RaceRegistration.compositeEvent], unexpected token [RaceRegistration] [select RaceRegistration.compositeEvent.id FROM com.runnercard.registration.RaceRegistration where RaceRegistration.id in :registrationIds group by RaceRegistration.compositeEvent.id]; nested exception is org.hibernate.QueryException: Unable to resolve path [RaceRegistration.compositeEvent], unexpected token [RaceRegistration] [select RaceRegistration.compositeEvent.id FROM com.runnercard.registration.RaceRegistration where RaceRegistration.id in :registrationIds group by RaceRegistration.compositeEvent.id]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:656)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343)
at com.runnercard.registration.RaceRegistration.executeQuery(RaceRegistration.groovy)
at com.runnercard.registration.RaceRegistration$executeQuery.call(Unknown Source)
at ConsoleScript5.run(ConsoleScript5:4)
Caused by: org.hibernate.QueryException: Unable to resolve path [RaceRegistration.compositeEvent], unexpected token [RaceRegistration] [select RaceRegistration.compositeEvent.id FROM com.runnercard.registration.RaceRegistration where RaceRegistration.id in :registrationIds group by RaceRegistration.compositeEvent.id]
at org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:219)
at org.hibernate.hql.ast.tree.IdentNode.resolve(IdentNode.java:108)
at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:175)
at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:576)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.propertyRef(HqlSqlBaseWalker.java:1181)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.propertyRefLhs(HqlSqlBaseWalker.java:5495)
The exception says something else. It seems you have a problem with the mapping on the RaceRegistration class. It seems that the field compositeEvent is not mapped or is not mapped correctly.
So actually your question is wrong considering the exception thrown.

Unable to import neo4j database with blueprints

i'm trying to open a neo4j database by using blueprints implementation, but i got the following exceptions:
Neo4jGraph graph = new Neo4jGraph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db");
this cause
Caused by: javax.faces.el.EvaluationException: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
... 32 more
Caused by: java.lang.RuntimeException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:165)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:135)
at org.pipe.java.web.netnografica.persistenza.graphdb.DAONodo.toGraphml(DAONodo.java:204)
at org.pipe.java.web.netnografica.controllo.ControlloGenerale.esportaGraphml(ControlloGenerale.java:133)
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 org.apache.el.parser.AstValue.invoke(AstValue.java:278)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
... 33 more
Caused by: java.lang.IllegalArgumentException: Bad value '-192M' for setting 'neostore.propertystore.db.strings.mapped_memory': value does not match expression:\d+[kmgKMG]?
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:782)
at org.neo4j.helpers.Settings$DefaultSetting.apply(Settings.java:702)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:215)
at org.neo4j.graphdb.factory.GraphDatabaseSetting$SettingWrapper.apply(GraphDatabaseSetting.java:189)
at org.neo4j.kernel.configuration.ConfigurationValidator.validate(ConfigurationValidator.java:50)
at org.neo4j.kernel.configuration.Config.applyChanges(Config.java:121)
at org.neo4j.kernel.InternalAbstractGraphDatabase.create(InternalAbstractGraphDatabase.java:339)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:253)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:106)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:81)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
at com.tinkerpop.blueprints.impls.neo4j.Neo4jGraph.<init>(Neo4jGraph.java:155)
... 44 more
there seems to be a need to provide a properties file. Is correct?
*Edited to answer to Michael Hunger:
Well .. I changed the version of blueprints, now is 2.5.0-SNAPSHOT, but nothing changed. So i provided the configs using the map ask asked by the constructor
Map<String, String> configurazione = new HashMap<String, String>();
configurazione.put("neostore.propertystore.db.strings.mapped_memory", "250M");
configurazione.put("neostore.propertystore.db.arrays.mapped_memory", "100M");
configurazione.put("neostore.relationshipstore.db.mapped_memory", "3845M");
configurazione.put("neostore.nodestore.db.mapped_memory", "350M");
configurazione.put("neostore.propertystore.db.mapped_memory", "350M");
configurazione.put("neostore.nodestore.db.mapped_memory", "769M");
Neo4j2Graph grafo = new Neo4j2Graph("/Users/pipe/Dev/neo4j-community-2.1.0-M01/data/graph.db", configurazione);
Now the exception is changed, and i really don't know what is wrong.. I linked in paste bin to report the complete stack.
http://pastebin.com/XpipSysp
at last a NoSuchMethodError is thrown. What am I missing?
Thanks a lot.
Which blueprints version are you using?
Blueprints 2.5-SNAPSHOT is compatible with Neo4j 2.0.0.
Please note there is a separate module for Neo4j 2.0 called blueprints-neo4j2
And the classes are called Neo4j2Graph Neo4j2Vertex etc.
You should also be able to provide config to the Neo4j2Graph.

Resources