0

I was trying to use MD5 from Guava dependency:

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

But when I was deploying the porlet I was getting the following error:

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)

To solve the issue I removed the guava dependency and use MD5 from Apache Commons.

Hope this will help somebody :)

  • Thanks for sharing! It would be better if you posted the solution as an answer instead of as part of the question, so it's more clear to others. When you asked the question, there should have been an "Answer your own question" checkbox for this purpose. – Tyler Tian Aug 10 '21 at 04:32
  • Yes, you are right. Maybe the solution is to remove the solution part and to add an answer @TylerTian – Claudiu Teodorescu Aug 11 '21 at 09:40

1 Answers1

0

To solve the issue I removed the guava dependency and use MD5 from Apache Commons.

It seems this type of errors comes sometimes from dependencies from maven pom.xlm: https://issues.liferay.com/browse/LPS-69679

Hope this will help somebody :)