掲示板
serviceBuilder crashes the persistence.impl
7年前 に Fernando Gonzales によって更新されました。
serviceBuilder crashes the persistence.impl
New Member 投稿: 7 参加年月日: 16/06/08 最新の投稿
Has there been some kind of update?
When executing serviceBuilder today, it rebuilt the fetchByPrimaryKey method in each persistence.impl file like this:
As you can see, a nullModel variable is introduced and apparently it should be a global one, though it is defined at no point in the generated source code. Obviously, this prevents any compilation.
Has anyone else experienced the same or an idea what could possibly go wrong here?
When executing serviceBuilder today, it rebuilt the fetchByPrimaryKey method in each persistence.impl file like this:
public Answer fetchByPrimaryKey(Serializable primaryKey) {
Serializable serializable = entityCache.getResult(AnswerModelImpl.ENTITY_CACHE_ENABLED,
AnswerImpl.class, primaryKey);
if (serializable == nullModel) {
return null;
}
Answer answer = (Answer)serializable;
if (answer == null) {
Session session = null;
try {
session = openSession();
answer = (Answer)session.get(AnswerImpl.class, primaryKey);
if (answer != null) {
cacheResult(answer);
}
else {
entityCache.putResult(AnswerModelImpl.ENTITY_CACHE_ENABLED,
AnswerImpl.class, primaryKey, nullModel);
}
}
[...]
}
return answer;
}
As you can see, a nullModel variable is introduced and apparently it should be a global one, though it is defined at no point in the generated source code. Obviously, this prevents any compilation.
Has anyone else experienced the same or an idea what could possibly go wrong here?
7年前 に Christoph Rabel によって更新されました。
RE: serviceBuilder crashes the persistence.impl
Liferay Legend 投稿: 1554 参加年月日: 09/09/24 最新の投稿
The new variable was introduced about three weeks ago and it simply isn't there in 7.0 GA1.
https://github.com/liferay/liferay-portal/commit/4c1b051e69e27c140d8e6864614fea8b64a978c6
Not sure what to do about it. Probably we need to wait for a GA2 release of Liferay ...
https://github.com/liferay/liferay-portal/commit/4c1b051e69e27c140d8e6864614fea8b64a978c6
Not sure what to do about it. Probably we need to wait for a GA2 release of Liferay ...
7年前 に Ben Ley によって更新されました。
RE: serviceBuilder crashes the persistence.impl
New Member 投稿: 1 参加年月日: 16/02/16 最新の投稿
Same problem here. I noticed that the build script always fetches the latest version (1.0.119) of 'com.liferay.portal.tools.service.builder' which is not compatible with LR 7 GA1. Even if I change the Service Builder dependency in build.gradle to another version, it still fetches the latest version and builds the service classes with the unknown nullModel. Is there any way to select a working version of Service Builder for GA1?
build.gradle:
build output:
build.gradle:
buildscript {
dependencies {
classpath group: "com.liferay", name: "com.liferay.gradle.plugins.service.builder", version: "1.0.9"
classpath group: "com.liferay", name: "com.liferay.portal.tools.service.builder", version: "1.0.113"
}
}
apply plugin: "com.liferay.portal.tools.service.builder"
dependencies {
compile 'biz.aQute.bnd:biz.aQute.bndlib:3.1.0'
compile 'com.liferay:com.liferay.portal.spring.extender:2.0.2'
compile 'com.liferay:com.liferay.osgi.util:2.0.4'
compile project(':modules:test-portlet:test-portlet-api')
testCompile 'com.liferay:com.liferay.arquillian.extension.junit.bridge:1.0.0-SNAPSHOT'
testCompile 'junit:junit:4.+'
}
buildService {
apiDir = "../test-portlet-api/src/main/java"
osgiModule = true
propsUtil = "test.project.service.util.PropsUtil"
testDir = "src/main/test"
}
build output:
08:41:07: Executing external task 'buildService'...
Download https://repository.liferay.com/nexus/content/groups/public/com/liferay/com.liferay.portal.tools.service.builder/1.0.113/com.liferay.portal.tools.service.builder-1.0.113.jar
:modules:test-portlet:test-portlet-service:buildService
Download http://cdn.repository.liferay.com/nexus/content/groups/public/com/liferay/com.liferay.portal.tools.service.builder/1.0.119/com.liferay.portal.tools.service.builder-1.0.119.jar
Building Test1
Building Test2
Building Test3
Writing src/main/resources/service.properties
BUILD SUCCESSFUL
7年前 に Christoph Rabel によって更新されました。
RE: serviceBuilder crashes the persistence.impl
Liferay Legend 投稿: 1554 参加年月日: 09/09/24 最新の投稿
Just now GA2 was released, I guess the problem is solved.
7年前 に Djamel TORCHE によって更新されました。
RE: serviceBuilder crashes the persistence.impl
New Member 投稿: 18 参加年月日: 14/10/21 最新の投稿Christoph Rabel:
Just now GA2 was released, I guess the problem is solved.
Hi,
Even with the new version 7.0 GA2 it doesn't work!! blade 1.0.1 20160607.....
Please provide us a solution, Liferay stuff ??
Kind regards,
Djamel
7年前 に Christoph Rabel によって更新されました。
RE: serviceBuilder crashes the persistence.impl
Liferay Legend 投稿: 1554 参加年月日: 09/09/24 最新の投稿
It works when you change all dependencies of 'com.liferay.portal.kernel:2.0.0' to version 2.6.0. You need to fix all generated build.gradle files and replace the dependency:
compile 'com.liferay.portal:com.liferay.portal.kernel:2.0.0' to compile 'com.liferay.portal:com.liferay.portal.kernel:2.6.0'
hth
compile 'com.liferay.portal:com.liferay.portal.kernel:2.0.0' to compile 'com.liferay.portal:com.liferay.portal.kernel:2.6.0'
hth