You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface XXX cannot be implemented more than once with different arguments.
implements ContainerRenderer<C, T> was causing Render to be implement more than once. It is currently removed from class AbstractJsonViewContainerRenderer<C,T>
which resulted in a deeper rabbit hole with Groovy Traits called from Java:
Caused by:
java.lang.NoClassDefFoundError: grails/web/mime/MimeTypeProvider$Trait$Helper
at org.grails.plugins.databinding.DataBindingConfiguration.xmlDataBindingSourceCreator(DataBindingConfiguration.java:68)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:171)
... 45 more
Caused by:
java.lang.ClassNotFoundException: grails.web.mime.MimeTypeProvider$Trait$Helper
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
... 47 more (edited)
I looked into this one. It's tough. It's Java code DataBindingUtils.java calling the groovy code that's failing.
Here's the grails-views code before 7.0 code:
abstract class AbstractJsonViewContainerRenderer<C,T> extends DefaultJsonRenderer<T> implements ContainerRenderer<C, T>
By specifying both interfaces, it means there are 2 identical methods returning different values. This isn't supported by Groovy 4. It's only supported by traits and loading the Groovy Object from Java code is failling. In groovy 3, it would have picked just the last interface when a method conflicts.
Maybe we shouldn't use generics, that's how others like this are working:
class AtomCollectionRenderer extends AtomRenderer implements ContainerRenderer
The interface XXX cannot be implemented more than once with different arguments.
implements ContainerRenderer<C, T> was causing Render to be implement more than once. It is currently removed from class AbstractJsonViewContainerRenderer<C,T>
https://github.com/grails/grails-views/pull/581/files#diff-b2646b6110b34798952582e9a501678112c0ed5d810ac556902857099652a31e
The text was updated successfully, but these errors were encountered: