Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 265577 - director cannot find repo in zip
Summary: director cannot find repo in zip
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: Matthew Piggott CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 264868
  Show dependency tree
 
Reported: 2009-02-19 20:03 EST by Paul Webster CLA
Modified: 2009-04-09 10:40 EDT (History)
1 user (show)

See Also:


Attachments
zipped version of the repo (10.77 MB, application/octet-stream)
2009-02-19 20:14 EST, Paul Webster CLA
no flags Details
SimpleArtifactRepository update (3.37 KB, patch)
2009-03-09 10:40 EDT, Matthew Piggott CLA
no flags Details | Diff
SimpleArtifactRepository patch (1.56 KB, patch)
2009-03-10 09:35 EDT, Matthew Piggott CLA
no flags Details | Diff
SimpleArtifactRepository patch (3.43 KB, patch)
2009-03-12 14:11 EDT, Matthew Piggott CLA
pascal: iplog+
Details | Diff
Tests (5.95 KB, patch)
2009-03-12 14:41 EDT, Matthew Piggott CLA
pascal: iplog+
Details | Diff
/testData/bug265577/zipRepo.zip (2.85 KB, application/zip)
2009-03-12 14:44 EDT, Matthew Piggott CLA
pascal: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2009-02-19 20:03:28 EST
The director application reports it cannot find a repository in our zipped repo:


test-eclipse/eclipse/eclipse \
-vm /opt/public/common/ibm-java2-ppc-50/bin/java \
-data tmp_ws \
-application org.eclipse.equinox.p2.director.app.application \
-nosplash --launcher.suppressErrors \
-consoleLog -flavor tooling \
-installIU org.eclipse.e4.ui.tests.feature.feature.group \
-p2.os linux -p2.ws gtk -p2.arch x86 \
-profile SDKProfile \
-metadataRepository "jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans" \
-artifactRepository "jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans" \
-destination test-eclipse/eclipse \
-bundlepool test-eclipse/eclipse \
-vmargs -Declipse.p2.MD5Check=false \
-Declipse.p2.data.area=test-eclipse/eclipse/p2


generated

!SESSION 2009-02-19 19:56:30.020 -----------------------------------------------
eclipse.buildId=I20090202-1535
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20080315 (JIT enabled)
J9VM - 20080314_17962_lHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.director.app.application -flavor tooling -installIU org.eclipse.e4.ui.tests.feature.feature.group -p2.os linux -p2.ws gtk -p2.arch x86 -profile SDKProfile -metadataRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans -artifactRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans -destination test-eclipse/eclipse -bundlepool test-eclipse/eclipse

Command-line arguments:  -os linux -ws gtk -arch x86 -data tmp_ws -application org.eclipse.equinox.p2.director.app.application -consoleLog -flavor tooling -installIU org.eclipse.e4.ui.tests.feature.feature.group -p2.os linux -p2.ws gtk -p2.arch x86 -profile SDKProfile -metadataRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans -artifactRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/,file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/galileo-repo-m5-trans -destination test-eclipse/eclipse -bundlepool test-eclipse/eclipse

!ENTRY org.eclipse.equinox.p2.director.app 4 0 2009-02-19 19:56:31.292
!MESSAGE jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/ failed to load
!STACK 1
org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/.
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:362)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:592)
        at org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager.loadRepository(ArtifactRepositoryManager.java:86)
        at org.eclipse.equinox.internal.p2.director.app.Application.initializeRepositories(Application.java:181)
        at org.eclipse.equinox.internal.p2.director.app.Application.run(Application.java:388)
        at org.eclipse.equinox.internal.p2.director.app.Application.start(Application.java:509)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:618)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1270)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1246)
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 1000 2009-02-19 19:56:31.293
!MESSAGE No repository found at jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/.

!ENTRY org.eclipse.equinox.p2.director.app 4 0 2009-02-19 19:56:31.977
!MESSAGE The installable unit org.eclipse.e4.ui.tests.feature.feature.group has not been found.
The installable unit org.eclipse.e4.ui.tests.feature.feature.group has not been found.
Comment 1 Paul Webster CLA 2009-02-19 20:08:10 EST
I copied the jar URL from the Install UI, which has no problem reading the repo.

jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/I20090219-1857/I20090219-1857/eclipse-e4-repo-I20090219-1857.zip!/

