Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313541

Summary: Exception thrown when generating metadata with p2.publisher.UpdateSitePublisher
Product: [Eclipse Project] Equinox Reporter: Sean Lamers <slamers>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, jcayne
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Sean Lamers CLA 2010-05-19 10:52:01 EDT
Eclipse Build: 3.6 RC1
JRE: IBM 1.5 SR11 FP1

The p2.publisher.UpdateSitePublisher throws an exception when run from the command line to generate metadata for an update site. No exception is thrown in 3.6 M7 when using the same command.

The command used to run the UpdateSitePublisher is:
java -jar /public/TPTP/updates/helios/eclipse/plugins/org.eclipse.equinox.launcher_*.jar -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -console -consoleLog -source /public/TPTP/updates/helios/20100518/ -metadataRepository file:/public/TPTP/updates/helios/20100518/ -artifactRepository file:/public/TPTP/updates/helios/20100518/ -metadataRepositoryName "Test and Performance Tools Platform Project (TPTP)" -artifactRepositoryName "Test and Performance Tools Platform Project (TPTP)" -compress -reusePack200Files

The repository location pointed to ("20100518") contains "features" and "plugins" folders with signed jars and a site.xml.

The following exception is thrown:

osgi> Generating metadata for ..
Generation completed with success [18 seconds].
!SESSION 2010-05-18 20:18:12.879 -----------------------------------------------
eclipse.buildId=I20100513-1500
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223ifx-20100125 (JIT enabled)
J9VM - 20100122_52103_lHdSMr
JIT  - 20091016_1845ifx1_r8
GC   - 20091026_AA
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -source /public/TPTP/updates/helios/20100518/ -metadataRepository file:/public/TPTP/updates/helios/20100518/ -artifactRepository file:/public/TPTP/updates/helios/20100518/ -metadataRepositoryName Test and Performance Tools Platform Project (TPTP) -artifactRepositoryName Test and Performance Tools Platform Project (TPTP) -compress -reusePack200Files
Command-line arguments:  -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -console -consoleLog -source /public/TPTP/updates/helios/20100518/ -metadataRepository file:/public/TPTP/updates/helios/20100518/ -artifactRepository file:/public/TPTP/updates/helios/20100518/ -metadataRepositoryName Test and Performance Tools Platform Project (TPTP) -artifactRepositoryName Test and Performance Tools Platform Project (TPTP) -compress -reusePack200Files

!ENTRY org.eclipse.osgi 4 0 2010-05-18 20:18:34.933
!MESSAGE An unexpected runtime error has occurred.
!STACK 0
java.lang.IllegalStateException: The service has been unregistered
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:209)
        at org.eclipse.osgi.framework.console.ConsoleSession.close(ConsoleSession.java:44)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.shutdown(FrameworkConsole.java:207)
        at org.eclipse.osgi.framework.internal.core.ConsoleManager.removedService(ConsoleManager.java:192)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:922)
        at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:351)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:865)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:225)
        at org.eclipse.osgi.framework.internal.core.ConsoleManager.stopConsole(ConsoleManager.java:162)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:412)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:198)
        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:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

!ENTRY org.eclipse.osgi 4 0 2010-05-18 20:18:34.943
!MESSAGE
!STACK 0
java.lang.IllegalStateException: The service has been unregistered
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:209)
        at org.eclipse.osgi.framework.console.ConsoleSession.close(ConsoleSession.java:44)
        at org.eclipse.osgi.framework.internal.core.FrameworkConsole.shutdown(FrameworkConsole.java:207)
        at org.eclipse.osgi.framework.internal.core.ConsoleManager.removedService(ConsoleManager.java:192)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:922)
        at org.osgi.util.tracker.AbstractTracked.untrack(AbstractTracked.java:351)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:865)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:225)
        at org.eclipse.osgi.framework.internal.core.ConsoleManager.stopConsole(ConsoleManager.java:162)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:412)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:198)
        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:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Andrew Niefer CLA 2010-05-19 11:27:18 EDT
Caused by changes for bug 312691.

I would expect that the metadata is generated properly despite this exception.

*** This bug has been marked as a duplicate of bug 312917 ***