<?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>Liferay 7.2 - UserLocalServiceWrapper not working?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114810968" />
  <subtitle>Liferay 7.2 - UserLocalServiceWrapper not working?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114810968</id>
  <updated>2026-04-04T13:32:02Z</updated>
  <dc:date>2026-04-04T13:32:02Z</dc:date>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114825117" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114825117</id>
    <updated>2019-08-20T19:22:45Z</updated>
    <published>2019-08-20T19:22:45Z</published>
    <summary type="html">LOL -- I don&amp;#39;t know about sleepy. I think we all suffer from the same &amp;#34;I&amp;#39;ve starred at this for so long now I see something I want to see, not what it actually is&amp;#34; syndrome from time to time. What you need is a rubber duck! &lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging"&gt;https://en.wikipedia.org/wiki/Rubber_duck_debugging&lt;/a&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-08-20T19:22:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114824390" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114824390</id>
    <updated>2019-08-20T16:36:05Z</updated>
    <published>2019-08-20T16:36:05Z</published>
    <summary type="html">How silly I am... This was not working because I was setting my service wrong. On my serviceSetter method I was passing a UserLocalServiceWrapper instead of an UserLocalService. Don&amp;#39;t know how this happened (probably a wrong copy/paste) but this was the problem. After solving this the service works as expected! Thank you both for the help!&lt;br /&gt;&lt;br /&gt;PS: Next time I should paste here my entire class... Maybe you are not as sleepy as I am &lt;img alt="emoticon" src="@theme_images_path@/emoticons/smile.gif" &gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-08-20T16:36:05Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114823716" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114823716</id>
    <updated>2019-08-20T15:27:33Z</updated>
    <published>2019-08-20T15:27:33Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;How strange... I did a breakpoint at the super.addUserWithWorkflow on the&amp;nbsp;UserLocalServiceWrapper class and it did pause there after adding an User. However Overriding this same method on my UserLocalServiceWrapperOverride class, this method was ignored. Also I noticed that when I start the server I get this Log:&lt;br&gt;&lt;pre&gt;&lt;code&gt;2019-08-20 15:34:43.242 INFO &amp;amp;nbsp;[main][SystemCheckOSGiCommands:111] Running "Declarative Service Unsatisfied Component Checker". You can run this by itself with command "ds:unsatisfied" in gogo shell.
