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
Error on hook ServiceWrapper - Liferay 7
Hi! I ceated a hook of "service wrapper" type and getting the following exception. 2019-12-16 13:31:55.839 ERROR [localhost-startStop-1][ServiceWrapperRegistry:77] Unable to get service bag for class com.example.hook.CustomDDMStructureLocalService
java.lang.IllegalArgumentException
at com.liferay.registry.internal.RegistryImpl.getService(RegistryImpl.java:160)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer._getServiceBag(ServiceWrapperRegistry.java:140)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:74)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:61).
The hook works fine when I deploy it on tomcat already started. But when I restart tomcat it thow this exception. I have to deploy it again. Is like when the hook is deployed, the ddmStructureLocalService instance is not initialized yet.
Anyone can help me with this?
Thanks in advance!
java.lang.IllegalArgumentException
at com.liferay.registry.internal.RegistryImpl.getService(RegistryImpl.java:160)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer._getServiceBag(ServiceWrapperRegistry.java:140)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:74)
at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:61).
The hook works fine when I deploy it on tomcat already started. But when I restart tomcat it thow this exception. I have to deploy it again. Is like when the hook is deployed, the ddmStructureLocalService instance is not initialized yet.
Anyone can help me with this?
Thanks in advance!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™