java.lang.ArithmeticException: BigInteger: modulus not positive

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via YouTrack by Unknown author, 1 year ago
via Stack Overflow by Sparrow
, 2 years ago
BigInteger: modulus not positive
via Stack Overflow by CoolEulerProject
, 1 year ago
BigInteger: modulus no t positive
java.lang.ArithmeticException: BigInteger: modulus not positive
at java.math.BigInteger.mod(BigInteger.java:2415)
at org.jetbrains.kotlin.resolve.constants.evaluate.EvaluatePackage$OperationsMapGenerated$d01c9442$binaryOperations$231.invoke(OperationsMapGenerated.kt:308)
at org.jetbrains.kotlin.resolve.constants.evaluate.EvaluatePackage$OperationsMapGenerated$d01c9442$binaryOperations$231.invoke(OperationsMapGenerated.kt)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.evaluateBinaryAndCheck(ConstantExpressionEvaluator.kt:300)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.evaluateCall(ConstantExpressionEvaluator.kt:234)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.visitBinaryExpression(ConstantExpressionEvaluator.kt:196)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.visitBinaryExpression(ConstantExpressionEvaluator.kt:42)
at org.jetbrains.kotlin.psi.JetBinaryExpression.accept(JetBinaryExpression.java:33)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.evaluate(ConstantExpressionEvaluator.kt:79)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.access$evaluate$1(ConstantExpressionEvaluator.kt:42)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator$Companion.evaluate(ConstantExpressionEvaluator.kt:47)
at org.jetbrains.kotlin.resolve.constants.evaluate.ConstantExpressionEvaluator.evaluate(ConstantExpressionEvaluator.kt)
at org.jetbrains.kotlin.resolve.CompileTimeConstantUtils.canBeReducedToBooleanConstant(CompileTimeConstantUtils.java:133)
at org.jetbrains.kotlin.idea.intentions.SimplifyBooleanWithConstantsIntention.canBeReducedToBooleanConstant(SimplifyBooleanWithConstantsIntention.kt:129)
at org.jetbrains.kotlin.idea.intentions.SimplifyBooleanWithConstantsIntention.areThereExpressionsToBeSimplified(SimplifyBooleanWithConstantsIntention.kt:52)
at org.jetbrains.kotlin.idea.intentions.SimplifyBooleanWithConstantsIntention.isApplicableTo(SimplifyBooleanWithConstantsIntention.kt:37)
at org.jetbrains.kotlin.idea.intentions.SimplifyBooleanWithConstantsIntention.isApplicableTo(SimplifyBooleanWithConstantsIntention.kt:33)
at org.jetbrains.kotlin.idea.intentions.JetSelfTargetingOffsetIndependentIntention.applicabilityRange(JetSelfTargetingIntention.kt:116)
at org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection$buildVisitor$1.visitElement(IntentionBasedInspection.kt:59)
at org.jetbrains.kotlin.psi.JetElementImpl.accept(JetElementImpl.java:52)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:80)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:69)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:293)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$200(LocalInspectionsPass.java:76)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:262)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:259)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:122)
at com.intellij.concurrency.ApplierCompleter.access$000(ApplierCompleter.java:44)
at com.intellij.concurrency.ApplierCompleter$1.run(ApplierCompleter.java:85)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1143)
at com.intellij.concurrency.ApplierCompleter$2.run(ApplierCompleter.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:431)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:383)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:106)
at jsr166e.CountedCompleter.exec(CountedCompleter.java:684)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:109)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.