2

我使用 liferay 7 来开发我的项目。当我建立一个服务时,我遇到了一个异常:

    15:19:12,672 WARN  [fileinstall-/home/barrow/Tools/liferay-ce-portal-7.0-ga3/osgi/modules][org_apache_felix_fileinstall:103] Error while starting bundle: file:/home/barrow/Tools/liferay-ce-portal-7.0-ga3/osgi/modules/priv.barrow.service.jar 
org.osgi.framework.BundleException: Could not resolve module: priv.barrow.service [488]_  Unresolved requirement: Import-Package: com.liferay.util.dao.orm; version="[7.0.0,8.0.0)"_ [Sanitized]
    at org.eclipse.osgi.container.Module.start(Module.java:429)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1252)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1224)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361)
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:313)

我猜我的服务的 build.gradle 有问题。这是:

    dependencies {
    compileOnly group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"
    compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0"
    compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0"

    compileOnly group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.0"
    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4'

    compileOnly project(":modules:oes-service:oes-service-api")

}

buildService {
    apiDir = "../oes-service-api/src/main/java"
    osgiModule = false
}

group = "priv.barrow"

如果有人可以帮助我,我将不胜感激。

4

0 回答 0