Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
This relates to HSTTWO-4704 and HSTTWO-4321
In org.hippoecm.hst.platform.configuration.channel.ChannelUtils#getChannelInfo there is code at the end that can fail :
T parametersInfo = (T) factory.createInvokerProxy(proxyClasses[0].getClassLoader(), invoker, proxyClasses);
The proxyClasses are a combination of the Channel Info class and the Channel Info Mixins, see HSTTWO-4321. However, if there is no hst:channelinfoclass specified, the Channel Info class will be
org.hippoecm.hst.configuration.channel.ChannelInfo
and proxyClasses[0] will refer to this class. This class however is an interface from the hst-api which is part of the shared lib and has the shared classloader as classloader.
Since the mixin classes (proxyClasses[1.....x]) are classes part of the end project, they have the website webapp classloader! As a result,
T parametersInfo = (T) factory.createInvokerProxy(proxyClasses[0].getClassLoader(), invoker, proxyClasses);
will fail because the shared class loader doesn't see the mixin classes.
Instead of proxyClasses[0].getClassLoader(), always the website classloader should be used since that one can also see the shared classes
Attachments
Issue Links
- relates to
-
CMS-12822 ChannelInfoMixins from a channel node are not read if there is no channelInfo property
- Closed
-
HSTTWO-4321 Mixin Types Option for ChannelInfo instead of inheritance
- Closed