2019-08-20 15:34:51.948 WARN &amp;amp;nbsp;[main][SystemCheckOSGiCommands:134] Declarative Service Unsatisfied Component Checker check result: _Bundle {id: 1075, name: pt.globaleda.portalgra, version: 1.0.0}_&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;Declarative Service {id: 6, name: pt.globaleda.portalgra.wrappers.UserWrapper, unsatisfied references: _&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;{name: serviceSetter, target: null}&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-08-20T15:27:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114817040" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114817040</id>
    <updated>2019-08-20T14:59:37Z</updated>
    <published>2019-08-20T14:59:37Z</published>
    <summary type="html">Excellent point. I think there was a whole conversation around this in the slack channel the other day -- and David was actually saying that when you want to add a user using the API that you should just call the addUserWithWorkflow method. That method is in fact called from the addUser method, but if the action command that the control panel uses calls it directly, then the wrapper would of course not be invoked for the test.You could also try using the script tab in the Server Administrator section to write a quick groovy script to call the addUser method too.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-08-20T14:59:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114821081" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114821081</id>
    <updated>2019-08-20T14:56:36Z</updated>
    <published>2019-08-20T14:56:36Z</published>
    <summary type="html">I think when you add user from control panel  super.addUserwithWorkflow(..)  is called so you can try adding SoP in that and see</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-08-20T14:56:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816704" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816704</id>
    <updated>2019-08-20T14:56:09Z</updated>
    <published>2019-08-20T14:56:09Z</published>
    <summary type="html">Your module might be active, but one or more components inside might not be. Can you try running the scr:info command on the canonical name of your wrapper class in the gogo shell? it will output a bunch of information about the component. Copy and paste the output here for us.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-08-20T14:56:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816368" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816368</id>
    <updated>2019-08-20T14:53:19Z</updated>
    <published>2019-08-20T14:53:19Z</published>
    <summary type="html">Ok, I understood the differences between the Local and Not Local, but I can&amp;#39;t seem to make it work yet. There are two methods &amp;#34;addUser&amp;#34; on the UserLocalServiceWrapper class, I have Overrided them both to print a System.out.println(&amp;#34;something&amp;#34;) before the super.addUser(). Then I go to my instance control panel and add a new user, just like I did with the UserServiceWrapper, but this time my Overrided methods are never called. If i go to the Gogo shell and type &amp;#34;lb&amp;#34; I can see my module active, so I presume that it is correctly deployed.</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-08-20T14:53:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816015" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114816015</id>
    <updated>2019-08-20T13:38:24Z</updated>
    <published>2019-08-20T13:38:24Z</published>
    <summary type="html">&lt;blockquote&gt;What is the main difference between UserServiceWrapper and UserLocalServiceWrapper? &lt;br /&gt;&lt;/blockquote&gt;To add a little more to what Mohammed added, the UserService (no local) is normally the entry point for an external call in. So for example, the JSON Web services. The normal development flow then in the XXXServiceImpl classes is to check the user and their permissions and if they are &amp;#34;allowed&amp;#34; you then invoke the XXXLocalService methods. If you are working with a component in your application (as in not coming in from outside) then you normally use the XXXLocalService set of services because your initial &amp;#34;Access&amp;#34; vetting has already been provided (because your user has logged into the portal already). &lt;br /&gt;So in short XXXService normally provides additional or tighter security measures than XXXLocalService. Everything else, Mohammed answered already.</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-08-20T13:38:24Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114817602" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114817602</id>
    <updated>2019-08-20T12:06:50Z</updated>
    <published>2019-08-20T12:06:50Z</published>
    <summary type="html">[quote=]&lt;blockquote&gt;What is the main difference between UserServiceWrapper and UserLocalServiceWrapper? &lt;/blockquote&gt;UserServieWrapper is class which Wrap the UserService  and UserLocalServiceWrapper is class which wraps the UserLocalService.  so if you  want to   wrap   localservice then you  use localServiceWrapper and for remote or webservice you use servicewrapper . You can refer below url also &lt;br /&gt;&lt;a href="https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/customizing-liferay-services-service-wrappers"&gt;https://portal.liferay.dev/docs/7-0/tutorials/-/knowledge_base/t/customizing-liferay-services-service-wrappers&lt;/a&gt;&lt;br /&gt;[quote=]&lt;blockquote&gt;Why is one working and the other not?&lt;/blockquote&gt;May be its not deployed correctly .You can try deleting your wrapper module and deploy once more </summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2019-08-20T12:06:50Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.2 - UserLocalServiceWrapper not working?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114810967" />
    <author>
      <name>Fabio Carvalho</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114810967</id>
    <updated>2019-08-20T11:23:52Z</updated>
    <published>2019-08-20T11:23:52Z</published>
    <summary type="html">I have been using UserServiceWrapper to add information to my database when I add a new user. Overriding the &amp;#34;addUser&amp;#34; method it has been working until now. But if I understand correctly I should be using UserLocalServiceWrapper. The thing is that changing my class to extends UserLocalServiceWrapper the &amp;#34;addUser&amp;#34; method don&amp;#39;t work anymore. I have changed the &amp;#34;serviceSetter&amp;#34; method to set an UserLocalServiceWrapper and I have also changed the addUser method to the same method present in UserLocalServiceWrapper (same parameters). What is the main difference between UserServiceWrapper and UserLocalServiceWrapper? Why is one working and the other not?</summary>
    <dc:creator>Fabio Carvalho</dc:creator>
    <dc:date>2019-08-20T11:23:52Z</dc:date>
  </entry>
</feed>
