I am struggling to deploy and run a sample dynamic OSGi plugin in the dotCMS version 4.3.1.
Most of the plugins that I see which has been developed by dotCMS folks not supported on dotCMS version 4.3.1
I tried to setup spring plugin from this page and even tried OAuth plugin too but without any success.
When I upload these plugins in the dotCMS webconsole, they do get uploaded and the status is being shown as installed, but clicking the start button doesnt really do anything... After looking into the logs, here is what I see -
Error while starting bundle: file:/C:/Softwares/dotcms_4.3.1/dotserver/tomcat-8.0.18/webapps/ROOT/WEB-INF/felix/load/plugin-dotcms-poc-spring-0.2.jar: org.osgi.framework.BundleException: Unable to resolve springcontrollerosgi [13](R 13.1): missing requirement [springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>=4.0.0))) Unresolved requirements: [[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>=4.0.0)))]org.osgi.framework.BundleException: Unable to resolve springcontrollerosgi [13]( R 13.1): missing requirement [springcontrollerosgi [13](R 13.1)] osgi.wiring.pac kage; (&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>= 4.0.0))) Unresolved requirements: [[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>=4.0.0)))] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:413 2) at org.apache.felix.framework.Felix.startBundle(Felix.java:2117) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(Di rectoryWatcher.java:1253) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(D irectoryWatcher.java:1225) at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(Dire ctoryWatcher.java:512) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(Direct oryWatcher.java:361) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryW atcher.java:312) ********************************************************************************* After following the documentation, I added the below configuration at dotcms_4.3.1\plugins\com.dotcms.config\conf\dotmarketing-config-ext.properties
############################################################### dotCMS Spring plugin Configuration ###############################################################
######## Followed the example from https://git.it4biz.si/dws-dotcms/dotCMS-core/blob/9c7ab246fc375432bdeeaa1a3cd892e3cec7456c/src-conf/dotmarketing-config.properties
## FELIX CONFIGURATION
felix.org.osgi.framework.system.packages.extra=\
com.dotmarketing.business.web,\
com.dotmarketing.business,\
com.dotmarketing.cache,\
com.dotmarketing.exception,\
com.dotmarketing.util,\
com.dotmarketing.portlets.structure.factories,\
com.dotmarketing.portlets.structure.model,\
com.dotmarketing.portlets.contentlet.business,\
org.apache.commons.httpclient,\
org.apache.commons.lang,\
com.dotmarketing.osgi,\
org.codehaus.jackson.map,\
javax.xml.parsers,\
javax.inject.Qualifier,\
org.osgi.framework,\
org.osgi.service.packageadmin,\
org.osgi.service.startlevel,\
org.osgi.service.url,\
org.osgi.util.tracker,\
org.apache.velocity.tools,\
org.apache.velocity.tools.view,\
org.apache.velocity.tools.view.servlet,\
org.apache.velocity.tools.view.tools,\
org.springframework.core,\
org.springframework.asm,\
org.springframework.context.support,\
org.springframework.web.context,\
org.springframework.web.context.support,\
org.springframework.web.servlet.handler,\
org.springframework.web.servlet.mvc,\
org.springframework.osgi.service.importer,\
org.springframework.osgi.service.importer.support,\
org.springframework.web.servlet.mvc.annotation,\
org.springframework.aop,\
org.springframework.beans,\
org.springframework.beans.factory,\
org.springframework.core.io,\
org.osgi.service.http,\
org.aopalliance.aop,\
org.aopalliance.intercept,\
org.springframework.beans.factory.config,\
org.springframework.osgi.web.context.support,\
org.springframework.stereotype,\
org.springframework.ui,\
org.springframework.web.bind.annotation,\
org.springframework.web.servlet,\
org.springframework.web.servlet.view,\
org.springframework.beans.factory.annotation,\
com.dotmarketing.portlets.workflows.actionlet,\
com.dotmarketing.portlets.workflows.model,\
com.dotmarketing.portlets.workflows.business,\
com.dotmarketing.filters,\
com.dotcms.spring.web,\
javax.servlet.resources,\
javax.servlet;javax.servlet.http;version=2.5,\
org.quartz,\
com.dotmarketing.quartz.ScheduledTask,\
com.dotmarketing.quartz,\
org.apache.log4j,\
org.quartz.Job,\
org.quartz.JobExecutionContext,\
org.quartz.JobExecutionException
############################################################### dotCMS Spring plugin Configuration ###############################################################
Restarted the tomcat server and tried to install the plugin again but again it failed. I am not really sure if the plugin I am using is giving problems due to its incompatible version with dotCMS 4.3.1 or is it something else that i m missing here with regards to OSGi
Here is the snippet of my build.gradle that creates the Manifest file for OSGi
enter code here
.....
....
jar {
manifest {
name = 'dotCMS Spring plugin'
symbolicName = 'springcontrollerosgi'
instruction '-includeresource', 'libs'
instruction 'Bundle-Vendor', 'DotCMS'
instruction 'Export-Package', 'com.dotcms.osgi.spring.*'
instruction 'Bundle-Description', 'dotCMS Spring plugin'
instruction 'Bundle-DocURL', 'http://dotcms.com'
instruction 'Bundle-Version: 2.5.1'
instruction 'Bundle-Activator', 'com.dotmarketing.osgi.spring.Activator'
instruction 'DynamicImport-Package', '*'
instruction 'Import-Package', 'org.osgi.framework,javax.servlet,javax.inject.Qualifier,org.osgi.util.tracker,javax.servlet.http,javax.servlet.resources,org.osgi.service.http,org.apache.felix.http.api,org.springframework.aop,org.springframework.asm,org.springframework.beans,org.springframework.beans.factory,org.springframework.beans.factory.annotation,org.springframework.context.support,org.springframework.core,org.springframework.core.io,org.springframework.ui,org.springframework.stereotype,org.springframework.web.bind.annotation,org.springframework.web.context,org.springframework.web.context.support,org.springframework.web.servlet.handler,org.springframework.web.servlet.mvc,org.springframework.web.servlet,org.springframework.web.servlet.mvc.annotation,org.springframework.osgi.service.importer,org.springframework.osgi.service.importer.support,org.springframework.web.servlet.view,org.aopalliance.aop,org.aopalliance.intercept,com.dotcms.spring.web,com.dotmarketing.filters'
}
}
....
...
...
enter code here
Can someone who have expertise in plugin development area (for dotCMS) can direct me to any github repo where I can find a sample dotCMS plug which is compatible with dotCMS version 4.3.1
Thanks much