Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » casting EObject in java service failed
casting EObject in java service failed [message #1853713] Thu, 14 July 2022 13:08 Go to next message
AMir Taghizadegan is currently offline AMir TaghizadeganFriend
Messages: 32
Registered: May 2022
Member
Hello,
i have written the following service:
public EObject myService(EObject self, String arg) {
		// TODO Auto-generated code
		System.out.println(((EEDImpl)self).getApplications().size());
		
		return self;
	}


I get the following error message:

class autoDesigner1.impl.EEDImpl cannot be cast to class autoDesigner1.impl.EEDImpl (autoDesigner1.impl.EEDImpl is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @2c4b14be; autoDesigner1.impl.EEDImpl is in unnamed module of loader 'app')


Can someone help me?

[Updated on: Thu, 14 July 2022 13:08]

Report message to a moderator

Re: casting EObject in java service failed [message #1853729 is a reply to message #1853713] Fri, 15 July 2022 06:47 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

This would suggest that you have two copies of the EEDImpl class loaded by different class loaders. This can be caused by complex classpath inconsistencies between different plugins or inappropriate Java recompiles. The post Java 8 support for a modulepath creates a variety of problems that I don't understand. I have just observed that bleeding edge Java users can have an exciting time as these issues are fixed. I try to stick to Java 8 although use of Java 11 is becoming mandatory now with the Eclipse IDE.

Regards

Ed Willink
Previous Topic:Set element to readonly
Next Topic:Propertiesview of sirius-web showing elements of other documents in the same project
Goto Forum:
  


Current Time: Tue Jul 23 05:34:18 GMT 2024

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

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

Back to the top