Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » [p2]Location must be absolute error although it is an absolute path
[p2]Location must be absolute error although it is an absolute path [message #735033] Mon, 10 October 2011 17:18 Go to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I'm trying to use p2 director to have a multi-platform product after a PDE build.
I'm using this called for each configuration:
<java classname="org.eclipse.equinox.launcher.Main"  maxmemory="2048m" fork="true" failonerror="true">
  <classpath>
    <path id="launcher.path.id">
	<fileset dir="${eclipse.base.platform}/plugins" includes="org.eclipse.equinox.launcher_*.jar"/>
	</path>
  </classpath>
	<arg value="-application" />
	<arg value="org.eclipse.equinox.p2.director" />
	<arg value="-repository"/>
	<arg value="${buildDirectory}/buildRepo"/>
	<arg value="-bundlepool" />
	<arg value="${baseLocation}/bundlepool" />
	<arg value="-shared" />
	<arg value="${baseLocation}/bundlepool/p2" />
	<arg value="-installIU" />
	<arg value="org.bonitasoft.studio.product" />
	<arg value="-destination" />
	<arg value="${baseLocation}/bundlepool/${conf}" />
	<arg value="-profile" />
	<arg value="BonitaStudio_${conf}" />
	<arg value="-consoleLog" />
	<jvmarg line="-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=pdeBuild.hprof"/>
</java>


And here is the error:
[java] !ENTRY org.eclipse.osgi 4 0 2011-10-10 19:00:51.100
     [java] !MESSAGE Application error
     [java] !STACK 1
     [java] java.lang.IllegalArgumentException: Location must be absolute: /media/bonita/hudson/allInOne-p2/all-in-one/productBuildDirectory/build/buildRepo
     [java] 	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.checkValidLocation(AbstractRepositoryManager.java:737)
     [java] 	at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.contains(AbstractRepositoryManager.java:249)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.initializeRepositories(DirectorApplication.java:379)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:796)
     [java] 	at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:954)
     [java] 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
     [java] 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
     [java] 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
     [java] 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
     [java] 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
     [java] 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
     [java] 	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
     [java] 	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


So as you see it complains that th epath i snot absolute although it is.

Does anyone have an idea?
Thanks by advance fo rany help

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: [p2]Location must be absolute error although it is an absolute path [message #735036 is a reply to message #735033] Mon, 10 October 2011 17:39 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

ok, I should have look into the code a little bit...
An URI to be absolute must have the scheme. SO i need to put file:// before the path. Not tried yet but it seems to be the issue.


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: [p2]Location must be absolute error although it is an absolute path [message #1758715 is a reply to message #735036] Fri, 31 March 2017 21:41 Go to previous messageGo to next message
Archean Lokinindi is currently offline Archean LokinindiFriend
Messages: 3
Registered: September 2016
Junior Member
Hey,

We are trying to accomplish a CI build on jenkins using Buckminster plugin. We are running into a problem which says p2 materialization failed in mspec, location must be absolute.
I think the rmap file is fine, the build continues even after it shows the materialization has failed error but it would fail later when its trying to run the pde export of our projects to a output destination.
The following is the stack trace
INFO: import 'com.crimsoninformatics.telematics.releng/telematics-jenkins.mspec'
INFO: Added Git repository at /var/lib/jenkins/jobs/testBuild/git/.git to the set of known repositories
ERROR: An internal error occurred during: "p2 materializer".
java.lang.IllegalArgumentException: Location must be absolute: /var/lib/jenkins/jobs/testBuild/git/,com.crimsoninformatics.batis.context
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.checkValidLocation(AbstractRepositoryManager.java:749)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:642)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
at org.eclipse.buckminster.core.materializer.P2Materializer.getMetadataRepository(P2Materializer.java:117)
at org.eclipse.buckminster.core.materializer.P2Materializer.materialize(P2Materializer.java:262)
at org.eclipse.buckminster.core.materializer.MaterializerJob.run(MaterializerJob.java:64)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
INFO: Import complete.
Re: [p2]Location must be absolute error although it is an absolute path [message #1758732 is a reply to message #1758715] Sat, 01 April 2017 08:31 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33224
Registered: July 2009
Senior Member
The code is calling this method:
	private URI checkValidLocation(URI location) {
		if (location == null)
			throw new IllegalArgumentException("Location cannot be null"); //$NON-NLS-1$
		if (!location.isAbsolute())
			throw new IllegalArgumentException("Location must be absolute: " + location); //$NON-NLS-1$
		return location;
	}
and so is checking
    public boolean isAbsolute() {
        return scheme != null;
    }
which of course is false, because your URI doesn't have a scheme. Wherever /var/lib/jenkins/jobs/testBuild/git is specified, it should use file:/var/lib/jenkins/jobs/testBuild/git/ instead.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:p2 - can't resolve org.eclipse.equinox.internal.provisional.configurator
Next Topic:Decoded URI in equinox
Goto Forum:
  


Current Time: Sat Oct 05 13:43:10 GMT 2024

Powered by FUDForum. Page generated in 0.03039 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top