Community
Participate
Working Groups
I am using ant to invoke headless calls to publisher. The primary ant target (build) initializes properties, builds the features, populates the target p2 site with the feature and plugin artifacts, generates the site.xml, then calls publisher. running the ant command-line will sometimes publish as expected, at other times I get a null-pointer exception. I have been unable to determine a pattern (such as second invocation works). I'm not even certain if it is a bug, or if timing is causing a failure condition I'm unaware of (such as timestamps need to match or be in a specific order). I have been noticing that parsing times are increasing (from 1 sec, to 3 over a dozen runs or so) but this may be coincidence - a memory leak?. Below is the ant target definition, failure output, success output, and example command-line. If it helps I can post the full build.xml, but it is still pretty rough. -- Ant Target definition -- <target name="publish-p2-repos" depends="init, create-site-for-generation"> <echo message="java.home ='${java.home}'"/> <echo message="p2.SDK.plugin.dir='${p2.SDK.plugin.dir}'"/> <echo message="p2.launcher.jar ='${p2.launcher.jar}'"/> <echo message="p2.publisher.jar ='${p2.publisher.jar}'"/> <echo message="-----"/> <echo message="p2.base.url ='${p2.base.url}'"/> <echo message="p2.base.dir ='${p2.base.dir}'"/> <!-- Metadata generator apparently doesn't rebuild the artifact and content xml files if they already exist --> <mkdir dir="${p2.base.dir}"/> <delete failonerror="false"> <fileset dir="${p2.base.dir}" includes="artifact*.*, content*.*"/> </delete> <java classname="org.eclipse.equinox.launcher.Main" fork="true" timeout="10800000" taskname="p2" jvm="${java.home}/bin/java" failonerror="false" maxmemory="256m"> <classpath> <fileset dir="${p2.SDK.plugin.dir}" includes="${p2.launcher.jar}, ${p2.publisher.jar}"/> <pathelement location="${p2.SDK.plugin.dir}" /> </classpath> <arg line=" -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher" /> <arg line=" -metadataRepository ${p2.base.url}" /> <arg line=" -artifactRepository ${p2.base.url}" /> <arg line=" -source ${p2.base.dir}" /> <arg line=" -compress -publishArtifacts -configs all" /> </java> </target> -- Error -- publish-p2-repos: [echo] java.home ='C:\Program Files\Java\jdk1.6.0_17\jre' [echo] p2.SDK.plugin.dir='C:/helios-M4/eclipse/plugins' [echo] p2.launcher.jar ='org.eclipse.equinox.launcher_*.jar' [echo] p2.publisher.jar ='org.eclipse.equinox.p2.publisher_*.jar' [echo] ----- [echo] p2.base.dir ='C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100224-r6646' [echo] p2.base.url ='file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100224-r6646' [p2] java.lang.NullPointerException [p2] at org.eclipse.equinox.p2.publisher.Publisher.loadArtifactRepository(Publisher.java:142) [p2] at org.eclipse.equinox.p2.publisher.Publisher.createArtifactRepository(Publisher.java:104) [p2] at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.initializeRepositories(AbstractPublishe rApplication.java:89) [p2] at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.initialize(AbstractPublisherApplication .java:80) [p2] at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:2 71) [p2] at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:2 49) [p2] at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(AbstractPublisherApplication.java :301) [p2] at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) [p2] at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26) [p2] at java.lang.Thread.run(Thread.java:619) -- Success -- publish-p2-repos: [echo] java.home ='C:\Program Files\Java\jdk1.6.0_17\jre' [echo] p2.SDK.plugin.dir='C:/helios-M4/eclipse/plugins' [echo] p2.launcher.jar ='org.eclipse.equinox.launcher_*.jar' [echo] p2.publisher.jar ='org.eclipse.equinox.p2.publisher_*.jar' [echo] ----- [echo] p2.base.dir ='C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100224-r6646' [echo] p2.base.url ='file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100224-r6646' [p2] Generating metadata for .. [p2] Generation completed with success [1 seconds]. -- Command line -- ant -f newbuild.xml -Dversion.qualifier=v20100224-r6646
What version are you running?
Andrew, you have restricted the visibility of this bug, was this intentional?
Please try again with 3.6 M5 as your publisher. Significant changes happened in between M4 and M5.
Sorry. I should have mentioned explicitly the version I am using: I started out using Helios-M4, but quickly found that I needed to update. Therefore, I'm assuming that I am using the latest Helios generally available components (M5), if you can provide pertinent bundle versions, I can verify that the updated M4 install is actually M5.
More specifically I am using an updated (to M5) Helios M4 JEE IDE install.
Please try something newer than M5, specifically, something 20100208 or later. I think this is bug 301262. (And yes, the security flag was unintentional). *** This bug has been marked as a duplicate of bug 301262 ***
I cannot get Helios to update to newer bundles (it appears to only recognize the package for update), and new software isn't finding anything - I'm probably not using the correct site address. However, I downloaded and installed equinoxSDK-20100223-2200. I am getting a runtime failure. Looks like a configuration issue (I didn't configure) or a bad build. Command-line, and output follow. -- command-line -- ant -f newbuild.xml -Dversion.qualifier=v20100225-r6656 -Dp2.SDK.install.dir=C:/EquinoxSDK-N20100223-2000 -- output -- publish-p2-repos: [echo] java.home ='C:\Program Files\Java\jdk1.6.0_17\jre' [echo] p2.SDK.plugin.dir='C:/EquinoxSDK-N20100223-2000/plugins' [echo] p2.launcher.jar ='org.eclipse.equinox.launcher_*.jar' [echo] p2.publisher.jar ='org.eclipse.equinox.p2.publisher_*.jar' [echo] ----- [echo] p2.base.dir ='C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656' [echo] p2.base.url ='file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656' [p2] An error has occurred. See the log file [p2] C:\EquinoxSDK-N20100223-2000\configuration\1267122118810.log. [p2] Java Result: 13 -- C:\EquinoxSDK-N20100223-2000\configuration\1267122118810.log -- !SESSION 2010-02-25 13:21:57.638 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_17 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -metadataRepository file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -artifactRepository file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -source C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -compress -publishArtifacts -configs all Command-line arguments: -application org.eclipse.equinox.p2.publisher.UpdateSitePublisher -metadataRepository file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -artifactRepository file:/C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -source C:/__EL-CompositeRepositoryTestSite/2.1.0.v20100225-r6656 -compress -publishArtifacts -configs all !ENTRY org.eclipse.osgi 4 0 2010-02-25 13:21:59.122 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) 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:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:611) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566) at org.eclipse.equinox.launcher.Main.run(Main.java:1363) at org.eclipse.equinox.launcher.Main.main(Main.java:1339)
I've also updated to the latest bits I can get for Helios, but they are still dated 20100126 and I still get the same issues. If this is a duplicate bug the issue should go away after I update to M6 (due out in two weeks).
I really want to get this issue resolved before M6, since metadata.generator is supposed to be removed (what we currently use to generate P2), and due to these issues I cannot migrate to the new process until I can get the new files (presumably after M6, because of errors with the equinox SDK (config?) and unavailability of the needed files in JEE). I'd move away from the Helios-JEE install is the SDK would work, but don't understand the error I'm getting with it. Do I need to write a config.ini with specific properties defined for the unzipped archive to function? (There is no installer as the wiki describes).
Did you try a build from this week?
I did. The SDK from 3/7 (equinox-SDK-I20100307-2000.zip) reported the same errors as the SDK from 2/23. It looks like a configuration problem, or it may be an issue with the actual application being run (org.eclipse.equinox.p2.publisher.UpdateSitePublisher). I couldn't find source earlier, so it appears to be generated at runtime or part of another bundle than publisher.
equinox-SDK-I20100307-2000.zip is just a repository, not a configured product. The stack in comment #7 is a fundamental configuration problem. I would suggest instead to download the Eclipse SDK http://download.eclipse.org/eclipse/downloads/drops/I20100309-0100/index.php
Thanks. That did it. I wasn't certain that the "eclipseSDK" was an installed "equinoxSDK". The equinoxSDK used to be an installer. At any rate, this version of the eclipseSDK not only fixed the config issue, but it also resolved the previous null pionter issues. I am closing this again as a duplicate. *** This bug has been marked as a duplicate of bug 301262 ***