<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Error on hook ServiceWrapper - Liferay 7</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118089880" />
  <subtitle>Error on hook ServiceWrapper - Liferay 7</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118089880</id>
  <updated>2026-04-03T19:39:45Z</updated>
  <dc:date>2026-04-03T19:39:45Z</dc:date>
  <entry>
    <title>Error on hook ServiceWrapper - Liferay 7</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118089879" />
    <author>
      <name>Joaquin Cabal</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118089879</id>
    <updated>2019-12-16T13:36:01Z</updated>
    <published>2019-12-16T13:36:01Z</published>
    <summary type="html">Hi! I ceated a hook of &amp;#34;service wrapper&amp;#34; 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&lt;br /&gt;java.lang.IllegalArgumentException&lt;br /&gt;    at com.liferay.registry.internal.RegistryImpl.getService(RegistryImpl.java:160)&lt;br /&gt;    at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer._getServiceBag(ServiceWrapperRegistry.java:140)&lt;br /&gt;    at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:74)&lt;br /&gt;    at com.liferay.portal.deploy.hot.ServiceWrapperRegistry$ServiceWrapperServiceTrackerCustomizer.addingService(ServiceWrapperRegistry.java:61). &lt;br /&gt;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. &lt;br /&gt;Anyone can help me with this?&lt;br /&gt;&lt;br /&gt;Thanks in advance!</summary>
    <dc:creator>Joaquin Cabal</dc:creator>
    <dc:date>2019-12-16T13:36:01Z</dc:date>
  </entry>
</feed>
