Message Boards
Error on hook ServiceWrapper - Liferay 7
Joaquin Cabal, modified 4 Years ago.
Error on hook ServiceWrapper - Liferay 7
Regular Member Posts: 106 Join Date: 9/7/09 Recent Posts
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!