Message Boards
service builder in liferay 7.4
service builder in liferay 7.4
Expert Posts: 326 Join Date: 12/20/10 Recent Postshi
new i try liferay 7.4.0 ga1
in my first case i use service builder
Category_IdentityLocalServiceUtil.addCategory_Identity(Category_IdentityLocalServiceUtil.createCategory_Identity(new Category_IdentityPK(Constant.ANNUAL_AVERAGE_EXCHANGE_RATES,Constant.ANNUAL_AVERAGE_EXCHANGE_RATES_USD_NTD)));
Category_IdentityLocalServiceUtil.addCategory_Identity(Category_IdentityLocalServiceUtil.createCategory_Identity(new Category_IdentityPK(Constant.ORGANIZATION_EV_CATEGORY,Constant.ORGANIZATION_EV_IDENTITY)));
after i add ANNUAL_AVERAGE_EXCHANGE_RATES, it's success, i checked from db, yes it is.
but i hit exception on add ORGANIZATION_EV_CATEGORY
2021-05-13 02:46:49.623 ERROR [http-nio-8080-exec-10][PortletServlet:119] javax.portlet.PortletException: java.lang.NullPointerException
javax.portlet.PortletException: java.lang.NullPointerException
at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:204) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:394) ~[portal-kernel.jar:?]
at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:88) ~[portal-kernel.jar:?]
Caused by: java.lang.NullPointerException
at com.liferay.portal.cache.internal.dao.orm.FinderCacheImpl.updateByEntityCache(FinderCacheImpl.java:474) ~[?:?]
at com.liferay.portal.cache.internal.dao.orm.EntityCacheImpl._notify(EntityCacheImpl.java:448) ~[?:?]
at com.liferay.portal.cache.internal.dao.orm.EntityCacheImpl._notifyFinderCache(EntityCacheImpl.java:474) ~[?:?]
at com.liferay.portal.cache.internal.dao.orm.EntityCacheImpl._putResult(EntityCacheImpl.java:510) ~[?:?]
at com.liferay.portal.cache.internal.dao.orm.EntityCacheImpl.putResult(EntityCacheImpl.java:341) ~[?:?]
at com.liferay.portal.cache.internal.dao.orm.EntityCacheImpl.putResult(EntityCacheImpl.java:363) ~[?:?]
at com.raritan.ci.ev.service.persistence.impl.Category_IdentityPersistenceImpl.updateImpl(Category_IdentityPersistenceImpl.java:637) ~[?:?]
at com.raritan.ci.ev.service.persistence.impl.Category_IdentityPersistenceImpl.updateImpl(Category_IdentityPersistenceImpl.java:70) ~[?:?]
at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:743) ~[portal-kernel.jar:?]
at com.raritan.ci.ev.service.base.Category_IdentityLocalServiceBaseImpl.addCategory_Identity(Category_IdentityLocalServiceBaseImpl.java:91) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
the code works in 7.3.5 ga6, how can i fix it?
RE: service builder in liferay 7.4
Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent PostsYou need to upgrade your workspace to 7.4 and rebuild the service. I recommend to create a new workspace for 7.4 and to take the version numbers in gradle.properties and settings.gradle from there.
Note: The same procedure is necessary when you go to 7.3 Service Pack 1.
RE: RE: service builder in liferay 7.4
Expert Posts: 326 Join Date: 12/20/10 Recent Postshi Christoph
i did.
i modified my /liferay-workspace/gradle.properties
liferay.workspace.product = portal-7.4-ga1
and i change all serice builder's service.xml
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 7.4.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_7_4_0.dtd">
i did not change settings.gradle, i did not see anything about this from liferay-portal-7-4-ce-ga1-release
my settings.gradle
buildscript {
dependencies {
classpath group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "3.0.7"
classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
}repositories {
maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}
}
}apply plugin: "net.saliman.properties"
apply plugin: "com.liferay.workspace"
and i did Gradle>Reflash Gradle Project for liferay-workspace and each modules
do i miss something?
thank you
RE: service builder in liferay 7.4
Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent PostsTry to update the settings.gradle.
classpath(group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "3.4.8") {
The gradle workspace builds the service (it contains the code for creating the files). And it seems, there was a breaking change.
RE: RE: service builder in liferay 7.4
Expert Posts: 326 Join Date: 12/20/10 Recent Postshi Christoph
i update the settings.gradle
buildscript {
dependencies {
classpath group: "biz.aQute.bnd", name: "biz.aQute.bnd", version: "5.2.0"
classpath(group: "com.liferay", name: "com.liferay.gradle.plugins.workspace", version: "3.4.15") {
exclude group: "biz.aQute.bnd", module: "biz.aQute.bnd"
}
classpath group: "net.saliman", name: "gradle-properties-plugin", version: "1.4.6"
}repositories {
maven {
url "https://repository-cdn.liferay.com/nexus/content/groups/public"
}maven {
url "https://repository.liferay.com/nexus/content/groups/public"
}}
}apply plugin: "net.saliman.properties"
apply plugin: "com.liferay.workspace"
it doesn't work.
any other thing i forget to do? shoud i build service again?