错误java.lang.NoClassDefFoundError:com / liferay / util / dao / orm / CustomSQLUtil

时间:2016-11-25 10:54:58

标签: liferay liferay-7

我已将包含上述文件的名为util-java.jar的jar添加到build .gradle文件中。在编译时没有错误。但在执行项目时,我得到NoClassDefFoundError

请告诉我如何根除这个问题。我的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'
    runtime group: 'com.liferay.portal', name: 'portal-kernel', version: '5.2.3'



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

2 个答案:

答案 0 :(得分:0)

类似的东西:

compileOnly group:" com.liferay",name:" com.liferay.portal.dao.orm.custom.sql",version:" 1.0.5&# 34;

应该帮助你。

答案 1 :(得分:0)

这是一个版本问题,更改

compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.1.0"

compile group: "biz.aQute.bnd", name: "biz.aQute.bndlib", version: "3.5.0"