Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 17:01 Go to next message
Martin  ch is currently offline Martin chFriend
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

Re: Materializing workspace stops: "The target file is in an invalid format and could not be o [message #656856 is a reply to message #656807] Mon, 28 February 2011 18:50 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Normally there is no need to use a BOM (it is an intermediate result).
In the typical scenario a CQUERY is used and if there are other
requirements than "binaries goes to target platform, source goes to
workspace" an MSPEC is also required.

If you use a CQUERY in your IDE, you probably want to do exactly the
same using the headless Buckminster.

Regards
- henrik
On 2/28/11 6:01 PM, Martin ch wrote:
> 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 ;) ).
>
> 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 : mailto: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
>
>
Re: Materializing workspace stops: "The target file is in an invalid format and could not be o [message #656937 is a reply to message #656856] Tue, 01 March 2011 04:59 Go to previous messageGo to next message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
Hi Martin,

A "target definition" in this context, is an Eclipse PDE target
definition file, i.e. a file that you get by defining a target platform
and then exporting it. It would normally have the file extension .target.

A BOM, although related, is something else. The BOM is a Buckminster
specific file that contains the complete set of materials that Bucky
found during a resolution and want to download and materialize into your
worskpace or into your target platform.

'importtargetdefinition' is intended for the PDE target definition file,
not for the BOM. For BOM's, or CQUERY's as Henrik suggests, you should
use the 'import' command.

HTH,
Thomas Hallgren


On 2011-02-28 19:50, Henrik Lindberg wrote:
> Normally there is no need to use a BOM (it is an intermediate result).
> In the typical scenario a CQUERY is used and if there are other
> requirements than "binaries goes to target platform, source goes to
> workspace" an MSPEC is also required.
>
> If you use a CQUERY in your IDE, you probably want to do exactly the
> same using the headless Buckminster.
>
> Regards
> - henrik
> On 2/28/11 6:01 PM, Martin ch wrote:
>> 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 ;) ).
>>
>> 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 : mailto: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
>>
>>
>
Re: Materializing workspace stops: "The target file is in an invalid format and could not be o [message #656965 is a reply to message #656856] Tue, 01 March 2011 08:23 Go to previous message
Martin  ch is currently offline Martin chFriend
Messages: 2
Registered: February 2011
Junior Member
Thanks for your replys !

Think I've missunderstood the concept how buckminster works. Will try again from scratch
Previous Topic:Buckminster SVN [SOLVED]
Next Topic:Buckminster SVN uri
Goto Forum:
  


Current Time: Sat Apr 20 00:31:53 GMT 2024

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

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

Back to the top