我正在努力在 dotCMS 4.3.1 版中部署和运行示例动态 OSGi 插件。
我看到的大多数插件都是由 dotCMS 开发的,在 dotCMS 4.3.1 版上不受支持
我尝试从此页面设置 spring 插件 ,甚至尝试过 OAuth 插件,但没有任何成功。
当我在 dotCMS webconsole 中上传这些插件时,它们确实被上传并且状态显示为已安装,但单击开始按钮并没有真正做任何事情......查看日志后,这是我看到的 -
启动捆绑包时出错: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:无法解析springcontrollerosgi [13](R 13.1):缺少要求[springcontrollerosgi [13](R 13.1)] osgi.wiring.package;(&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>=4.0.0))) 未解决的需求:[[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: 无法解析springcontrollerosgi [13 ](R 13.1):缺少要求[springcontrollerosgi [13](R 13.1)] osgi.wiring.pack;(&(osgi.wiring.package=org.springframework.ui)(版本>=3.1.0)(! (version>= 4.0.0))) 未解决的要求:[[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (&(osgi.wiring.package=org.springframework.ui)(version>=3.1.0)(!(version>=4.0.0)))] 在 org.apache.felix.framework.Felix.resolveBundleRevision(Felix .java:413 2) org.apache.felix.framework.Felix.startBundle(Felix.java:2117) org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) org.apache.felix .fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) 在 org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) 在 org.apache.felix.fileinstall.internal.DirectoryWatcher .doProcess(Dire ctoryWatcher.java:512) 在 org.apache.felix。
############################################################### 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