在dotCMS版本4.3.1上启动dotCMS插件(spring控制器插件和OAuth插件)的问题

时间:2018-03-14 22:23:01

标签: dotcms

我正在努力在dotCMS版本4.3.1中部署和运行示例动态OSGi插件。

我看到的大多数插件都是由dotCMS人员开发的,不支持dotCMS版本4.3.1

我尝试从此page设置spring插件,甚至尝试了OAuth插件,但没有任何成功。

当我在dotCMS网络控制台上传这些插件时,它们会上传并且状态显示为已安装,但点击开始按钮并没有真正做任何事情......     查看日志后,我看到了这一点 -

  

启动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:无法解析springcontrollerosgi [13](R 13.1):       缺少要求[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (及(osgi.wiring.package = org.springframework.ui)(版本> = 3.1.0)((版本>!= 4.0.0)))       未解决的要求:[[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (&(osgi.wiring.package = org.springframework.ui)(版本> = 3.1.0)(!(版本> = 4.0.0)))] org.osgi.framework.BundleException:无法解析springcontrollerosgi [ 13](       R 13.1):缺少要求[springcontrollerosgi [13](R 13.1)] osgi.wiring.pac       卡格; (及(osgi.wiring.package = org.springframework.ui)(版本>!= 3.1.0)((版本&GT =       4.0.0)))未解决的要求:[[springcontrollerosgi [13](R 13.1)] osgi.wiring.package; (及(osgi.wiring.package = org.springframework.ui)(版本> = 3.1.0)((版本>!= 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(Di       rectoryWatcher.java:1253)       在org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(D       irectoryWatcher.java:1225)       在org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(Dire       ctoryWatcher.java:512)       在org.apache.felix.fileinstall.internal.DirectoryWatcher.process(直接       oryWatcher.java:361)       在org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryW       atcher.java:312)       ************************************************** *******************************       按照文档后,我在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

0 个答案:

没有答案