Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
-LocalService variable not being injected by ServiceBuilder 7.2
I have a single service.xml where all my entities are defined. I notice that I can access the -Persistence variables in my entity. But when I use the -LocalService variables, it's not recognized by IDE and code also fails to compile. I even tried using the reference tag to reference specific entities already in my service.xml, but didn't solve the problem. Pls am I supposed to use Osgi to inject services inside same service.xml before I can use them?
There were same changes to service builder:
https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes
https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes
Thanks Christoph. Interesting read, I'd have to use @Reference to get in my local service variables then. Many thanks.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™