Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Texo - ECore reference to another ECore using archive:(Exception while generating code from ecore file having reference using archive:)
Texo - ECore reference to another ECore using archive: [message #998565] Thu, 10 January 2013 08:49 Go to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi,

I have reference to an ecore model file from another ecore model file using archive: as the protocol. But using archive: protocol gives me below exception

java.lang.IllegalStateException: java.net.MalformedURLException: unknown protocol: archive

More details about the problem is at the below location.

http://www.eclipse.org/forums/index.php/m/998560/#msg_998560

thanks,
Pradeep V.B.
Re: Texo - ECore reference to another ECore using archive: [message #998908 is a reply to message #998565] Fri, 11 January 2013 00:00 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Pradeep,
This is this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=396522

I pushed a new change and published a new build. Can you retry with the latest build?

gr. Martin

On 01/10/2013 09:49 AM, Pradeep Badiger wrote:
> Hi,
>
> I have reference to an ecore model file from another ecore model file using archive: as the protocol. But using archive:
> protocol gives me below exception
>
> java.lang.IllegalStateException: java.net.MalformedURLException: unknown protocol: archive
>
> More details about the problem is at the below location.
>
> http://www.eclipse.org/forums/index.php/m/998560/#msg_998560
>
> thanks,
> Pradeep V.B.
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Texo - ECore reference to another ECore using archive: [message #998970 is a reply to message #998908] Fri, 11 January 2013 04:03 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

I got a below error when i generate code having reference to another ecore file using archive: protocol.


java.lang.IllegalStateException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: Archive entry not found archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel


thanks,
Pradeep V.B.
Re: Texo - ECore reference to another ECore using archive: [message #999032 is a reply to message #998970] Fri, 11 January 2013 07:34 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Pradeep,
Can you print/post the complete stack trace? Then I can check where in texo this occurs.

gr. Martin

On 01/11/2013 05:03 AM, Pradeep Badiger wrote:
> Hi Martin,
>
> I got a below error when i generate code having reference to another ecore file using archive: protocol.
>
>
> java.lang.IllegalStateException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> java.io.IOException: Archive entry not found
> archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel
>
>
> thanks,
> Pradeep V.B.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Texo - ECore reference to another ECore using archive: [message #999042 is a reply to message #999032] Fri, 11 January 2013 08:08 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

Below is the exception stack trace.

!ENTRY org.eclipse.ui 4 0 2013-01-11 09:34:14.494
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:87)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
at org.eclipse.ui.internal.progress.ProgressManager$5.run(ProgressManager.java:960)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:995)
at org.eclipse.ui.internal.progress.ProgressManager.busyCursorWhile(ProgressManager.java:970)
at org.eclipse.ui.internal.progress.ProgressManager.run(ProgressManager.java:1166)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.run(BaseGenerateAction.java:80)
... 28 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: Archive entry not found archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel
at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:99)
at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUris(GenerateCode.java:59)
at org.eclipse.emf.texo.orm.annotator.GenerateModelJPACode.generateFromUris(GenerateModelJPACode.java:38)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:128)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction.generate(BaseGenerateAction.java:108)
at org.eclipse.emf.texo.eclipse.popup.actions.BaseGenerateAction$1.execute(BaseGenerateAction.java:76)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.IllegalStateException: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: Archive entry not found archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel
at org.eclipse.emf.texo.annotations.annotationsmodel.AnnotatedModel.readAnnotatedModel(AnnotatedModel.java:374)
at org.eclipse.emf.texo.annotations.annotationsmodel.AnnotatedModel.getAnnotatedEPackage(AnnotatedModel.java:332)
at org.eclipse.emf.texo.annotations.annotationsmodel.AnnotatedModel.getAnnotatedENamedElement(AnnotatedModel.java:291)
at org.eclipse.emf.texo.generator.AnnotationManager.getAnnotation(AnnotationManager.java:96)
at org.eclipse.emf.texo.modelgenerator.annotator.ModelENamedElementAnnotator.getEPackageModelGenAnnotation(ModelENamedElementAnnotator.java:109)
at org.eclipse.emf.texo.modelgenerator.annotator.ModelEPackageAnnotator.getDependsOn(ModelEPackageAnnotator.java:286)
at org.eclipse.emf.texo.modelgenerator.annotator.ModelEPackageAnnotator.setAnnotationFeatures(ModelEPackageAnnotator.java:151)
at org.eclipse.emf.texo.modelgenerator.annotator.ModelEPackageAnnotator.setAnnotationFeatures(ModelEPackageAnnotator.java:1)
at org.eclipse.emf.texo.generator.AnnotationManager.getAnnotation(AnnotationManager.java:120)
at org.eclipse.emf.texo.generator.AnnotationManager.getAnnotation(AnnotationManager.java:91)
at org.eclipse.emf.texo.generator.ModelAnnotator.annotate(ModelAnnotator.java:83)
at org.eclipse.emf.texo.generator.ModelController.doAnnotate(ModelController.java:84)
at org.eclipse.emf.texo.generator.ModelController.annotate(ModelController.java:63)
at org.eclipse.emf.texo.eclipse.popup.actions.GenerateCode.generateFromUri(GenerateCode.java:78)
... 9 more
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: java.io.IOException: Archive entry not found archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.emf.texo.annotations.annotationsmodel.AnnotatedModel.readAnnotatedModel(AnnotatedModel.java:361)
... 22 more
Caused by: java.io.IOException: Archive entry not found archive:platform:/resource/com.example.model/target/com.example.basemodel.jar!/model/basemodel.annotationsmodel
at org.eclipse.emf.common.archive.ArchiveURLConnection.getInputStream(ArchiveURLConnection.java:304)
at org.eclipse.emf.ecore.resource.impl.ArchiveURIHandlerImpl.createInputStream(ArchiveURIHandlerImpl.java:59)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:350)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1262)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
... 24 more
Re: Texo - ECore reference to another ECore using archive: [message #999061 is a reply to message #999042] Fri, 11 January 2013 08:48 Go to previous messageGo to next message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

I think you have to ignore IOException as well when you dont find the .annotationmodel file for the ecore file but on a condition that it was loaded using archive: protocol.

Does that make sense?

thanks,
Pradeep V.B.
Re: Texo - ECore reference to another ECore using archive: [message #999092 is a reply to message #999061] Fri, 11 January 2013 10:20 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5339
Registered: July 2009
Senior Member
Hi Pradeep,
You are right, I published a new build, can you retry?

gr. Martin

On 01/11/2013 09:48 AM, Pradeep Badiger wrote:
> Hi Martin,
>
> I think you have to ignore IOException as well when you dont find the .annotationmodel file for the ecore file but on a
> condition that it was loaded using archive: protocol.
>
> Does that make sense?
>
> thanks,
> Pradeep V.B.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: Texo - ECore reference to another ECore using archive: [message #999120 is a reply to message #999092] Fri, 11 January 2013 11:34 Go to previous message
Pradeep Badiger is currently offline Pradeep BadigerFriend
Messages: 53
Registered: November 2012
Member
Hi Martin,

I took an update and it is working fine.

thanks for the support Smile

regards,
Pradeep V.B
Previous Topic:Empty line on generated ecore file
Next Topic:WebServiceHandler does not use template method to create EntityManager
Goto Forum:
  


Current Time: Fri Nov 21 02:47:24 GMT 2014

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

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