RE: How to solve Require-Capability related issue?

Vishal Shah, modified 6 Years ago. New Member Posts: 3 Join Date: 3/28/18 Recent Posts

Hi,

 

I written code in my project and added below jar files which use in my project via gradle. Also I am going to written the some syntaxes for including and excluding resources from my bundle. So please check the below my gradle and bnd files. I go the issue of "Require-Capability" related with some struts related taglib.

 

I added 2 component of Struts In Action.

 

build.gradle

 

    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel"
    compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib"
    compileOnly group: "javax.portlet", name: "portlet-api"
    compileOnly group: "javax.servlet", name: "javax.servlet-api", version:"3.0.1"
    compileOnly group: "jstl", name: "jstl"
    compileOnly group: "org.osgi", name: "osgi.cmpn"
    compileOnly group: 'javax.servlet', name: 'jstl', version: '1.2'
    compile group: "org.osgi", name:"org.osgi.service.component.annotations", version:"1.3.0"
    //compile group: "com.liferay.portal", name:"com.liferay.portal.kernel", version:"2.0.0"
    
    compileOnly group: 'org.osgi', name: 'org.osgi.framework', version: '1.8.0'
    
    compileOnly group: 'com.liferay', name: 'com.liferay.petra.string', version: '2.0.0'
    //compileOnly group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.1"
    
    compileOnly project(":modules:saml:saml-api")
    compileOnly project(":modules:saml-integration-api")
    
    compileOnly group: 'com.liferay', name: 'com.liferay.portal.security.ldap', version: '1.0.0'
    compileOnly group: 'com.liferay', name: 'com.liferay.portal.security.exportimport.api', version: '1.0.0'
    
    compileOnly group: 'com.liferay', name: 'com.liferay.portal.configuration.metatype', version: '2.0.0'
    compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    
    compileInclude group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.1'
    compileInclude group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.3'
    compileInclude group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.1'
    
    compileInclude group: 'org.opensaml', name: 'opensaml', version: '2.6.0'
    compileOnly group: 'org.opensaml', name: 'openws', version: '1.5.0'
    runtime group: 'org.opensaml', name: 'xmltooling', version: '1.4.6'
    compileInclude group: 'joda-time', name: 'joda-time', version: '2.10.1'
    compileOnly group: 'org.joda', name: 'joda-convert', version: '2.1.2'
    compileOnly group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
    compileOnly group: 'commons-codec', name: 'commons-codec', version: '1.7'
    compileOnly group: 'commons-collections', name: 'commons-collections', version: '3.2.1'
    compileOnly group: 'commons-lang', name: 'commons-lang', version: '2.6'
    compileInclude group: 'commons-configuration', name: 'commons-configuration', version: '1.9'
    compileInclude group: 'commons-digester', name: 'commons-digester', version: '1.7'
    compileOnly group: 'commons-fileupload', name: 'commons-fileupload', version: '1.2'
    
    compileOnly group: 'log4j', name: 'log4j', version: '1.2.16'
    compileOnly group: 'commons-beanutils', name: 'commons-beanutils-core', version: '1.7.0'
    compileOnly group: 'xom', name: 'xom', version: '1.1'
    compileOnly group: 'commons-logging', name: 'commons-logging', version: '1.0'
    
    
    runtime group: 'org.apache.commons', name: 'commons-jexl', version: '2.1.1'
    runtime group: 'commons-jxpath', name: 'commons-jxpath', version: '1.3'
    compileOnly group: 'org.owasp.esapi', name: 'esapi', version: '2.0.1'
    compile group: 'org.owasp.antisamy', name: 'antisamy', version: '1.4.3'
    
    compileOnly group: 'org.apache.velocity', name: 'velocity', version: '1.7'
    compileOnly group: 'xml-apis', name: 'xml-apis', version: '1.3.04'
    runtime group: 'xalan', name: 'serializer', version: '2.7.1'
    runtime group: 'xalan', name: 'xalan', version: '2.7.1'
    runtime group: 'xerces', name: 'xercesImpl', version: '2.10.0'
    runtime group: 'xerces', name: 'xmlParserAPIs', version: '2.6.2'
    runtime group: 'xml-resolver', name: 'xml-resolver', version: '1.2'
    runtime group: 'org.apache.avalon.logkit', name: 'avalon-logkit', version: '2.2.1'
    compileOnly group: 'ca.juliusdavies', name: 'not-yet-commons-ssl', version: '0.3.9'
    compileOnly group: 'org.apache.santuario', name: 'xmlsec', version: '1.5.7'
    
    compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: '1.46'    
    
    compile group: 'werken-xpath', name: 'werken-xpath', version: '0.9.4'
    compile group: 'oro', name: 'oro', version: '2.0.8'
    
    compile group: 'junit', name: 'junit', version: '4.4'

 

