Cannot be cast to class because they are in unnamed module of loader 'app'

I had a similar case, and (as mentioned by @Holger in the comment) the module info in the message is simply misleading - this is an actual case of trying to cast something to something that doesn't match it.

In your case, ClientImpl simply is not a subtype of XigniteCurrenciesSoap.


The stacktrace is trying to tell you that you have casted XigniteCurrenciesSoap to ClientImpl.

Such as the example below:

Object returnObj= getXigniteCurrenciesSoap();
return (ClientImpl) returnObj;

You have to find out where you did that in your code and fix it.