Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
MVCPortlet upgrade from 7.1 to 7.2 - ConfigurableUtil no longer exists
I am busy upgrading a MVC portelt from 7.1 to 7.2. The code uses a class ConfigurableUtil which does not seem to exist in 7.2 anymore. The code usage is: @Activate
@Modified
protected void activate(Map<Object, Object> properties) {
registerFormConfiguration = ConfigurableUtil.createConfigurable(RegisterFormConfiguration.class, properties);
}
I tried the Liferay Upgrade Planner and the Fix Upgrade Problems task, but no automatic fixes are available with a note to check the doucmentation for the fix. I can't find any reference to any upgrade fix for the missing ConfigurableUtil class.Does anyone know how this is now done in 7.2?
@Modified
protected void activate(Map<Object, Object> properties) {
registerFormConfiguration = ConfigurableUtil.createConfigurable(RegisterFormConfiguration.class, properties);
}
I tried the Liferay Upgrade Planner and the Fix Upgrade Problems task, but no automatic fixes are available with a note to check the doucmentation for the fix. I can't find any reference to any upgrade fix for the missing ConfigurableUtil class.Does anyone know how this is now done in 7.2?
It also seems the @ExtendedObjectClassDefinition annotation is missing. My build.gradle look slike:dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
compileOnly group: "javax.portlet", name: "portlet-api"
compileOnly group: "javax.servlet", name: "javax.servlet-api"
compileOnly group: "jstl", name: "jstl"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
}
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
compileOnly group: "javax.portlet", name: "portlet-api"
compileOnly group: "javax.servlet", name: "javax.servlet-api"
compileOnly group: "jstl", name: "jstl"
compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations"
compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
}
You forgot this dependency:
compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"
compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"
Thanks Matthew, that cleared things up. Everything compiles and deploys fine, but the configuration page doesn't appear anywhere in the UI under System Settings?!? I'm going to post a new question for this.
That problem was introduced in Liferay workspace 2.0.3. I told the maintainers a couple of days ago about it and they promised to fix it. You can either downgrade to 2.0.2 or try to upgrade to 2.0.6. I am not sure if 2.0.6 has a fix, I had no time to test it so far, but 2.0.2 should work.
https://mvnrepository.com/artifact/com.liferay/com.liferay.gradle.plugins.workspace
https://mvnrepository.com/artifact/com.liferay/com.liferay.gradle.plugins.workspace
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™