Liferay module development error
Liferay module development error
https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=98561370
2024-03-29T07:10:29Z
2024-03-29T07:10:29Z
RE: Liferay module development error
Pratik Sayare
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=98761653
2017-11-16T08:46:03Z
2017-11-16T08:46:03Z
Hi,<br /><br />After override, I found that the module is not displayed under APPS > APP MANAGER > LIFERAY CE FOUNDATION > SECURITY FRAMEWORKS.<br /><br />Without override, I can see the module listed as "Liferay Portal Security SSO OpenSSO"<br /><br />Is it normal?<br /><br />/Pratik
Pratik Sayare
2017-11-16T08:46:03Z
RE: Liferay module development error
Pratik Sayare
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=98761571
2017-11-16T08:39:12Z
2017-11-16T08:39:12Z
Hi,<br /><br />Thanks for the pointers. After some trial and error below works<br /><br />dependencies {<br /> compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.security.exportimport.api", version: "2.0.0"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "2.0.0"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"<br /> compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"<br /> compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"<br /> compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"<br /> <br /> compile group: "com.liferay", name: "com.liferay.portal.security.sso.opensso", version: "3.0.9"<br />}<br /><br />/Pratik
Pratik Sayare
2017-11-16T08:39:12Z
RE: Liferay module development error
Pratik Sayare
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=98584268
2017-11-14T14:41:21Z
2017-11-14T14:41:21Z
ok, thanks. Where can I check the existing version? Under apps -> App Manager I can see for Opensso 3.0.7 but not for com.liferay.portal.impl and com.liferay.portal.kernel. I checked jar and its com.liferay.portal.impl - 2.21.0 and com.liferay.portal.kernel -2.46.1<br /><br />Is this correct? that I should use.<br /><br />/Pratik
Pratik Sayare
2017-11-14T14:41:21Z
RE: Liferay module development error
David H Nebinger
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=98584283
2017-11-14T13:51:27Z
2017-11-14T13:51:27Z
<div class="quote-title">Pratik Sayare:</div><blockquote>dependencies {<br /> compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.security.exportimport.api", version: "2.0.0"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "<strong>2.21.0</strong>"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "<strong>2.49.0</strong>"<br /> compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"<br /> compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"<br /> compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"<br /> <br /> compile group: "com.liferay", name: "com.liferay.portal.security.sso.opensso", version: "<strong>3.0.9</strong>"<br />}</blockquote><br /><br /><blockquote>09:51:43,066 ERROR [Framework Event Dispatcher: Equinox Container: b0aa82f4-20c9-0017-11a6-b8198979ee61][com_liferay_portal_settings_authentication_opensso_web:97] FrameworkEvent ERROR<br />org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.settings.authentication.opensso.web [367]_ Unresolved requirement: Import-Package: com.liferay.portal.security.sso.opensso.configuration; version="[2.0.0,3.0.0)"_ -> Export-Package: com.liferay.portal.security.sso.opensso.configuration; bundle-symbolic-name="com.liferay.portal.security.sso.opensso"; bundle-version="3.0.10"; version="2.0.1"; uses:="aQute.bnd.annotation.metatype,com.liferay.portal.configuration.metatype.annotations"_ com.liferay.portal.security.sso.opensso [522]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="<strong>[7.35.0,8.0.0)</strong>"_ [Sanitized]</blockquote><br /><br />When you pick a version for a dependency, that version comes with a known set of version dependencies. Something that you have picked uses com.liferay.portal.kernel.util version 7.35.0 or greater and likely the environment that you are deploying to has not yet been updated to have that version available.<br /><br />You should not be picking the latest and greatest version of the modules because you have no idea what actual versions may be deployed.
David H Nebinger
2017-11-14T13:51:27Z
Liferay module development error
Pratik Sayare
https://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=98561369
2017-11-14T09:56:34Z
2017-11-14T09:56:34Z
Hi,<br /><br />I followed instructions as per post https://web.liferay.com/web/user.26526/blog/-/blogs/extending-liferay-osgi-modules to customize module.<br /><br />I modified com.liferay.portal.security.sso.opensso.internal.OpenSSOImpl.java <br /><br />Below is my bnd.bnd<br /><br />Bundle-Name: Liferay Portal Security SSO OpenSSO<br />Bundle-SymbolicName: com.liferay.portal.security.sso.opensso<br />Bundle-Version: 3.0.10<br />Export-Package:\<br /> com.liferay.portal.security.sso.opensso.configuration,\<br /> com.liferay.portal.security.sso.opensso.constants<br />Liferay-Releng-Module-Group-Description:<br />Liferay-Releng-Module-Group-Title: Security Frameworks<br /><br />Include-Resource: @com.liferay.portal.security.sso.opensso-3.0.9.jar<br /><br />Below is my build.gradle<br /><br />buildscript {<br /> dependencies {<br /> classpath group: "com.liferay", name: "com.liferay.gradle.plugins", version: "2.0.10"<br /> }<br /><br /> repositories {<br /> mavenLocal()<br /><br /> maven {<br /> url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"<br /> }<br /> }<br />}<br /><br />apply plugin: "com.liferay.plugin"<br /><br />dependencies {<br /> compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype", version: "2.0.0"<br /> compileOnly group: "com.liferay", name: "com.liferay.portal.security.exportimport.api", version: "2.0.0"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "2.21.0"<br /> compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.49.0"<br /> compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"<br /> compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"<br /> compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.3.0"<br /> <br /> compile group: "com.liferay", name: "com.liferay.portal.security.sso.opensso", version: "3.0.9"<br />}<br /><br />jar.archiveName = 'com.liferay.portal.security.sso.opensso.jar'<br /><br />repositories {<br /> mavenLocal()<br /><br /> maven {<br /> url "https://cdn.lfrs.sl/repository.liferay.com/nexus/content/groups/public"<br /> }<br />}<br /><br />I can successfully build the jar then placed in override folder. When liferay starts it shows Disabled Liferay CE Foundation:/com.liferay.portal.security.sso.opensso-3.0.7.jar means new jar is getting applied.<br /><br />Then it gives below errors<br /><br />09:51:43,066 ERROR [Framework Event Dispatcher: Equinox Container: b0aa82f4-20c9-0017-11a6-b8198979ee61][com_liferay_portal_settings_authentication_opensso_web:97] FrameworkEvent ERROR<br />org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.settings.authentication.opensso.web [367]_ Unresolved requirement: Import-Package: com.liferay.portal.security.sso.opensso.configuration; version="[2.0.0,3.0.0)"_ -> Export-Package: com.liferay.portal.security.sso.opensso.configuration; bundle-symbolic-name="com.liferay.portal.security.sso.opensso"; bundle-version="3.0.10"; version="2.0.1"; uses:="aQute.bnd.annotation.metatype,com.liferay.portal.configuration.metatype.annotations"_ com.liferay.portal.security.sso.opensso [522]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="[7.35.0,8.0.0)"_ [Sanitized]<br /> at org.eclipse.osgi.container.Module.start(Module.java:429)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)<br /><br />09:51:45,832 ERROR [Framework Event Dispatcher: Equinox Container: b0aa82f4-20c9-0017-11a6-b8198979ee61][com_liferay_portal_security_sso_opensso:97] FrameworkEvent ERROR<br />org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.security.sso.opensso [522]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="[7.35.0,8.0.0)"_ [Sanitized]<br /> at org.eclipse.osgi.container.Module.start(Module.java:429)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)<br /> at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)<br /> at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)<br /> at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)<br />09:51:45,835 ERROR [localhost-startStop-1][ModuleFrameworkImpl:1513] Unable to start bundle com.liferay.portal.security.sso.opensso<br />org.osgi.framework.BundleException: Could not resolve module: com.liferay.portal.security.sso.opensso [522]_ Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="[7.35.0,8.0.0)"_ [Sanitiz