Skip to main content



      Home
Home » Modeling » Epsilon » Classloading in Workflow Ant Tasks(Workflow tasks possibly cannot be used with classes on plugin class loader)
Classloading in Workflow Ant Tasks [message #1843306] Fri, 23 July 2021 03:36 Go to next message
Eclipse UserFriend
We have a Epsilon Workflow which runs in Eclipse and includes other model-driven components.

We were coming across classloader issues of the following kind:

!MESSAGE class org.eclipse.emf.ecore.impl.EFactoryImpl cannot be cast to class dataStructure.DataStructureFactory (org.eclipse.emf.ecore.impl.EFactoryImpl is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @5c9c7f5b; dataStructure.DataStructureFactory is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @379f1929)


Here, our own implementation tries to use a model registered in the Eclipse environment via ExtensionPoint. It seems Epsilon has previously installed an EFactory in the registry from inside the workflow.

With the factory class loaded by Epsilon workflow on the Ant classloader and the model interface loaded on the plugin class loader, the two cannot connect.

The ant classloader in Eclipse is meant to be disposed after a run finishes, while the plugin classloader on the outside is persistent.

the issues seem to arise when classes are loaded by the ant task first, later the plugin classloader loads them again and objects are subsequently assigned.

I think this scenario will potentially happen for all classes mentioned on the import list of any task in Epsilon workflow. This means to avoid it, it would be necessary to move all the actual functionality outside of the tasks into service objects on the Plugin classloader.

Can anyone here confirm or refute this understanding, please?
Re: Classloading in Workflow Ant Tasks [message #1843310 is a reply to message #1843306] Fri, 23 July 2021 05:00 Go to previous message
Eclipse UserFriend
Hi Jörn,

> It seems Epsilon has previously installed an EFactory in the registry from inside the workflow.

I can't think why Epsilon would do that off the top of my head. Would you be able to put together an example I can use to reproduce this issue?

Best,
Dimitris
Previous Topic:How to get the information of all failures when running the EUnit test?
Next Topic:Compatibility issue between Epsilon and RoboTool
Goto Forum:
  


Current Time: Sat Jul 12 15:26:23 EDT 2025

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

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

Back to the top