===============================

 

bnd.bnd

 

Bundle-Name: sample-web
Bundle-SymbolicName: com.jio.portlet.sample
Bundle-Version: 1.0.0
Export-Package: com.jio.portlet.sample
Web-ContextPath: /AuthRedirectAction,/SingleLogoutAction
Import-Package: \
    !com.sun.*,\
    !sun.io,\
    !nu.xom.*,\
    !org.apache.avalon.framework.logger,\
    !org.apache.crimson.jaxp,\
    !com.ibm.uvm.tools,\
    !org.apache.log,\
    !org.jvnet.staxex,\
    !com.ibm.security.*,\
    !com.oracle.*,\
    !javax.annotation.meta,\
    !org.joda.convert,\
    !org.jvnet.*,\
    !sun.nio.*,\
    !javax.microedition.io,\
    !bsh,\
    !com.werken.xpath.*,\
    !com.liferay.util,\
    !junit.framework.*,\
    !junit.textui.*,\
    !org.apache.commons.jexl2,\
    !org.apache.commons.jxpath.*,\
    !org.apache.commons.vfs2.*,\
    !org.apache.log.*,\
    !org.apache.log.format.*,\
    !org.apache.log.output.io\
    !org.apache.oro.*,\
    !org.apache.oro.text.perl,\
    !org.owasp.validator.html,\
    org.joda.time.*,\
    org.opensaml.common.binding.*,\
    org.opensaml.saml2.core.*,\
    org.opensaml.saml2.metadata.*,\
    org.opensaml.saml2.metadata.provider.*,\
    org.opensaml.xml.*,\
    com.jio.saml.common.api.*,\
    com.jio.saml.common.props.*,\
    *

=======================================================================

Facing Error as below :

 

com.jio.portlet.sample [957]
  Unresolved requirement: Require-Capability: osgi.extender; filter:="(&(osgi.extender=jsp.taglib)(uri=http://struts.apache.org/tags-tiles))"

 

Can you please help me for how can I resolve this issue? I checked over the multiple sites for this resolution for using "runtime", "compileInclude" keyword with jstl library. but still facing same issue.

 

What missing from my side?

 

 

thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts

It's not a struts related tag library, it's Apache Tiles' tag library.

Vishal Shah, modified 6 Years ago. Junior Member Posts: 33 Join Date: 2/1/12 Recent Posts

Now I added Apache titles related below gradle with their dependencies:

 

   compileInclude group: 'org.apache.tiles', name: 'tiles-jsp', version: '3.0.5'
    compile group: 'org.apache.tiles', name: 'tiles-servlet', version: '3.0.5'
    compile group: 'org.apache.tiles', name: 'tiles-template', version: '3.0.5'
    compile group: 'org.apache.tiles', name: 'tiles-request-jsp', version: '1.0.6'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.6'
    compile group: 'org.apache.tiles', name: 'tiles-core', version: '3.0.5'
    compile group: 'org.apache.tiles', name: 'tiles-request-servlet', version: '1.0.6'
    compile group: 'org.apache.tiles', name: 'tiles-request-api', version: '1.0.6'
    compile group: 'org.apache.tiles', name: 'tiles-api', version: '3.0.5'
    compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.6'
    compileInclude group: 'org.apache.tiles', name: 'tiles-autotag-core-runtime', version: '1.1.0'
    compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.1'
    compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.1'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.7'
    compile group: 'org.slf4j', name: 'slf4j-ext', version: '1.7.7'

 

Still facing same issue, after clean, refresh gradle project, then build and deploy.