org.owasp.esapi is not getting resolved -

suniln13212398

02-10-2019

hi,

Unable to start the the bundle - it shows org.owasp.esapi -- Cannot be resolved

used the mvn dependency on pom.xml

<dependency>

        <groupId>org.owasp.esapi</groupId>

        <artifactId>esapi</artifactId>

        <version>2.2.0.0</version>

</dependency>

seeing the below error on trying to initialize the bundle. Thank you in advance.

02.10.2019 11:25:15.714 *ERROR* [qtp1516075529-13394] org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Unable to resolve org.xxx.www.xxx-deprecated [551](R 551.149): missing requirement [org.xxx.www.xxx-deprecated [551](R 551.149)] osgi.wiring.package; (osgi.wiring.package=org.owasp.esapi) Unresolved requirements: [[org.xxx.www.xxx-deprecated [551](R 551.149)] osgi.wiring.package; (osgi.wiring.package=org.owasp.esapi)])

org.osgi.framework.BundleException: Unable to resolve org.xxx.www.xxx-deprecated [551](R 551.149): missing requirement [org.xxx.www.xxx-deprecated [551](R 551.149)] osgi.wiring.package; (osgi.wiring.package=org.owasp.esapi) Unresolved requirements: [[org.xxx.www.xxx-deprecated [551](R 551.149)] osgi.wiring.package; (osgi.wiring.package=org.owasp.esapi)]

    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)

    at org.apache.felix.framework.Felix.startBundle(Felix.java:2119)

    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)

    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)

    at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:359)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:563)

    at org.apache.felix.webconsole.internal.servlet.OsgiManager$3.run(OsgiManager.java:465)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:461)

    at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120 )

    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav a:86)

    at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:328)

    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav a:81)

    at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)

    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav a:81)

    at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)

    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav a:81)

    at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131)

    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

    at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.jav a:81)

    at org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:146)

    at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(Whit eboardManager.java:1000)

    at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:91)

    at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet. java:49)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)

    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)

    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)

    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)

    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)

    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)

    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)

    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)

    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)

    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)

    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)

    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection .java:220)

    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)

    at org.eclipse.jetty.server.Server.handle(Server.java:503)

    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)

    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)

    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:30 5)

    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)

    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)

    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExe cutor.java:366)

    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)

    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)

    at java.lang.Thread.run(Thread.java:745)

Screen Shot 2019-10-02 at 11.47.10 AM.png

Accepted Solutions (1)

Accepted Solutions (1)

scottm91515441

02-10-2019

Are you trying to use a custom Java API. If so - you need to wrap that JAR that exposes the Java package into an OSSi bundle and deploy to AEM. Remember that when building an OSGi bundle that contains a Java API - you need to ensure 2 things:

1 - you reference the API in the POM (which you did)

2 - you need to make sure there is a deployed OSGi bundle in the AEM Service container that exposes the given Java package - sounds like this is not the case).

Answers (4)

Answers (4)

suniln13212398

02-10-2019

nope, I am trying to use

ESAPI.encoder().encodeForXML( message );

on existing class, so importing  import org.owasp.esapi.ESAPI; into the project module