gpt4 book ai didi

java - Unresolved Portlet 部署要求

转载 作者:行者123 更新时间:2023-12-02 01:24:32 26 4
gpt4 key购买 nike

由于奇怪的 Unresolved 依赖关系问题,Java Portlet 部署到 Liferay 7.2 失败

我想使用 Maven 在 Java 8_u202 上构建一个基于 LR 7.2(提供了 CE Bunlde 和 TC9.0.17)的 Portlet。

当我将 portlet WAR 复制到 liferay/deploy 时,我在 tomcat 日志中得到了巨大的堆栈跟踪:

除了最后一个依赖项之外的所有依赖项都是“分辨率=可选”(这使得它们无关?)。

我怀疑“(&(osgi.ee=JavaSE)(version=9)”是这里的问题。对 Java 9 的引用从哪里来?我的 POM 没有提到 Java9,而且我没有它安装在我的系统上。

Unresolved requirement: Import-Package: angularBeans.api; resolution:="optional"_ 
Unresolved requirement: Import-Package: com.caucho.server.resin; resolution:="optional"_
Unresolved requirement: Import-Package: com.google.template.soy; resolution:="optional"_
Unresolved requirement: Import-Package: com.google.zxing.qrcode.decoder; resolution:="optional"
Unresolved requirement: Import-Package: com.hazelcast.config; resolution:="optional"_ Unresolved requirement: Import-Package: com.hazelcast.core; resolution:="optional"_ Unresolved requirement: Import-Package: com.ibm.websphere.jtaextensions; resolution:="optional"_
£Unresolved requirement: Import-Package: com.icesoft.faces.application; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.faces.alloy.component.column; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.faces.metal.component.inputtext; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.faces.portal.context; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.faces.showcase.dto; resolution:="optional"_
Unresolved requirement: Import-Package: com.lowagie.text; resolution:="optional"_ Unresolved requirement: Import-Package: com.lowagie.text.pdf; resolution:="optional"_ Unresolved requirement: Import-Package: com.rometools.rome.feed.synd; resolution:="optional"_
Unresolved requirement: Import-Package: com.rometools.rome.io; resolution:="optional"_ Unresolved requirement: Import-Package: com.squareup.javapoet; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.jdi; resolution:="optional"_
Unresolved requirement: Import-Package: com.sun.jdi.connect; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.jdi.event; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.jdi.request; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.jna; resolution:="optional"_
Unresolved requirement: Import-Package: com.sun.jna.platform.win32; resolution:="optional"_
Unresolved requirement: Import-Package: com.sun.jna.ptr; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.jna.win32; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.msv.datatype; resolution:="optional"_ Unresolved requirement: Import-Package: com.sun.msv.datatype.xsd; resolution:="optional"_
Unresolved requirement: Import-Package: com.sun.tools.attach; resolution:="optional"_ Unresolved requirement: Import-Package: com.swabunga.spell.engine; resolution:="optional"
Unresolved requirement: Import-Package: com.swabunga.spell.event; resolution:="optional"_
Unresolved requirement: Import-Package: de.beyondjava.angularFaces.core; resolution:="optional"_
Unresolved requirement: Import-Package: de.larmic.butterfaces.component.partrenderer; resolution:="optional"_
Unresolved requirement: Import-Package: javax.ejb; resolution:="optional"_
Unresolved requirement: Import-Package: javax.security.jacc; resolution:="optional"_ Unresolved requirement: Import-Package: jdk.internal.misc; resolution:="optional"_ Unresolved requirement: Import-Package: jdk.internal.module; resolution:="optional"_ Unresolved requirement: Import-Package: net.bootsfaces; resolution:="optional"_ Unresolved requirement: Import-Package: net.fortuna.ical4j.model; resolution:="optional"_ Unresolved requirement: Import-Package: net.fortuna.ical4j.model.property; resolution:="optional"_
Unresolved requirement: Import-Package: net.glxn.qrgen; resolution:="optional"_ Unresolved requirement: Import-Package: net.glxn.qrgen.image; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.axis.tools.ant.wsdl; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.commons.digester; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.deltaspike.core.util; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.jasper.compiler; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.logging.log4j; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.logging.log4j.message; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.logging.log4j.spi; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.myfaces.shared.renderkit.html.util; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.myfaces.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.myfaces.view.facelets; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.pluto.container; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.poi.hssf.usermodel; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.poi.hssf.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.poi.ss.usermodel; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.poi.ss.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.poi.xssf.streaming; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.poi.xssf.usermodel; resolution:="optional"_
Unresolved requirement: Import-Package: org.apache.tomcat.util.buf; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.webbeans.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.apache.xmlbeans.impl.common; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.annotation; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.client; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.config; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.config.managed; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.config.service; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.cpr; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.handler; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.inject; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.inject.annotation; resolution:="optional"_
Unresolved requirement: Import-Package: org.atmosphere.interceptor; resolution:="optional"_ Unresolved requirement: Import-Package: org.atmosphere.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.eclipse.jetty.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.gjt.xpp; resolution:="optional"_
Unresolved requirement: Import-Package: org.glassfish.api.web; resolution:="optional"_
Unresolved requirement: Import-Package: org.glassfish.hk2.osgiresourcelocator; resolution:="optional"_ Unresolved requirement: Import-Package: org.highfaces.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.icefaces.application; resolution:="optional"_ Unresolved requirement: Import-Package: org.jboss.logmanager; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.codabar; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.code128; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.code39; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.datamatrix; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.int2of5; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.pdf417; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.postnet; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.impl.upcean; resolution:="optional"_
Unresolved requirement: Import-Package: org.krysalis.barcode4j.output; resolution:="optional"_ Unresolved requirement: Import-Package: org.krysalis.barcode4j.output.bitmap; resolution:="optional"_
Unresolved requirement: Import-Package: org.krysalis.barcode4j.output.svg; resolution:="optional"_ Unresolved requirement: Import-Package: org.mortbay.jetty.annotations; resolution:="optional"_
Unresolved requirement: Import-Package: org.mortbay.jetty.handler; resolution:="optional"_
Unresolved requirement: Import-Package: org.mortbay.jetty.plus.annotation; resolution:="optional"_ Unresolved requirement: Import-Package: org.mortbay.jetty.webapp; resolution:="optional"_ Unresolved requirement: Import-Package: org.objectweb.jonas_tm; resolution:="optional"_ Unresolved requirement: Import-Package: org.omnifaces.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.osgi.service.jdbc; resolution:="optional"_ Unresolved requirement: Import-Package: org.primefaces.extensions.util; resolution:="optional"_
Unresolved requirement: Import-Package: org.relaxng.datatype; resolution:="optional"_ Unresolved requirement: Import-Package: org.richfaces; resolution:="optional"_
Unresolved requirement: Import-Package: org.richfaces.event; resolution:="optional"_ Unresolved requirement: Import-Package: org.richfaces.model; resolution:="optional"_ Unresolved requirement: Import-Package: org.richfaces.util; resolution:="optional"_ Unresolved requirement: Import-Package: org.xmlpull.v1; resolution:="optional"_ Unresolved requirement: Import-Package: weblogic.deploy.api.shared; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.portal.service; resolution:="optional"_ Unresolved requirement: Import-Package: com.liferay.portal.osgi.web.servlet.jsp.compiler; resolution:="optional"_
Unresolved requirement: Import-Package: com.liferay.portal.spring.context; resolution:="optional"_
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9))"_ [Sanitized] at org.eclipse.osgi.container.Module.start(Module.java:444) at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1264) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1237) at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)

感谢您的帮助...问候,克劳斯

最佳答案

可选包确实不应该成为问题。然而Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=9))"是。它基本上告诉解析器一个包需要 Java 9(或更高版本)运行时。

很难说这个要求到底是如何融入到你的 bundle 中的。你说你部署了一个WAR文件,这意味着它被 WAB Generator 转换为 bundle ( WAB ) 。我不太确定它到底考虑了什么,但这是可能是什么原因造成的:

  • WAR不知何故确实是用 Java 9 编译的
  • WEB-INF/liferay-plugin-package.properties文件在 WAR包含添加此要求的明确说明(复制/粘贴问题?)
  • WAR 中的其他内容(依赖项?)文件使 WAB Generator添加要求

可能的解决方法是添加 -noee=true WEB-INF/liferay-plugin-package.properties中的说明。我自己从未这样做过,但如果文档正确,则应将其传递给 Bnd并且该要求不应添加到 bundle 中。当然,如果确实存在Java版本不匹配,这只会导致其他错误。

关于java - Unresolved Portlet 部署要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57146737/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com