Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 466692

Summary: IOException on semantic resource drop in a Modeling Project
Product: [Modeling] Sirius Reporter: Esteban DUGUEPEROUX <esteban.dugueperoux>
Component: CoreAssignee: Esteban DUGUEPEROUX <esteban.dugueperoux>
Status: CLOSED FIXED QA Contact: Maxime Porhel <maxime.porhel>
Severity: normal    
Priority: P3 CC: maxime.porhel
Version: unspecifiedKeywords: triaged
Target Milestone: 3.0.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/47417
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4d528ba673a18bf82fed7d0aaded7edbed196422
Whiteboard:
Attachments:
Description Flags
SavingPolicyTest none

Description Esteban DUGUEPEROUX CLA 2015-05-07 05:00:19 EDT
In our Sirius based product, we have our own SavingPolicy which inherits of org.eclipse.sirius.business.api.session.SavingPolicyImpl and with following scenario have a exception :

1. Create a Modeling Project
2. Drop a semantic model of a "big size", more than 5MB, for example reverse1.ecore from EcoreTools performance plugins.
3. And after semantic resource attachment and session saving we get the following exception :


java.io.IOException: PUT failed with HTTP response code 405
	at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1003)
	at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.doSave(ResourceSetSync.java:530)
	at org.eclipse.sirius.common.tools.api.resource.ResourceSetSync.save(ResourceSetSync.java:482)
	at org.eclipse.sirius.business.api.session.AbstractSavingPolicy.save(AbstractSavingPolicy.java:58)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$1.run(DAnalysisSessionImpl.java:785)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:795)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.wrappedSave(Saver.java:144)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.access$0(Saver.java:133)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver$1.run(Saver.java:121)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2225)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.saveNow(Saver.java:118)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.transactionClosed(Saver.java:84)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$LifecycleImpl.fireLifecycleEvent(TransactionalEditingDomainImpl.java:1383)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl$LifecycleImpl.transactionClosed(TransactionalEditingDomainImpl.java:1401)
	at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:733)
	at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:474)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:155)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
	at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
	at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
	at org.eclipse.sirius.business.internal.modelingproject.manager.AttachSemanticResourcesJob.run(AttachSemanticResourcesJob.java:69)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Eclipse Genie CLA 2015-05-07 05:02:40 EDT
New Gerrit change created: https://git.eclipse.org/r/47417
Comment 3 Esteban DUGUEPEROUX CLA 2015-05-07 06:55:19 EDT
Fixed.
Comment 4 Maxime Porhel CLA 2015-05-22 09:18:08 EDT
Created attachment 253678 [details]
SavingPolicyTest
Comment 5 Maxime Porhel CLA 2015-05-22 09:30:52 EDT
Validated on Sirius 3.0.0 RC1


Now that the default saving policy has been changed, the attached project can be use to change the saving policy during the session opening. Import it, launch a runtime and play the scenario from comment 1
Comment 6 Pierre-Charles David CLA 2015-06-24 11:17:13 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.