Archiva

Unable to find project model for [...] if the initial import of the POM failed

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.0
  • Fix Version/s: 1.0.2
  • Component/s: repository scanning
  • Labels:
    None
  • Environment:
    Windows32
  • Number of attachments :
    2

Description

It seems that Archiva is not properly updating the database if the initial import of the POM failed due to a parse error, even after the original problem has been corrected, the repository has been rescanned, and the database updated again.

Steps to reproduce:
1. Start with a fresh Archiva 1.0 installation
2. Drop a group containing an artifact with a broken POM (illegal XML) to Archiva's internal repo directory
3. Run "Scan Repository Now" and "Update Database Now".
The log shows a ProjectModelException because the broken POM could not be parsed.
4. Fix the broken POM. Run "Scan Repository Now" and "Update Database Now" again.
5. Use the "Browse" page to browse to the artifact -> you get the error message:
Unable to find project model for [junit:junit:3.7].

I've attached the zipped contents of the "data" directory after performing the steps above, and the log file.

Notice that there might be general repository scanning problem in 1.0 that could be related, see
http://www.nabble.com/Repository-scanning-problem-in-1.0--tf4897121.html

  1. archiva.log
    29/Nov/07 8:05 AM
    73 kB
    Arne Degenring

Issue Links

Activity

Hide
Wendy Smoak added a comment -

I believe Archiva is now discovering deletions from the repository filesystem (MRM-37), but I am not sure about changes.

Show
Wendy Smoak added a comment - I believe Archiva is now discovering deletions from the repository filesystem (MRM-37), but I am not sure about changes.
Hide
Dário Oliveros added a comment -

Please take a look at http://jira.codehaus.org/browse/MRM-687.
It may fix your problem.

Show
Dário Oliveros added a comment - Please take a look at http://jira.codehaus.org/browse/MRM-687. It may fix your problem.
Hide
Maria Odea Ching added a comment -

This issue still exists after I applied the patch in MRM-687. My hunch is that the processed/unprocessed flag for the artifact in the db needs to be set to unprocessed when the project model was not added in order for the changes to be reflected.

Show
Maria Odea Ching added a comment - This issue still exists after I applied the patch in MRM-687. My hunch is that the processed/unprocessed flag for the artifact in the db needs to be set to unprocessed when the project model was not added in order for the changes to be reflected.
Hide
Maria Odea Ching added a comment -

Fixed in -r637023.

-set whenProcessed to null of every artifact discovered (ArtufactUpdateDatabaseConsumer)

Show
Maria Odea Ching added a comment - Fixed in -r637023. -set whenProcessed to null of every artifact discovered (ArtufactUpdateDatabaseConsumer)
Hide
Brett Porter added a comment -

merged to branch

Show
Brett Porter added a comment - merged to branch

People

Vote (4)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: