Mein Liferay 7-Server hat SomeModule
verwendet, bis ich eine neue Version von SomeModule
bereitgestellt habe, die ein zusätzliches erforderliches Feld favoriteColor
enthält.Attribut ist erforderlich, aber nicht gesetzt (kann keine Snapshot-Klasse für die Schnittstelle erstellen)
Nun, wenn ich versuche, das Portlet zu laden Liferay sagt:
java.lang.RuntimeException: Unable to create snapshot class for interface some.SomeModuleConfiguration
at com.liferay.portal.configuration.metatype.bnd.util.ConfigurableUtil._createConfigurableSnapshot(ConfigurableUtil.java:77)
at com.liferay.portal.configuration.metatype.bnd.util.ConfigurableUtil.createConfigurable(ConfigurableUtil.java:51)
at some.SomeModule.activate(SomeModule.java:50)
...
aused by: java.lang.IllegalStateException: Attribute is required but not set favoriteColor
at aQute.bnd.annotation.metatype.Configurable$ConfigurableHandler.invoke(Configurable.java:75)
at com.sun.proxy.$Proxy1220.favoriteColor(Unknown Source)
at some.SomeModuleConfigurationSnapshot407.<init>(Unknown Source)
Die UI-Konfiguration für SomeModule
zeigt nichts über favoriteColor
.
Wie behebt man das, indem man beispielsweise favoriteColor
auf den Standardwert setzt?