Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Buckminster » Materializing workspace stops: "The target file is in an invalid format and could not be opene
Materializing workspace stops: "The target file is in an invalid format and could not be opene [message #656807] Mon, 28 February 2011 12:01 Go to previous message
Martin  ch is currently offline Martin ch
Messages: 2
Registered: February 2011
Junior Member
Preamble :
- I'm new to eclipse
- I'm new to buckminster
- i''m quite new to java (wrote my last code in the late millenium)

I've got the job to build a p2-site for some already existing plugins and features. After some weeks of struggling and desperation I've managed to understand what a BOM is good for. I created it with Eclipse following the instructions from the BuckyBook. Now I've got stuck. When I want to materialize my workspace :

buckminster --loglevel DEBUG -data /tmp/mausi importtargetdefinition my_bom.bom

I get the message :

"The target file is in an invalid format and could not be opened"

Only 1 (one) Google hit : the source code which generates this message. (ok, now there are two Wink ).

I'm using the last eclipse version (3.6.1), and also the most recent buckminster 3.6.

The message is generated by 'org/eclipse/pde/internal/core/target/TargetDefinitionPersis tenceHelper.java', method 'initWithXML'. I've changed the source code to get some information. The changed source code :

DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
StackTraceElement[] trace = new Throwable().getStackTrace();
System.out.println(" ************************************************************ ************* ");
System.out.println("Start of desperation : ");
System.out.println("definition : " + definition);
System.out.println("InputStream : " + input);
parser.setErrorHandler(new DefaultHandler());
Document doc = parser.parse(new InputSource(input));
System.out.println("Document : " + doc);
Element root = doc.getDocumentElement();
System.out.println("root : " + root);
System.out.println(root.getNodeName ());
if (!root.getNodeName().equalsIgnoreCase(ROOT)) {
System.out.println("root.getNodeName :" + root.getNodeName ());
System.out.println("ROOT :" + ROOT);
for(int i=1; i<trace.length; i++){
System.out.println(trace[i]);
}
throw new CoreException(new Status(IStatus.ERROR, PDECore.PLUGIN_ID, Messages.TargetDefinitionPersistenceHelper_0));
}

And here is the output :

importtargetdefinition 'my_bom.bom'
************************************************************ *************
Start of desperation :
definition : No Name
No containers
Env: null/null/null/null
JRE: null
Args: null/null
Implicit: null
Handle: 1298909553509.target
InputStream : java.io.FileInputStream@491cc367
Document : [#document: null]
root : [md:billOfMaterials: null]
md:billOfMaterials
root.getNodeName :md:billOfMaterials
ROOT :target
org.eclipse.buckminster.pde.commands.ImportTargetDefinition. internalRun(ImportTargetDefinition.java:122)
org.eclipse.buckminster.core.commands.WorkspaceCommand.run(W orkspaceCommand.java:91)
org.eclipse.buckminster.cmdline.AbstractCommand.basicRun(Abs tractCommand.java:194)
org.eclipse.buckminster.cmdline.Headless.run(Headless.java:3 17)
org.eclipse.buckminster.cmdline.Headless.run(Headless.java:1 36)
org.eclipse.buckminster.cmdline.Headless.start(Headless.java :156)
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 620)
org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
org.eclipse.equinox.launcher.Main.run(Main.java:1408)
org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Doing full workspace refresh
Waiting for jobs to end
The target file is in an invalid format and could not be opened.

A work-mate tried to do the very same task, and got the very same error message.
Just checking out our source code via cquery works like a charm.

It doesn't matter how big the BOM is. Even an empty BOM (just build an empty feature) behaves the same way.

The big question is : Why does buckminster generate a BOM which can't be read by headless buckminster ?

Thanx in advance !
Martin

 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Buckminster SVN [SOLVED]
Next Topic:Buckminster SVN uri
Goto Forum:
  


Current Time: Tue May 21 17:40:51 EDT 2013

Powered by FUDForum. Page generated in 0.01688 seconds