Archiva

NPE during repository scan

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1, 1.0.2
  • Fix Version/s: 1.0.2
  • Component/s: repository scanning
  • Labels:
    None
  • Number of attachments :
    0

Description

i'm running version 631389 from the 1.0.2 branch, and i'm encountering the exception below during repository scanning. it seems to happen once, and scanning seems to continue successfully, so i'm not sure what exactly is affected by it.

edu.emory.mathcs.backport.java.util.concurrent.ExecutionException: java.lang.NullPointerException
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.waitForTask(ThreadedTaskQueueExecutor.java:159)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.run(ThreadedTaskQueueExecutor.java:127)
Caused by: java.lang.NullPointerException
at org.apache.maven.archiva.database.updater.ProcessArchivaArtifactClosure.execute(ProcessArchivaArtifactClosure.java:56)
at org.apache.commons.collections.CollectionUtils.forAllDo(CollectionUtils.java:388)
at org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateProcessed(JdoDatabaseUpdater.java:170)
at org.apache.maven.archiva.database.updater.JdoDatabaseUpdater.updateAllProcessed(JdoDatabaseUpdater.java:111)
at org.apache.maven.archiva.scheduled.executors.ArchivaDatabaseUpdateTaskExecutor.executeTask(ArchivaDatabaseUpdateTaskExecutor.java:78)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)

Activity

Hide
james ahlborn added a comment -

actually, poking into this a little, i realize that it is a failure during database scanning, not repository scanning. i'm guessing it's aborting the database scan, so my "processed" artifacts are not getting scanned.

Show
james ahlborn added a comment - actually, poking into this a little, i realize that it is a failure during database scanning, not repository scanning. i'm guessing it's aborting the database scan, so my "processed" artifacts are not getting scanned.
Hide
james ahlborn added a comment -

Also note that the code where this is throwing is actually within a catch block, presumably trying to get the logger. the other disturbing bit about this code, is that it is not outputting any info about the actual ConsumerException being thrown, which will make it rather hard to debug other consumer issues. e.g. something is causing a ConsumerException, which is leading to the NPE while logging, but the underlying cause is being lost.

Show
james ahlborn added a comment - Also note that the code where this is throwing is actually within a catch block, presumably trying to get the logger. the other disturbing bit about this code, is that it is not outputting any info about the actual ConsumerException being thrown, which will make it rather hard to debug other consumer issues. e.g. something is causing a ConsumerException, which is leading to the NPE while logging, but the underlying cause is being lost.
Hide
Brett Porter added a comment - - edited

fixed the logger setting - please file a new bug for the consumer exception it reveals later if necessary

Show
Brett Porter added a comment - - edited fixed the logger setting - please file a new bug for the consumer exception it reveals later if necessary
Hide
james ahlborn added a comment -

excellent, thanks for the quick fixes.

however, the build seems to be failing now in some of the unit tests. e.g. in the archiva-database project:

testGetSelectedCleanupConsumers(org.apache.maven.archiva.database.updater.DatabaseConsumersTest) Time elapsed: 0.045 sec <<< ERROR!
org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.archiva.database.updater.DatabaseConsumers', it could not be started
at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:156)

Show
james ahlborn added a comment - excellent, thanks for the quick fixes. however, the build seems to be failing now in some of the unit tests. e.g. in the archiva-database project: testGetSelectedCleanupConsumers(org.apache.maven.archiva.database.updater.DatabaseConsumersTest) Time elapsed: 0.045 sec <<< ERROR! org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.apache.maven.archiva.database.updater.DatabaseConsumers', it could not be started at org.codehaus.plexus.DefaultComponentLookupManager.lookup(DefaultComponentLookupManager.java:156)
Hide
Brett Porter added a comment -

serves me right for cheating. I'll add the missing descriptors to the Plexus test cases now

Show
Brett Porter added a comment - serves me right for cheating. I'll add the missing descriptors to the Plexus test cases now
Hide
Brett Porter added a comment -

fixed now

Show
Brett Porter added a comment - fixed now

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: