java.lang.IllegalArgumentException: Number of days must be greater than zero

Sonatype JIRA | Kelly Robinson | 12 months ago
  1. 0

    The UI for Scheduled Tasks allows for configuring 'bad' settings that will inevitably cause the task to fail. In this case I {code} 2015-12-16 11:54:47,559-0800 ERROR [quartz-2-thread-19] *SYSTEM org.sonatype.nexus.repository.maven.tasks.PurgeMavenUnusedSnapshotsTask - Failed to run task 'Purge Unused Maven Snapshots from *' on repository 'maven-snapshots' java.lang.IllegalArgumentException: Number of days must be greater than zero at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) [com.google.guava:18.0.0] at org.sonatype.nexus.repository.maven.internal.PurgeUnusedSnapshotsFacetImpl.purgeUnusedSnapshots(PurgeUnusedSnapshotsFacetImpl.java:104) [na:na] at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39) [na:na] at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:267) [na:na] at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53) [na:na] at org.sonatype.nexus.repository.maven.tasks.PurgeMavenUnusedSnapshotsTask.execute(PurgeMavenUnusedSnapshotsTask.java:59) [na:na] at org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56) [na:na] at org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89) [org.sonatype.nexus.scheduling:3.0.0.SNAPSHOT] at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:137) [org.sonatype.nexus.quartz:3.0.0.SNAPSHOT] at org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:99) [org.sonatype.nexus.quartz:3.0.0.SNAPSHOT] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [org.quartz-scheduler.quartz:2.2.2] at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40) [org.sonatype.nexus.thread:3.0.0.SNAPSHOT] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [org.apache.shiro.core:1.2.4] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [org.apache.shiro.core:1.2.4] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_66] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_66] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66] {code} Reproduction, configure "Purge Unused Snapshots" with -1 Days(see screenshot). Saves no problem but errors on run.

    Sonatype JIRA | 12 months ago | Kelly Robinson
    java.lang.IllegalArgumentException: Number of days must be greater than zero
  2. 0

    All players kicked from bungeecord/bukkit server when an user disconnects

    GitHub | 2 years ago | MartinRM4
    io.netty.handler.codec.EncoderException: java.lang.IllegalArgumentException: Cannot get ID for packet class net.md_5.bungee.protocol.packet.Kick
  3. 0

    Error on rescaling

    GitHub | 2 years ago | damiencarol
    java.lang.IllegalArgumentException: Fragment is partitioned, but no partitioned driver found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    CREATE TABLE fails with weird error for unsupported type

    GitHub | 2 years ago | electrum
    java.lang.IllegalArgumentException: Fragment is partitioned, but no partitioned driver found
  6. 0

    Exception when using non-deterministic predicate together with IN

    GitHub | 2 years ago | martint
    java.lang.IllegalArgumentException: Only deterministic expressions may be considered for rewrite
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Number of days must be greater than zero

    at com.google.common.base.Preconditions.checkArgument()
  2. Guava
    Preconditions.checkArgument
    1. com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)[com.google.guava:18.0.0]
    1 frame
  3. org.sonatype.nexus
    RepositoryTaskSupport.execute
    1. org.sonatype.nexus.repository.maven.internal.PurgeUnusedSnapshotsFacetImpl.purgeUnusedSnapshots(PurgeUnusedSnapshotsFacetImpl.java:104)[na:na]
    2. org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)[na:na]
    3. org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:267)[na:na]
    4. org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)[na:na]
    5. org.sonatype.nexus.repository.maven.tasks.PurgeMavenUnusedSnapshotsTask.execute(PurgeMavenUnusedSnapshotsTask.java:59)[na:na]
    6. org.sonatype.nexus.repository.RepositoryTaskSupport.execute(RepositoryTaskSupport.java:56)[na:na]
    6 frames
  4. ${project.groupId}:${project.artifactId}
    TaskSupport.call
    1. org.sonatype.nexus.scheduling.TaskSupport.call(TaskSupport.java:89)[org.sonatype.nexus.scheduling:3.0.0.SNAPSHOT]
    1 frame
  5. org.sonatype.nexus
    QuartzTaskJob.execute
    1. org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.doExecute(QuartzTaskJob.java:137)[org.sonatype.nexus.quartz:3.0.0.SNAPSHOT]
    2. org.sonatype.nexus.quartz.internal.task.QuartzTaskJob.execute(QuartzTaskJob.java:99)[org.sonatype.nexus.quartz:3.0.0.SNAPSHOT]
    2 frames
  6. quartz
    JobRunShell.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:202)[org.quartz-scheduler.quartz:2.2.2]
    1 frame
  7. org.sonatype.nexus
    MDCAwareRunnable.run
    1. org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)[org.sonatype.nexus.thread:3.0.0.SNAPSHOT]
    1 frame
  8. Shiro
    SubjectRunnable.run
    1. org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)[org.apache.shiro.core:1.2.4]
    2. org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)[org.apache.shiro.core:1.2.4]
    2 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0_66]
    2. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_66]
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_66]
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_66]
    5. java.lang.Thread.run(Thread.java:745)[na:1.8.0_66]
    5 frames