Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » SERIALIZATION
SERIALIZATION [message #662905] Fri, 01 April 2011 12:45 Go to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
Hi,

Sorry for my english language.
I trying to serialize an instance of my model by using this part of java code :

ResourceSet rs = new ResourceSetImpl();
rs.getResourceFactoryRegistry().getExtensionToFactoryMap().p ut(
Resource.Factory.Registry.DEFAULT_EXTENSION,
new PerformantXMIResourceFactoryImpl());
URI uri = URI.createURI("file:/c:svn/defSerForModelVersion1.ecore");
Resource resource = rs.createResource(uri);

resource.getContents().add(table);
resource.getContents().add(lien);

try { resource.save(null);
System.out.println("saved");
}catch (IOException e)
{
System.out.println("failed to write " + uri);
}

After runninf this program, i have a xmi file called : " vdefSerForModelVersion1.ecore "
but if i want open this file with sample ecore model editor, a window appear which notice :


org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://mm.data/1.0' not found. (platform:/resource/test/svn/defSerForModelVersion1.ecore, 3, 71)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createModelGe n(EcoreEditor.java:1062)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createModel(E coreEditor.java:1082)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createPages(E coreEditor.java:1147)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:348)
at org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2863
i don't understand why i have this problem. this file is important for to build an instance of my model in GMF.

someone can helpe me please.

Best regards.

[Updated on: Fri, 01 April 2011 12:45]

Report message to a moderator

Re: SERIALIZATION [message #662906 is a reply to message #662905] Fri, 01 April 2011 12:45 Go to previous messageGo to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
ben wrote on Fri, 01 April 2011 08:45
Hi,

Sorry for my english language.
I trying to serialize an instance of my model by using this part of java code :

ResourceSet rs = new ResourceSetImpl();
rs.getResourceFactoryRegistry().getExtensionToFactoryMap().p ut(
Resource.Factory.Registry.DEFAULT_EXTENSION,
new PerformantXMIResourceFactoryImpl());
URI uri = URI.createURI("file:/c:svn/defSerForModelVersion1.ecore");
Resource resource = rs.createResource(uri);

resource.getContents().add(table);
resource.getContents().add(lien);

try { resource.save(null);
System.out.println("saved");
}catch (IOException e)
{
System.out.println("failed to write " + uri);
}

After runninf this program, i have a xmi file called : " vdefSerForModelVersion1.ecore "
but if i want open this file with sample ecore model editor, a window appear which notice :


org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://mm.data/1.0' not found. (platform:/resource/test/svn/defSerForModelVersion1.ecore, 3, 71)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createModelGe n(EcoreEditor.java:1062)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createModel(E coreEditor.java:1082)
at org.eclipse.emf.ecore.presentation.EcoreEditor.createPages(E coreEditor.java:1147)
at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:348)
at org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:289)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2863
i don't understand why i have this problem. this file is important for to build an instance of my model in GMF.

someone can helpe me please.

Best regards.

