2016-11-24 51 views
0

我創建了服務構建器,並且在* -service中我需要com.liferay.util.dao.orm.CustomSQLUtil以執行自定義sql。我創建了* FinderImpl並創建了一個我使用CustomSQLUtil的方法。我成功構建並部署了* -api和* -service。但是,當我將* -api和* -service拖放到正在運行的服務器上時,出現上述錯誤。 我bnd.bnd文件如下: -未解決的需求:導入包:com.liferay.util.dao.orm;版本=「[6.2.0,7.0.0]」

Bundle-SymbolicName: customuser-service 
Bundle-Version: 1.0.0 
Liferay-Require-SchemaVersion: 1.0.0 
Liferay-Service: true 
Bundle-ClassPath:\ 
    .,\ 
    lib/util-java.jar,\ 

而且的build.gradle如下: -

dependencies { 
    compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" 
    compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0" 
    compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0" 
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0" 
    compile project(":modules:customuser:customuser-api") 

    compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3' 

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

} 

buildService { 
    apiDir = "../customuser-api/src/main/java" 
    osgiModule = true 
    propsUtil = "com.example.service.util.PropsUtil" 
} 

請幫助...提前感謝名單..

+0

你可以更新BND文件的全部內容,並生成MANIFEST.MF文件的內容,你的問題? –

回答

0

嘗試增加這條線

provided group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0" 

到你的build.gradle依賴關係。例如: -

dependencies { 
    compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0" 
    compile group: "com.liferay", name: "com.liferay.osgi.util", version: "3.0.0" 
    compile group: "com.liferay", name: "com.liferay.portal.spring.extender", version: "2.0.0" 
    compile group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.6.0" 
    compile project(":modules:customuser:customuser-api") 
    compile group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3' 
    compile group: 'com.liferay.portal', name: 'util-java', version: '6.2.4' 

    provided group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0" 

}