Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster dev » Running Buckminster via java -jar fails to import with JDK 1.5
Running Buckminster via java -jar fails to import with JDK 1.5 [message #533572] Fri, 14 May 2010 15:12 Go to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 15
Registered: July 2009
Junior Member
Hi,

I'm setting up a hudson build for our RCP app and stumbled over this in the cause of doing so. I'd like to use a 1.5 JDK that hudson should download from Sun's/Oracle's site as our RCP targets java 1.5. Hudson's buckminster plugin downloads Buckminster too (3.5 or 3.6 have the same problem), so I have .hudson/tools/bucky_download/buckminster with buckminster 3.6 and
.hudson/tools/1.5_JDK/ with the JDK.

Unfortunately the way the Hudson-Buckminster plugin runs buckminster causes it to fail importing the workspace, it aborts after some time with:
ERROR: An internal error occurred during: "Installing".
java.lang.IllegalArgumentException: Resolution not created using LocalReader
	at org.eclipse.buckminster.core.reader.LocalReaderType.getFixedLocation(LocalReaderType.java:50)
	at org.eclipse.buckminster.core.materializer.WorkspaceMaterializer.getMaterialization(WorkspaceMaterializer.java:68)
	at org.eclipse.buckminster.core.materializer.WorkspaceMaterializer.createBindSpec(WorkspaceMaterializer.java:241)
	at org.eclipse.buckminster.core.materializer.WorkspaceMaterializer.performInstallAction(WorkspaceMaterializer.java:198)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.installRecursive(AbstractMaterializer.java:164)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.delegateAndInstallRecursive(AbstractMaterializer.java:189)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.installRecursive(AbstractMaterializer.java:156)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.delegateAndInstallRecursive(AbstractMaterializer.java:189)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.installRecursive(AbstractMaterializer.java:156)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.delegateAndInstallRecursive(AbstractMaterializer.java:189)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.installRecursive(AbstractMaterializer.java:156)
	at org.eclipse.buckminster.core.materializer.AbstractMaterializer.performInstallActions(AbstractMaterializer.java:68)
	at org.eclipse.buckminster.core.materializer.InstallerJob.runInWorkspace(InstallerJob.java:52)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
INFO:  Import complete.


I can reproduce this by executing the same commandline from a terminal:
/home/andreas/.hudson/tools/1.5_JDK/bin/java -Dbuckminster.output.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.output -Dbuckminster.temp.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.temp -jar /home/andreas/.hudson/tools/bucky_download/buckminster/plugins/org.eclipse.equinox.launcher_1.1.0.v20100419.jar -application org.eclipse.buckminster.cmdline.headless -data /home/andreas/.hudson/jobs/rcp/workspace --loglevel info setpref targetPlatformPath="/home/andreas/.hudson/jobs/rcp_target/builds/2010-05-07_17-18-06/archive/targetPlatform"

/home/andreas/.hudson/tools/1.5_JDK/bin/java -Dbuckminster.output.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.output -Dbuckminster.temp.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.temp -jar /home/andreas/.hudson/tools/bucky_download/buckminster/plugins/org.eclipse.equinox.launcher_1.1.0.v20100419.jar -application org.eclipse.buckminster.cmdline.headless -data /home/andreas/.hudson/jobs/rcp/workspace --loglevel info import '/home/andreas/.hudson/jobs/rcp/workspace//com.froglogic.squish.ide.bucky/site.cquery'


If I replace in the above code the java-execution with running the buckminster shell script (and removing the -jar argument) then it works just fine. No idea why that makes a difference.

Also using a JDK 1.6 < Update 19 (due to the certificate problems) the java-invocation version works just fine. I'd really like to use a 1.5 JDK as we've had some problems with Eclipse accepting 1.6 code even though we tried to set 1.5 source compliance everywhere.
Re: Running Buckminster via java -jar fails to import with JDK 1.5 [message #533582 is a reply to message #533572] Fri, 14 May 2010 15:30 Go to previous messageGo to next message
Johannes Utzig is currently offline Johannes Utzig
Messages: 329
Registered: July 2009
Senior Member
Hi Andreas,

>
> If I replace in the above code the java-execution with running the
> buckminster shell script (and removing the -jar argument) then it works
> just fine. No idea why that makes a difference.
> Also using a JDK 1.6 < Update 19 (due to the certificate problems) the
> java-invocation version works just fine. I'd really like to use a 1.5
> JDK as we've had some problems with Eclipse accepting 1.6 code even
> though we tried to set 1.5 source compliance everywhere.

if you execute the shell script without a -vm parameter, it will use the
'java' in the system path which naturally will not be the latest 1.5 you
install with hudson. Can you try running the buckminster script and
point it to the exact same JDK as in your build? i.e.
buckminster -vm /home/andreas/.hudson/tools/1.5_JDK/bin/java ...
Just to narrow it down if it's an issue with the java version or
something else.
The plugin has to start the equinox launcher jar directly btw, because
using the buckminster script has some other nasty side effects (magic
quoting of the shell...)

Regards,
Johannes
Re: Running Buckminster via java -jar fails to import with JDK 1.5 [message #533602 is a reply to message #533582] Fri, 14 May 2010 16:45 Go to previous messageGo to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 15
Registered: July 2009
Junior Member
Thanks for the response,
Johannes Utzig wrote on Fri, 14 May 2010 11:30
Hi Andreas,

>
> If I replace in the above code the java-execution with running the
> buckminster shell script (and removing the -jar argument) then it works
> just fine. No idea why that makes a difference.
> Also using a JDK 1.6 < Update 19 (due to the certificate problems) the
> java-invocation version works just fine. I'd really like to use a 1.5
> JDK as we've had some problems with Eclipse accepting 1.6 code even
> though we tried to set 1.5 source compliance everywhere.

if you execute the shell script without a -vm parameter, it will use the
'java' in the system path which naturally will not be the latest 1.5 you
install with hudson.



Hmm, I think I had JAVA_HOME and PATH set up pointing to the downloaded JDK in hudson,
which should be sufficient, right?

Quote:

Can you try running the buckminster script and
point it to the exact same JDK as in your build? i.e.
buckminster -vm /home/andreas/.hudson/tools/1.5_JDK/bin/java ...
Just to narrow it down if it's an issue with the java version or
something else.



That works fine too, I get to see only the "Import complete" message, no errors.

But I've just noticed that the problem doesn't happen with the launcher-invocation either anymore. What I did in the meantime is delete the downloaded buckminster install in hudson and let it re-fetch it. This was done with JDK 1.6.

I now switched back to using JDK 1.5 in hudson and let it build and then it failed again. Now it also fails when I switch back to using JDK 1.6. It almost looks like something gets broken in the buckminster installation itself.

After moving the downloaded buckminster directory out of the way and letting hudson refetch it with JDK 1.6 being enabled it builds with JDK 1.6. When
I now execute the mentioned two commands with the launcher it also works.

So I tested execute with a commands.txt containg the two commands, works too. As last I used the complete commands.txt containing import, build, site.p2 and a product-zip and that too works.

So to conclude: I can only reproduce the problem when running the build from inside hudson. I'll compare the environements between hudson and my terminal on monday to check if there's any difference there.
Re: Running Buckminster via java -jar fails to import with JDK 1.5 [message #533875 is a reply to message #533602] Mon, 17 May 2010 11:10 Go to previous messageGo to next message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 15
Registered: July 2009
Junior Member
Andreas Pakulat wrote on Fri, 14 May 2010 12:45
Thanks for the response,
Johannes Utzig wrote on Fri, 14 May 2010 11:30

Can you try running the buckminster script and
point it to the exact same JDK as in your build? i.e.
buckminster -vm /home/andreas/.hudson/tools/1.5_JDK/bin/java ...
Just to narrow it down if it's an issue with the java version or
something else.



So to conclude: I can only reproduce the problem when running the build from inside hudson. I'll compare the environements between hudson and my terminal on monday to check if there's any difference there.


I've tried to replicate the exact environment in a terminal session, but the import with 1.5 JDK and buckminster 3.6 still works. I've also tried the installation of buckminster
the same way that hudson does it with no luck.

The only thing I could not replicate in the terminal is an envvar that shows up in the hudson log as "PATH+JDK=<jdk>/bin". Does anybody have an idea how I can further debug that?
Re: Running Buckminster via java -jar fails to import with JDK 1.5 [message #534529 is a reply to message #533875] Wed, 19 May 2010 12:51 Go to previous message
Andreas Pakulat is currently offline Andreas Pakulat
Messages: 15
Registered: July 2009
Junior Member
Andreas Pakulat wrote on Mon, 17 May 2010 07:10
Andreas Pakulat wrote on Fri, 14 May 2010 12:45
Thanks for the response,
Johannes Utzig wrote on Fri, 14 May 2010 11:30

Can you try running the buckminster script and
point it to the exact same JDK as in your build? i.e.
buckminster -vm /home/andreas/.hudson/tools/1.5_JDK/bin/java ...
Just to narrow it down if it's an issue with the java version or
something else.



So to conclude: I can only reproduce the problem when running the build from inside hudson. I'll compare the environements between hudson and my terminal on monday to check if there's any difference there.


I've tried to replicate the exact environment in a terminal session, but the import with 1.5 JDK and buckminster 3.6 still works. I've also tried the installation of buckminster
the same way that hudson does it with no luck.

The only thing I could not replicate in the terminal is an envvar that shows up in the hudson log as "PATH+JDK=<jdk>/bin". Does anybody have an idea how I can further debug that?


I think I've done something wrong with the "do the buckminster installation like hudson" part, at least I can now 100% reproduce the issue with these steps:
> export JAVA_HOME=$HOME/.hudson/tools/1.5_JDK
> export PATH=$JAVA_HOME/bin:$PATH
> wget http://download.eclipse.org/tools/buckminster/products/director_latest.zip
> unzip director_latest.zip
> ./director/director -vm /home/andreas/.hudson/tools/1.5_JDK/bin/java -d $PWD/buckminster -p Buckminster -r "http://download.eclipse.org/tools/buckminster/headless-3.6, http://download.eclipse.org/tools/buckminster/headless-3.6/, http://download.cloudsmith.com/buckminster/external-3.6" -installIU "org.eclipse.equinox.p2.director.feature.feature.group, org.eclipse.buckminster.psf.feature.feature.group, org.eclipse.buckminster.emma.headless.feature.feature.group, org.eclipse.buckminster.pde.headless.feature.feature.group, org.eclipse.buckminster.subclipse.headless.feature.feature.group, org.eclipse.buckminster.maven.headless.feature.feature.group, org.eclipse.buckminster.cmdline.product, org.eclipse.buckminster.core.headless.feature.feature.group, org.eclipse.buckminster.git.headless.feature.feature.group, org.eclipse.buckminster.cvs.headless.feature.feature.group"
> /home/andreas/.hudson/tools/1.5_JDK/bin/java -Dbuckminster.output.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.output -Dbuckminster.temp.root=/home/andreas/.hudson/jobs/rcp/workspace/buckminster.temp -jar $PWD/buckminster/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar -application org.eclipse.buckminster.cmdline.headless -data /home/andreas/.hudson/jobs/rcp/workspace --loglevel info -S /home/andreas/.hudson/jobs/rcp/workspace/commands.txt
Previous Topic:Re: [buckminster-dev] Relative URI for local readerType in provider search path
Next Topic:replace a plugin in buckminster
Goto Forum:
  


Current Time: Mon Oct 20 22:54:57 GMT 2014

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

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