PW
Comment 2 Paul Webster CLA 2009-02-19 20:14:20 EST
Created attachment 126245 [details]
zipped version of the repo
Comment 3 Matthew Piggott CLA 2009-02-26 14:02:08 EST
I haven't been able to replicate the problem using I20090224-0800, would you be able to test if this is still occurring for you?
Comment 4 Paul Webster CLA 2009-02-27 08:13:48 EST
(In reply to comment #3)
> I haven't been able to replicate the problem using I20090224-0800, would you be
> able to test if this is still occurring for you?
> 

With I20090224-0800 I get passed this error (it finds the repos in both zips).  But it fails to install from the zip:

!SESSION 2009-02-27 07:56:08.126 -----------------------------------------------
eclipse.buildId=I20090224-0800
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20080315 (JIT enabled)
J9VM - 20080314_17962_lHdSMr
JIT  - 20080130_0718ifx2_r8
GC   - 200802_08
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.director.app.application -flavor tooling -installIU org.eclipse.e4.ui.feature.feature.group -p2.os linux -p2.ws gtk -p2.arch x86 -profile SDKProfile -metadataRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../e4GalileoM5.zip!/,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -artifactRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../e4GalileoM5.zip!/,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -destination /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse -bundlepool /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse
Command-line arguments:  -os linux -ws gtk -arch x86 -application org.eclipse.equinox.p2.director.app.application -consoleLog -flavor tooling -installIU org.eclipse.e4.ui.feature.feature.group -p2.os linux -p2.ws gtk -p2.arch x86 -profile SDKProfile -metadataRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../e4GalileoM5.zip!/,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -artifactRepository jar:file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../e4GalileoM5.zip!/,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -destination /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse -bundlepool /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse

!ENTRY org.eclipse.equinox.p2.engine 4 4 2009-02-27 07:56:12.764
!MESSAGE An error occurred while collecting items to be installed
!SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2009-02-27 07:56:12.764
!MESSAGE session context was:(profile=SDKProfile, phase=, operand=, action=).
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-02-27 07:56:12.764
!MESSAGE Artifact not found: org.eclipse.update.feature,org.eclipse.emf.databinding,1.1.0.v200902031500.
!SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 0 2009-02-27 07:56:12.764
!MESSAGE Artifact not found: org.eclipse.update.feature,org.eclipse.emf.ecore,2.5.0.v200902031500.


Both those jars are in the zip.

If I unzip e4Galeleo.zip and simply point to the unzipped directory, it installs correctly (although I get save preference errors):

Command-line arguments:  -os linux -ws gtk -arch x86 -application org.eclipse.equinox.p2.director.app.application -consoleLog -flavor tooling -installIU org.eclipse.e4.ui.feature.feature.group -p2.os linux -p2.ws gtk -p2.arch x86 -profile SDKProfile -metadataRepository file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../t,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -artifactRepository file:/shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/../t,jar:file:/home/users/pwebster/down/eclipse-e4-repo-I20090219-1857.zip!/ -destination /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse -bundlepool /shared/eclipse/e4/build/e4/downloads/drops/4.0.0/targets/t2/eclipse

!ENTRY org.eclipse.equinox.p2.artifact.repository 4 0 2009-02-27 08:10:39.192
!MESSAGE Error while saving repositories in preferences
!STACK 0
org.osgi.service.prefs.BackingStoreException: An error occurred while saving preferences for profile SDKProfile
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.save(ProfilePreferences.java:173)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:352)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:340)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManager$SaveJob.run(AbstractRepositoryManager.java:57)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.IllegalStateException: Profile SDKProfile is not current.
        at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:663)
        at org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:43)
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.save(ProfilePreferences.java:163)

!ENTRY org.eclipse.core.jobs 4 2 2009-02-27 08:10:39.209
!MESSAGE An internal error occurred during: "Saving repository settings".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.getDefaultLocation(ProfilePreferences.java:141)
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.save(ProfilePreferences.java:153)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:352)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:340)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManager$SaveJob.run(AbstractRepositoryManager.java:57)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.core.jobs 4 2 2009-02-27 08:10:39.222
!MESSAGE An internal error occurred during: "Saving repository settings".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.getDefaultLocation(ProfilePreferences.java:141)
        at org.eclipse.equinox.internal.p2.engine.ProfilePreferences.save(ProfilePreferences.java:153)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:352)
        at org.eclipse.core.internal.preferences.EclipsePreferences.flush(EclipsePreferences.java:340)
        at org.eclipse.equinox.internal.p2.core.helpers.AbstractRepositoryManager$SaveJob.run(AbstractRepositoryManager.java:57)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 5 Matthew Piggott CLA 2009-03-04 15:48:46 EST
After some debugging it looks like this happens with a folder inside a zipped repository.  SimpleArtifactRepository notices that the scheme for the URI of the artifact is 'jar' and can't create a File object representing it.  Looking to see how this can be fixed.
Comment 6 Matthew Piggott CLA 2009-03-09 10:40:44 EDT
Created attachment 128034 [details]
SimpleArtifactRepository update

I spoke with Pascal and zipped repositories need to be the same as a remote repository as we don't a method to obtain the contents of a folder inside a zip archive.  The attached patch adds an error message to SimpleArtifactRepository used if a folder artifact is in a non-file repository.
Comment 7 Matthew Piggott CLA 2009-03-10 09:35:29 EDT
Created attachment 128192 [details]
SimpleArtifactRepository patch

Slight change to the patch
Comment 8 Matthew Piggott CLA 2009-03-12 14:11:07 EDT
Created attachment 128601 [details]
SimpleArtifactRepository patch

Change to clarify the variable name of the Message as well as the associated text.
Comment 9 Matthew Piggott CLA 2009-03-12 14:41:38 EDT
Created attachment 128605 [details]
Tests

Simple tests, one to ensure that a feature can be retrieved from a zipped repo, and another to check the message given when trying a folder inside a zipped repo.  Zipped repo to follow
Comment 10 Matthew Piggott CLA 2009-03-12 14:44:23 EDT
Created attachment 128606 [details]
/testData/bug265577/zipRepo.zip
Comment 11 Pascal Rapicault CLA 2009-04-09 10:40:33 EDT
Patch released in HEAD.