com.akamai.edgegrid.signer无法解决

时间:2019-01-30 23:00:52

标签: java maven osgi aem akamai

碰到一个让我发疯的问题。在AEM(6.0 SP3)中实施Amakai Edgegrid auth,由于它不是OSGi捆绑软件,因此阻止了我的主要服务捆绑软件的启动。

this issue中所述的问题完全相同,但这并不能解决任何问题,因为我从未包括过依赖关系的范围。

    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.3</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.3.2</version>
    </dependency>
    <dependency>
        <groupId>com.akamai.edgegrid</groupId>
        <artifactId>edgegrid-signer-core</artifactId>
        <version>2.1.0</version>
    </dependency>
    <dependency>
        <groupId>com.akamai.edgegrid</groupId>
        <artifactId>edgegrid-signer-apache-http-client</artifactId>
        <version>2.1.0</version>
    </dependency>
  

com.akamai.edgegrid.signer-无法解决   com.akamai.edgegrid.signer.apachehttpclient-无法解决

错误日志。

  

错误 [qtp1187594825-933] org.apache.felix.http.jetty   %bundles.pluginTitle:无法启动   (org.osgi.framework.BundleException:捆绑中未解决的约束   com.aem.common-service [478]:无法解决478.21:   缺少要求[478.21] osgi.wiring.package;   (osgi.wiring.package = com.akamai.edgegrid.signer))   org.osgi.framework.BundleException:捆绑中未解决的约束   com.aem.common-service [478]:无法解决478.21:   缺少要求[478.21] osgi.wiring.package;   (osgi.wiring.package = com.akamai.edgegrid.signer)在   org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3980)     在org.apache.felix.framework.Felix.startBundle(Felix.java:2043)处   org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)在   org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963)在   org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:364)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:641)在   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)在   org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:526)     在   org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:450)     在   org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:339)     在   org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:300)     在   org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:128)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:55)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:300)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:115)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)     在   org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:84)     在   org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)     在   org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)     在   org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)     在   org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)     在   org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)   org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)     在   org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)     在   org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)     在   org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)     在   org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)     在   org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)     在   org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)     在   org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)     在   org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)     在   org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)     在org.eclipse.jetty.server.Server.handle(Server.java:370)处   org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)     在   org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)     在   org.eclipse.jetty.server.AbstractHttpConnection $ RequestHandler.content(AbstractHttpConnection.java:1043)     在org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)     在   org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)     在   org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)     在   org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)     在   org.eclipse.jetty.io.nio.SelectChannelEndPoint $ 1.run(SelectChannelEndPoint.java:52)     在   org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)     在   org.eclipse.jetty.util.thread.QueuedThreadPool $ 3.run(QueuedThreadPool.java:543)     在java.lang.Thread.run(Thread.java:748)

我也尝试过使用maven-bundle-plugin使用Export-Package和Embed-Dependency。乍看起来,这似乎可以解决问题,但它会级联到其他问题,这也阻止了主捆绑包的启动。

1 个答案:

答案 0 :(得分:1)

我能够与Akamai的Martin一起获得新版本的Edgegrid依赖4.0.0版本。所做的更改消除了许多不必要的依赖关系,并使使用maven-bundle-plugin可以更轻松地在OSGi中工作。

使用此依赖项的包的生成的maven-bundle-plugin配置。

resource "aws_instance" "instance" {
    # ... some instance properties ...
    tags {
        "Name" = "${format("cluster-%02s", var.cluster_id)}"
    }
}

添加了此内容后,使用edgegrid依赖版本4.0.0,我的捆绑软件立即启动。