留言板
Liferay 7 Hibernate Sample
Hi, is there a sample of a portlet using Hibernate?? Im getting beaten up by lib conflicts.
OSGI or War. Any working example would help a lot. Thanks
OSGI or War. Any working example would help a lot. Thanks
David H Nebinger,修改在7 年前。
RE: Liferay 7 Hibernate Sample
Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
I'd avoid direct hibernate access; service builder gives you the same functionality but works well within the portal environment.
David H Nebinger:
I'd avoid direct hibernate access; service builder gives you the same functionality but works well within the portal environment.
I tried using service builder with the last Developer Studio version, its not working. Everytime that I run Build Services I get a "Could not create IProject Builder". Ive tested in a new Eclipse workspace with a new Liferay Workspace, didnt change anything, tried to build the sample service.xml and the error still occurs.
David H Nebinger,修改在7 年前。
RE: Liferay 7 Hibernate Sample
Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
When all else fails, the gradle build process has no problems!
As an intellij user, I typically revert to the command line to run blade and gradle. The point here is that you shouldn't let the IDE choose what you do and how. The IDE is a tool to help you get things done, but it's not the only way.
As an intellij user, I typically revert to the command line to run blade and gradle. The point here is that you shouldn't let the IDE choose what you do and how. The IDE is a tool to help you get things done, but it's not the only way.
Indeed, it worked using only Gradle. Thanks
The only problem Im having now is when I deploy it. It disappears when I reference one of my services.
If I reference a Liferay Service it works, example:
But when I add my service, it just disappers, doesnt show any error:
build.gradle:
Am I missing something? All 3 modules are active on Gogo Shell, service, service-api and the view module.
The only problem Im having now is when I deploy it. It disappears when I reference one of my services.
If I reference a Liferay Service it works, example:
private CounterLocalService counterService;
@Reference(unbind = "-")
public void setCounterService(CounterLocalService counterService) {
this.counterService = counterService;
}
But when I add my service, it just disappers, doesnt show any error:
@Reference(unbind = "-")
public void setCounterService(CounterLocalService counterService) {
this.counterService = counterService;
}
@Reference(unbind = "-")
public void setTesteService(TesteLocalService testeService) {
this.testeService = testeService;
}
build.gradle:
compileOnly project(":modules:testeServico:testeServico-api")
Am I missing something? All 3 modules are active on Gogo Shell, service, service-api and the view module.