archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: Strange error in 1.4-M4: repositoryId cannot be null
Date Thu, 16 Jan 2014 00:05:14 GMT
See my response on the thread.
Should be fixed now.

HTH && Cheers
Olivier

On 16 January 2014 00:57, Jeroen Hoek <jeroen@lable.org> wrote:
> I gave both options a go, but no success this far:
>
> Dirk's patch to 1.4M4 looks good, but I still get the "repositoryId
> cannot be null" error. I can build the package, and when I replace
> archiva-rest-services-1.4-M4.jar in a new install of Archiva 1.4M4,
> everything works, except that the error remains. I added a log message
> after [ artifact.setRepositoryId( repositoryId ); ] to confirm that I
> was running the patched code, and the repositoryId appears to be set
> properly to "internal".
>
> On a newly uploaded artefact: I can delete the project, but not a
> specific version.
>
>
> I tried 2.0.0-SNAPSHOT as well, but it won't run on a fresh install of
> Ubuntu 12.04 server with OpenJDK 1.7. 1.4M4 does work on the same VM.
> I'm not exactly sure what the problem is, but the logs are spammed
> with messages about the Bean loading framework or some such.
>
> Olivier:
> I've attached the 2.0.0-SNAPSHOT logfile in case you want a look.
>
>
> 2014/1/10 Dirk Buchhorn <Dirk.Buchhorn@finkundpartner.de>:
>> Hello Olivier,
>>
>> today I install the current SNAPSHOT version but the error is still there.
>> The fast browse view impressed me.
>> My focus is still on the delete functionality. I hope my explanation will be
>> good enough.
>>
>> I test this at work with an existing repository first but my mail is based
>> on an new archiva installation with an empty repository.
>> I think before I clear the browser cache (at work) an artifact version could
>> be deleted. But after clearing the browser cache it don't work.
>>
>> 1th
>> - insert a new artifact (mvn release:prepare; mvn release:perform)
>> - do a quick search (on the first page or the upper right search field)
>> - the search text is shown and the first search result is displayed over the
>> search text
>> -> bug
>>
>> 2th
>> - delete an artifact version (the "All or no" repository is selected)
>> - a balloon shows the message "[version.delete.missing.repoId]"
>> -> I don't know if this is a bug, because the browser application maybe
>> don't know this id?
>>
>> 3th
>> - delete an artifact version (the repository that contains the artifact is
>> selected)
>> - the program ask if I'm sure to delete the artifact -> click ok
>> - the server error message is displayed "repositoryId cannot be null"
>> -> bug not fixed for non snapshot versions (see 6th)
>>
>> 4th
>> - delete a module works
>>
>> 5th
>> - insert a new snapshot artifact (mvn deploy)
>> - delete the artifact version (the "All" repository is selected)
>> - a balloon shows the message "[version.delete.missing.repoId]"
>> -> bug?
>>
>> 6th
>> - delete an artifact version (the snapshot repository that contains the
>> artifact is selected) works
>> - the program ask if I'm sure to delete the artifact -> click ok
>> -> bug was fixed for the snapshot versions. The question is, why the code
>> changes work with the M4 version. I think this is a bug in M4 too.
>>
>> Dirk
>>
>>
>> On 09.01.2014 23:48, Olivier Lamy wrote:
>>>
>>> good catch.
>>> I just committed the fix. (Thanks!)
>>> You can try snapshot build from here
>>>
>>> https://builds.apache.org/view/A-D/view/Archiva/job/archiva-all-maven-3.x-jdk-1.6/
>>>   should be part of #2218
>>>
>>>
>>>
>>> On 10 January 2014 06:08, Dirk Buchhorn wrote:
>>>>
>>>> Hello,
>>>>
>>>> we get the same error message. The problem belongs to the
>>>> org.apache.archiva.rest.services .DefaultRepositoriesService class. In
>>>> the
>>>> removeProjectVersion method the repositoriyId was not set. After setting
>>>> this id the error is away.
>>>>
>>>> The code changes
>>>> Start from line 604
>>>>      public Boolean removeProjectVersion( String repositoryId, String
>>>> namespace, String projectId, String version )
>>>>          throws ArchivaRestServiceException
>>>>      {
>>>>          // if not a generic we can use the standard way to delete
>>>> artifact
>>>>          if ( !VersionUtil.isGenericSnapshot( version ) )
>>>>          {
>>>>              Artifact artifact = new Artifact( namespace, projectId,
>>>> version
>>>> );
>>>>             artifact.setRepositoryId( repositoryId ); // this line was
>>>> inserted
>>>>              return deleteArtifact( artifact );
>>>>          }
>>>>
>>>> In the method deleteArtifact the repositoryId was read from
>>>> artifact.getContext(). I change this to artifact.getRepositoryId() (line
>>>> 711).
>>>>
>>>> @Jeroen
>>>> After these changes the project can be build and only the
>>>> "archiva-rest-services-1.4-M4.jar" must be replaced.
>>>> For building the project I do the following changes in the parent pom.xml
>>>> file.
>>>> - comment the module "archiva-docs"
>>>> - run maven with skip tests (mvn clean package -DskipTests)
>>>>
>>>> Kind regards
>>>>
>>>> Dirk Buchhorn
>>>>
>>>
>>>
>>
>
>
>
> --
> Vriendelijke groeten,
>
> Jeroen Hoek
>
> Lable
> ✉ jeroen@lable.org
> ℡ 088 44 20 200
>
> http://lable.org
> KvK № 55984037
> BTW № NL8519.32.411.B.01



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
View raw message