0

我试图使用来自 Guava 依赖项的 MD5:

<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>30.1.1-jre</version>
</dependency>

但是,当我部署 porlet 时,出现以下错误:

java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
        at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
        at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
        at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
        at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
        at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
        at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
        at java.lang.Class.createAnnotationData(Class.java:3521)
        at java.lang.Class.annotationData(Class.java:3510)
        at java.lang.Class.getAnnotation(Class.java:3415)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.processServletContainerInitializerClass(WabBundleProcessor.java:729)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initServletContainerInitializers(WabBundleProcessor.java:623)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:161)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:184)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:175)
        at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
        at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.start(Module.java:467)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
        at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

为了解决这个问题,我删除了番石榴依赖并使用 Apache Commons 的 MD5。

希望这会对某人有所帮助:)

4

1 回答 1

0

为了解决这个问题,我删除了番石榴依赖并使用 Apache Commons 的 MD5。

似乎这种类型的错误有时来自 maven pom.xlm 的依赖项: https ://issues.liferay.com/browse/LPS-69679

希望这会对某人有所帮助:)

于 2021-08-11T09:47:55.217 回答