Re: SERIALIZATION [message #662967 is a reply to message #662905] Fri, 01 April 2011 15:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Ben,

Comments below.

ben wrote:
> Hi,
>
> Sorry for my english language.
It's better than my French. :-P
> I trying to serialize an instance of my model by using this part of
> java code :
>
> ResourceSet rs = new ResourceSetImpl();
> rs.getResourceFactoryRegistry().getExtensionToFactoryMap().p ut(
> Resource.Factory.Registry.DEFAULT_EXTENSION,
> new PerformantXMIResourceFactoryImpl());
> URI uri =
> URI.createURI("file:/c:svn/defSerForModelVersion1.ecore");
Hmmm. Don't you want c:/svn?
> Resource resource = rs.createResource(uri);
>
> resource.getContents().add(table);
> resource.getContents().add(lien);
What are these? Why are they going into a *.ecore resource?
>
> try { resource.save(null);
> System.out.println("saved");
> }catch (IOException e)
> {
> System.out.println("failed to write " + uri);
> }
>
> After runninf this program, i have a xmi file called : "
> vdefSerForModelVersion1.ecore "
> but if i want open this file with sample ecore model editor, a window
> appear which notice :
>
>
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos
> ticWrappedException:
> org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri
> 'http://mm.data/1.0' not found.
> (platform:/resource/test/svn/defSerForModelVersion1.ecore, 3, 71)
There's a FAQ about this exception.
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe
> mandLoadException(ResourceSetImpl.java:315)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> adHelper(ResourceSetImpl.java:274)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou
> rce(ResourceSetImpl.java:397)
> at org.eclipse.emf.ecore.presentation.EcoreEditor.createModelGe
> n(EcoreEditor.java:1062)
> at org.eclipse.emf.ecore.presentation.EcoreEditor.createModel(E
> coreEditor.java:1082)
> at org.eclipse.emf.ecore.presentation.EcoreEditor.createPages(E
> coreEditor.java:1147)
> at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu
> ltiPageEditorPart.java:348)
> at org.eclipse.ui.internal.EditorReference.createPartHelper(Edi
> torReference.java:670)
> at org.eclipse.ui.internal.EditorReference.createPart(EditorRef
> erence.java:465)
> at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb
> enchPartReference.java:595)
> at org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe
> rence.java:289)
> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(
> WorkbenchPage.java:2863
> i don't understand why i have this problem. this file is important for
> to build an instance of my model in GMF.
Is the package for this model (table) installed in the IDE in which
you're trying to open the file?
>
> someone can helpe me please.
>
> Best regards.
Re: SERIALIZATION [message #663156 is a reply to message #662967] Mon, 04 April 2011 07:16 Go to previous messageGo to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
Ed,

I am trying to reply your question.

>Hmmm. Don't you want c:/svn?

i use the folder svn because i want juste to put my serilalized file with extension *.ecore to build the GMF.

>resource.getContents().add(table);
>resource.getContents().add(lien);
>What are these? Why are they going into a *.ecore resource?

in this part, i put the the obejects table and lien into my resource. i use the *.ecore for building GMF after serialization.

>Is the package for this model (table) installed in the IDE in which you're trying to open the file?

Yes , the package for this model (table) is installed in the same IDE where i am trying to open yhe file
even if i use another extension , i have a same problelm.

if you don't understand me, i give u a more details of my projects.

Best Regards
Ben

Re: SERIALIZATION [message #663306 is a reply to message #663156] Mon, 04 April 2011 14:58 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Ben,

Comments below.

ben wrote:
> Ed,
>
> I am trying to reply your question.
>
>> Hmmm. Don't you want c:/svn?
>
> i use the folder svn because i want juste to put my serilalized file
> with extension *.ecore to build the GMF.
My question was about the lack of a / after the c: in the URI. That
doesn't look right to me. It's liable to be interpreted as c:./svn,
i.e., relative to the current directory for the c drive.
>
>> resource.getContents().add(table);
>> resource.getContents().add(lien);
>> What are these? Why are they going into a *.ecore resource?
>
> in this part, i put the the obejects table and lien into my resource.
> i use the *.ecore for building GMF after serialization.
Why. Normally that only contains EPackage instances.
>
>> Is the package for this model (table) installed in the IDE in which
>> you're trying to open the file?
>
> Yes , the package for this model (table) is installed in the same IDE
> where i am trying to open yhe file
> even if i use another extension , i have a same problelm.
Is the nsURI for that package properly registered in the plugin.xml?
>
> if you don't understand me, i give u a more details of my projects.
You've read the FAQ about this exception?
>
> Best Regards
> Ben
>
>
Re: SERIALIZATION [message #663461 is a reply to message #663306] Tue, 05 April 2011 08:16 Go to previous messageGo to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
Hi
i have read the FAQ about this exception and i have make some modification, but i have still a same problem.

>My question was about the lack of a / after the c: in the URI. That doesn't look right to me. It's liable to be interpreted as c:./svn, i.e., relative to the current directory for the c drive.

i have resolve this part. Now i use :
URI uri = URI.createPlatformResourceURI("/project/model.xmi", true);
to create my resource.

>resource.getContents().add(table);
> resource.getContents().add(lien);

try { resource.save(null);
System.out.println("saved");
}
catch (IOException e)
{System.out.println("failed to write " + uri);
}

table is an instance of object of class 'TABLE'. TABLE is an eclass.that's why i use resource.
and then i persist and i have xmi file model.xmi

that's is part of my plugin.xml
<plugin>

<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri="http://mm.data/1.0"
class="mm.data.DataPackage"
genModel="model/modelgeneration.genmodel"/>
</extension>

</plugin>

the nsURI is a same for the package.
The main purpose is to have an instance of my model and then persisted the model to build an gmf.

Regards


Re: SERIALIZATION [message #663574 is a reply to message #663461] Tue, 05 April 2011 16:27 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Ben,

Comments below.

ben wrote:
> Hi i have read the FAQ about this exception and i have make some
> modification, but i have still a same problem.
>
>> My question was about the lack of a / after the c: in the URI. That
>> doesn't look right to me. It's liable to be interpreted as c:./svn,
>> i.e., relative to the current directory for the c drive.
>
> i have resolve this part. Now i use :
> URI uri = URI.createPlatformResourceURI("/project/model.xmi", true);
> to create my resource.
That seems better.
>
>> resource.getContents().add(table);
>> resource.getContents().add(lien);
>
> try { resource.save(null);
> System.out.println("saved");
> }
> catch (IOException e)
> {System.out.println("failed to write " + uri);
> }
>
> table is an instance of object of class 'TABLE'. TABLE is an
> eclass.that's why i use resource.
> and then i persist and i have xmi file model.xmi
>
> that's is part of my plugin.xml
> <plugin>
>
> <extension point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http://mm.data/1.0"
> class="mm.data.DataPackage"
> genModel="model/modelgeneration.genmodel"/>
> </extension>
>
> </plugin>
>
> the nsURI is a same for the package.
> The main purpose is to have an instance of my model and then
> persisted the model to build an gmf.
If the bundle for with this extension is installed, I can't think of any
reason why the package wouldn't be found. So my guess would be it's not
properly installed in your IDE.
>
> Regards
>
>
>
Re: SERIALIZATION [message #663694 is a reply to message #663574] Wed, 06 April 2011 08:39 Go to previous messageGo to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
HI Ed,

Thank you for your help, i start to understand where my problem.
You have talked about the bundle which i have need to install in my IDE.
Can you explain me please, wich bundle have i need to my install in my IDE.
i show u my MANIFEST.MF. i thought that i had the necessary.

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: datamodeling;singleton:=true
Bundle-Version: 1.0.0
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
org.eclipse.emf.ecore.xmi.source;bundle-version="2.5.0"
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.emf.ecore.xmi,
org.eclipse.emf.ecore.xmi.impl,
org.eclipse.swt.widgets

Thanh you in advance

Best regards
Re: SERIALIZATION [message #663810 is a reply to message #663694] Wed, 06 April 2011 14:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Ben,

How are you installing your bundle? The p2 installer would normally
tell you if there are any problem with dependencies. Running -clean
-debug and looking at the <workspace>/.metadata/.log will show
information about whether your bundle is properly installed or has
dependency problems that disable it.


ben wrote:
> HI Ed,
>
> Thank you for your help, i start to understand where my problem.
> You have talked about the bundle which i have need to install in my IDE.
> Can you explain me please, wich bundle have i need to my install in
> my IDE.
> i show u my MANIFEST.MF. i thought that i had the necessary.
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: %pluginName
> Bundle-SymbolicName: datamodeling;singleton:=true
> Bundle-Version: 1.0.0
> Bundle-ClassPath: .
> Bundle-Vendor: %providerName
> Bundle-Localization: plugin
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
> Require-Bundle: org.eclipse.core.runtime,
> org.eclipse.emf.ecore;visibility:=reexport,
> org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
> org.eclipse.emf.ecore.xmi.source;bundle-version="2.5.0"
> Bundle-ActivationPolicy: lazy
> Import-Package: org.eclipse.emf.ecore.xmi,
> org.eclipse.emf.ecore.xmi.impl,
> org.eclipse.swt.widgets
>
> Thanh you in advance
>
> Best regards
Re: SERIALIZATION [message #664573 is a reply to message #663810] Mon, 11 April 2011 08:53 Go to previous messageGo to next message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
Hi Ed,

Thanks you so much for your help.
you are right, i can't install properly my bundle.
That's why i think, i have this problem.



!SESSION 2011-04-11 10:49:24.060 -----------------------------------------------
eclipse.buildId=M20100909-0800
java.version=1.6.0_24
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.platform.ide
Command-line arguments: -product org.eclipse.platform.ide -data {<workspace>/.metadata/.log} -dev file:C:/Users/becam/workspace/.metadata/.plugins/org.eclipse .pde.core/debug_test/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
!MESSAGE Bundle reference:file:/C:/Users/becam/workspace/datamodeling/ was not resolved.
!SUBENTRY 2 datamodeling 2 0 2011-04-11 10:49:27.681
!MESSAGE Missing required bundle org.eclipse.emf.ecore.xmi.source_2.5.0.

!ENTRY org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
!MESSAGE Bundle datamodeling_1.0.0 [940] was not resolved.
!SUBENTRY 2 datamodeling 2 0 2011-04-11 10:49:27.681
!MESSAGE Missing required bundle org.eclipse.emf.ecore.xmi.source_2.5.0.

!ENTRY org.eclipse.ui.ide 4 4 2011-04-11 10:49:27.852
!MESSAGE Could not obtain lock for workspace location

!ENTRY org.eclipse.ui.ide 4 4 2011-04-11 10:49:27.852
!MESSAGE Could not obtain lock for workspace location
!STACK 0
java.io.IOException: The folder "C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata " is read-only.
at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock (BasicLocation.java:200)
at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock (BasicLocation.java:175)
at org.eclipse.ui.internal.ide.application.IDEApplication.check InstanceLocation(IDEApplication.java:186)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:105)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

!ENTRY org.eclipse.ui.ide 4 0 2011-04-11 10:49:32.361
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop() of bundle org.eclipse.ui.ide.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s top(BundleContextImpl.java:863)
at org.eclipse.osgi.framework.internal.core.BundleHost.stopWork er(BundleHost.java:501)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.susp end(AbstractBundle.java:550)
at org.eclipse.osgi.framework.internal.core.Framework.suspendBu ndle(Framework.java:1097)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d ecFWSL(StartLevelManager.java:597)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:257)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.s hutdown(StartLevelManager.java:215)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundl e.suspend(InternalSystemBundle.java:266)
at org.eclipse.osgi.framework.internal.core.Framework.shutdown( Framework.java:690)
at org.eclipse.osgi.framework.internal.core.Framework.close(Fra mework.java:588)
at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(Ecl ipseStarter.java:415)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.IllegalStateException: The platform metadata area could not be written: C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata. By default the platform writes its content
under the current working directory when the platform is launched. Use the -data parameter to
specify a different content area for the platform.
at org.eclipse.core.internal.runtime.DataArea.assertLocationIni tialized(DataArea.java:61)
at org.eclipse.core.internal.runtime.DataArea.getStateLocation( DataArea.java:125)
at org.eclipse.core.internal.preferences.InstancePreferences.ge tBaseLocation(InstancePreferences.java:44)
at org.eclipse.core.internal.preferences.InstancePreferences.in itializeChildren(InstancePreferences.java:199)
at org.eclipse.core.internal.preferences.InstancePreferences.<init >(InstancePreferences.java:59)
at org.eclipse.core.internal.preferences.InstancePreferences.in ternalCreate(InstancePreferences.java:209)
at org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:289)
at org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:277)
at org.eclipse.core.internal.preferences.PreferencesService.cre ateNode(PreferencesService.java:390)
at org.eclipse.core.internal.preferences.RootPreferences.getChi ld(RootPreferences.java:63)
at org.eclipse.core.internal.preferences.RootPreferences.getNod e(RootPreferences.java:96)
at org.eclipse.core.internal.preferences.RootPreferences.node(R ootPreferences.java:85)
at org.eclipse.core.internal.preferences.legacy.PreferenceForwa rder. <init>(PreferenceForwarder.java:37)
at org.eclipse.core.runtime.Plugin$1.run(Plugin.java:369)
at org.eclipse.core.runtime.Plugin.getPluginPreferences(Plugin. java:372)
at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin .java:393)
at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(A bstractUIPlugin.java:526)
at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin .java:630)
at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop(IDEWorkb enchPlugin.java:329)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:843)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s top(BundleContextImpl.java:836)
... 19 more
Root exception:
java.lang.IllegalStateException: The platform metadata area could not be written: C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata. By default the platform writes its content
under the current working directory when the platform is launched. Use the -data parameter to
specify a different content area for the platform.
at org.eclipse.core.internal.runtime.DataArea.assertLocationIni tialized(DataArea.java:61)
at org.eclipse.core.internal.runtime.DataArea.getStateLocation( DataArea.java:125)
at org.eclipse.core.internal.preferences.InstancePreferences.ge tBaseLocation(InstancePreferences.java:44)
at org.eclipse.core.internal.preferences.InstancePreferences.in itializeChildren(InstancePreferences.java:199)
at org.eclipse.core.internal.preferences.InstancePreferences.<init >(InstancePreferences.java:59)
at org.eclipse.core.internal.preferences.InstancePreferences.in ternalCreate(InstancePreferences.java:209)
at org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:289)
at org.eclipse.core.internal.preferences.EclipsePreferences.cre ate(EclipsePreferences.java:277)
at org.eclipse.core.internal.preferences.PreferencesService.cre ateNode(PreferencesService.java:390)
at org.eclipse.core.internal.preferences.RootPreferences.getChi ld(RootPreferences.java:63)
at org.eclipse.core.internal.preferences.RootPreferences.getNod e(RootPreferences.java:96)
at org.eclipse.core.internal.preferences.RootPreferences.node(R ootPreferences.java:85)
at org.eclipse.core.internal.preferences.legacy.PreferenceForwa rder. <init>(PreferenceForwarder.java:37)
at org.eclipse.core.runtime.Plugin$1.run(Plugin.java:369)
at org.eclipse.core.runtime.Plugin.getPluginPreferences(Plugin. java:372)
at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin .java:393)
at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(A bstractUIPlugin.java:526)
at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin .java:630)
at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop(IDEWorkb enchPlugin.java:329)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2 .run(BundleContextImpl.java:843)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s top(BundleContextImpl.java:836)
at org.eclipse.osgi.framework.internal.core.BundleHost.stopWork er(BundleHost.java:501)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.susp end(AbstractBundle.java:550)
at org.eclipse.osgi.framework.internal.core.Framework.suspendBu ndle(Framework.java:1097)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d ecFWSL(StartLevelManager.java:597)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:257)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.s hutdown(StartLevelManager.java:215)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundl e.suspend(InternalSystemBundle.java:266)
at org.eclipse.osgi.framework.internal.core.Framework.shutdown( Framework.java:690)
at org.eclipse.osgi.framework.internal.core.Framework.close(Fra mework.java:588)
at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(Ecl ipseStarter.java:415)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


