Search code examples
file-uploadliferay-7

Liferay File upload issue


I am currently doing code about file upload in Liferay and I am getting an error like below.

2019-12-18 07:26:08.392 ERROR [fileinstall-D:/Users/1604556/Downloads/liferay-ce
-portal-7.2.0-ga1/osgi/modules][LogService:93] Error while starting bundle: file
:/D:/Users/1604556/Downloads/liferay-ce-portal-7.2.0-ga1/osgi/modules/Liferay.up
load.file.jar
org.osgi.framework.BundleException: Could not resolve module: Liferay.upload.fil
e [1098]_  Unresolved requirement: Import-Package: org.apache.commons.io; versio
n="[1.4.0,2.0.0)"_ [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(Di
rectoryWatcher.java:1264)
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(D
irectoryWatcher.java:1237)
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(Dire
ctoryWatcher.java:520)
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(Direct
oryWatcher.java:365)
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryW
atcher.java:316)

Solution

  • It states org.apache.commons.io; version="[1.4.0,2.0.0) and means you need ..commons.io version 1.4.0 up to 2.0.0 but you defined a dependency for 2.5.

    So either your bnd.bnd is wrong or your maven/gradle setup is wrong.