But i don't know how to install it now.
Can you give me some indications please.

Thank you in advance.

Regards
Re: SERIALIZATION [message #664649 is a reply to message #664573] Mon, 11 April 2011 13:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26226
Registered: July 2009
Senior Member
Ben,

I don't imagine you need this dependency:
org.eclipse.emf.ecore.xmi.source;bundle-version="2.5.0"

ben wrote:
> Hi Ed,
>
> Thanks you so much for your help.
> you are right, i can't install properly my bundle.
> That's why i think, i have this problem.
>
>
>
> !SESSION 2011-04-11 10:49:24.060
> -----------------------------------------------
> eclipse.buildId=M20100909-0800
> java.version=1.6.0_24
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
> Framework arguments: -product org.eclipse.platform.ide
> Command-line arguments: -product org.eclipse.platform.ide -data
> {<workspace>/.metadata/.log} -dev
> file:C:/Users/becam/workspace/.metadata/.plugins/org.eclipse
> .pde.core/debug_test/dev.properties -os win32 -ws win32 -arch x86
> -consoleLog
>
> !ENTRY org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
> !MESSAGE One or more bundles are not resolved because the following
> root constraints are not resolved:
> !SUBENTRY 1 org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
> !MESSAGE Bundle reference:file:/C:/Users/becam/workspace/datamodeling/
> was not resolved.
> !SUBENTRY 2 datamodeling 2 0 2011-04-11 10:49:27.681
> !MESSAGE Missing required bundle org.eclipse.emf.ecore.xmi.source_2.5.0.
>
> !ENTRY org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
> !MESSAGE The following is a complete list of bundles which are not
> resolved, see the prior log entry for the root cause if it exists:
> !SUBENTRY 1 org.eclipse.osgi 2 0 2011-04-11 10:49:27.681
> !MESSAGE Bundle datamodeling_1.0.0 [940] was not resolved.
> !SUBENTRY 2 datamodeling 2 0 2011-04-11 10:49:27.681
> !MESSAGE Missing required bundle org.eclipse.emf.ecore.xmi.source_2.5.0.
>
> !ENTRY org.eclipse.ui.ide 4 4 2011-04-11 10:49:27.852
> !MESSAGE Could not obtain lock for workspace location
>
> !ENTRY org.eclipse.ui.ide 4 4 2011-04-11 10:49:27.852
> !MESSAGE Could not obtain lock for workspace location
> !STACK 0
> java.io.IOException: The folder
> "C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata
> " is read-only.
> at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock
> (BasicLocation.java:200)
> at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock
> (BasicLocation.java:175)
> at org.eclipse.ui.internal.ide.application.IDEApplication.check
> InstanceLocation(IDEApplication.java:186)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start
> (IDEApplication.java:105)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips
> eAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
> .runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher
> .start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:369)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>
> !ENTRY org.eclipse.ui.ide 4 0 2011-04-11 10:49:32.361
> !MESSAGE !STACK 0
> org.osgi.framework.BundleException: Exception in
> org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop() of bundle
> org.eclipse.ui.ide.
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s
> top(BundleContextImpl.java:863)
> at org.eclipse.osgi.framework.internal.core.BundleHost.stopWork
> er(BundleHost.java:501)
> at org.eclipse.osgi.framework.internal.core.AbstractBundle.susp
> end(AbstractBundle.java:550)
> at org.eclipse.osgi.framework.internal.core.Framework.suspendBu
> ndle(Framework.java:1097)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.d
> ecFWSL(StartLevelManager.java:597)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.d
> oSetStartLevel(StartLevelManager.java:257)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.s
> hutdown(StartLevelManager.java:215)
> at org.eclipse.osgi.framework.internal.core.InternalSystemBundl
> e.suspend(InternalSystemBundle.java:266)
> at org.eclipse.osgi.framework.internal.core.Framework.shutdown(
> Framework.java:690)
> at org.eclipse.osgi.framework.internal.core.Framework.close(Fra
> mework.java:588)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(Ecl
> ipseStarter.java:415)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:198)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by: java.lang.IllegalStateException: The platform metadata area
> could not be written:
> C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata.
> By default the platform writes its content
> under the current working directory when the platform is launched.
> Use the -data parameter to
> specify a different content area for the platform.
> at org.eclipse.core.internal.runtime.DataArea.assertLocationIni
> tialized(DataArea.java:61)
> at org.eclipse.core.internal.runtime.DataArea.getStateLocation(
> DataArea.java:125)
> at org.eclipse.core.internal.preferences.InstancePreferences.ge
> tBaseLocation(InstancePreferences.java:44)
> at org.eclipse.core.internal.preferences.InstancePreferences.in
> itializeChildren(InstancePreferences.java:199)
> at org.eclipse.core.internal.preferences.InstancePreferences.<init
> >(InstancePreferences.java:59)
> at org.eclipse.core.internal.preferences.InstancePreferences.in
> ternalCreate(InstancePreferences.java:209)
> at org.eclipse.core.internal.preferences.EclipsePreferences.cre
> ate(EclipsePreferences.java:289)
> at org.eclipse.core.internal.preferences.EclipsePreferences.cre
> ate(EclipsePreferences.java:277)
> at org.eclipse.core.internal.preferences.PreferencesService.cre
> ateNode(PreferencesService.java:390)
> at org.eclipse.core.internal.preferences.RootPreferences.getChi
> ld(RootPreferences.java:63)
> at org.eclipse.core.internal.preferences.RootPreferences.getNod
> e(RootPreferences.java:96)
> at org.eclipse.core.internal.preferences.RootPreferences.node(R
> ootPreferences.java:85)
> at org.eclipse.core.internal.preferences.legacy.PreferenceForwa
> rder. <init>(PreferenceForwarder.java:37)
> at org.eclipse.core.runtime.Plugin$1.run(Plugin.java:369)
> at org.eclipse.core.runtime.Plugin.getPluginPreferences(Plugin.
> java:372)
> at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin
> .java:393)
> at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(A
> bstractUIPlugin.java:526)
> at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin
> .java:630)
> at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop(IDEWorkb
> enchPlugin.java:329)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2
> .run(BundleContextImpl.java:843)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s
> top(BundleContextImpl.java:836)
> ... 19 more
> Root exception:
> java.lang.IllegalStateException: The platform metadata area could not
> be written:
> C:\Users\becam\Desktop\eclipse\{<workspace>\.metadata\.log}\.metadata.
> By default the platform writes its content
> under the current working directory when the platform is launched.
> Use the -data parameter to
> specify a different content area for the platform.
> at org.eclipse.core.internal.runtime.DataArea.assertLocationIni
> tialized(DataArea.java:61)
> at org.eclipse.core.internal.runtime.DataArea.getStateLocation(
> DataArea.java:125)
> at org.eclipse.core.internal.preferences.InstancePreferences.ge
> tBaseLocation(InstancePreferences.java:44)
> at org.eclipse.core.internal.preferences.InstancePreferences.in
> itializeChildren(InstancePreferences.java:199)
> at org.eclipse.core.internal.preferences.InstancePreferences.<init
> >(InstancePreferences.java:59)
> at org.eclipse.core.internal.preferences.InstancePreferences.in
> ternalCreate(InstancePreferences.java:209)
> at org.eclipse.core.internal.preferences.EclipsePreferences.cre
> ate(EclipsePreferences.java:289)
> at org.eclipse.core.internal.preferences.EclipsePreferences.cre
> ate(EclipsePreferences.java:277)
> at org.eclipse.core.internal.preferences.PreferencesService.cre
> ateNode(PreferencesService.java:390)
> at org.eclipse.core.internal.preferences.RootPreferences.getChi
> ld(RootPreferences.java:63)
> at org.eclipse.core.internal.preferences.RootPreferences.getNod
> e(RootPreferences.java:96)
> at org.eclipse.core.internal.preferences.RootPreferences.node(R
> ootPreferences.java:85)
> at org.eclipse.core.internal.preferences.legacy.PreferenceForwa
> rder. <init>(PreferenceForwarder.java:37)
> at org.eclipse.core.runtime.Plugin$1.run(Plugin.java:369)
> at org.eclipse.core.runtime.Plugin.getPluginPreferences(Plugin.
> java:372)
> at org.eclipse.core.runtime.Plugin.savePluginPreferences(Plugin
> .java:393)
> at org.eclipse.ui.plugin.AbstractUIPlugin.savePreferenceStore(A
> bstractUIPlugin.java:526)
> at org.eclipse.ui.plugin.AbstractUIPlugin.stop(AbstractUIPlugin
> .java:630)
> at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.stop(IDEWorkb
> enchPlugin.java:329)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2
> .run(BundleContextImpl.java:843)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.eclipse.osgi.framework.internal.core.BundleContextImpl.s
> top(BundleContextImpl.java:836)
> at org.eclipse.osgi.framework.internal.core.BundleHost.stopWork
> er(BundleHost.java:501)
> at org.eclipse.osgi.framework.internal.core.AbstractBundle.susp
> end(AbstractBundle.java:550)
> at org.eclipse.osgi.framework.internal.core.Framework.suspendBu
> ndle(Framework.java:1097)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.d
> ecFWSL(StartLevelManager.java:597)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.d
> oSetStartLevel(StartLevelManager.java:257)
> at org.eclipse.osgi.framework.internal.core.StartLevelManager.s
> hutdown(StartLevelManager.java:215)
> at org.eclipse.osgi.framework.internal.core.InternalSystemBundl
> e.suspend(InternalSystemBundle.java:266)
> at org.eclipse.osgi.framework.internal.core.Framework.shutdown(
> Framework.java:690)
> at org.eclipse.osgi.framework.internal.core.Framework.close(Fra
> mework.java:588)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(Ecl
> ipseStarter.java:415)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS
> tarter.java:198)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>
>
> But i don't know how to install it now.
> Can you give me some indications please.
>
> Thank you in advance.
>
> Regards
>
Re: SERIALIZATION [message #664668 is a reply to message #664649] Mon, 11 April 2011 14:49 Go to previous message
ben  is currently offline ben Friend
Messages: 30
Registered: April 2011
Location: France/Bordeaux
Member
Hi Ed,

Now that is ok, i had fixed my bundle problem.
i can open now my serialized file.

Thank you so much for your help. Smile

regards
Previous Topic:losing eContainer when adding EObject to an ArrayList
Next Topic:[CDO] OCL query and deleted objects
Goto Forum:
  


Current Time: Thu Nov 27 00:41:50 GMT 2014

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

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