<?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>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114394622" />
  <subtitle>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=114394622</id>
  <updated>2026-04-03T20:01:53Z</updated>
  <dc:date>2026-04-03T20:01:53Z</dc:date>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114482691" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114482691</id>
    <updated>2019-07-29T15:09:53Z</updated>
    <published>2019-07-29T15:09:53Z</published>
    <summary type="html">Sorry for the confusion, Ivano.&lt;br /&gt;&lt;br /&gt;If you are using &amp;#34;spring&amp;#34; for the dependency injector, then your local service impl classes should not have the @Component annotation nor @Reference injection inside of the class. The local service impl will be a Spring bean, not a DS component.&lt;br /&gt;&lt;br /&gt;If you are using &amp;#34;ds&amp;#34; for the dependency injector, then your local service impl classes must have the @Component annotation in order to be exposed as a DS component and are free to use @Reference injection.&lt;br /&gt;&lt;br /&gt;The bodies of the local service impl class shouldn&amp;#39;t change much between the two dependency injectors; if you have an addGuestbook(...) method, it would apply to both forms so you don&amp;#39;t need to strip it out when switching.&lt;br /&gt;&lt;br /&gt;The thing to remember is that historically Service Builder has been really bad at cleaning up after itself. I don&amp;#39;t know that SB can clean up correctly when you switch the dependency injector after you have built the services the first time. My guess is it doesn&amp;#39;t know how to clean up at all, leaving you the developer with the responsibility to perform the necessary cleanup.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-29T15:09:53Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114481846" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114481846</id>
    <updated>2019-07-29T13:58:46Z</updated>
    <published>2019-07-29T13:58:46Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;One more question ...&lt;br /&gt;Since I decided to use the  dependency-injector=&amp;#34;ds&amp;#34;, now I have a doubt.&lt;br /&gt;In a previous message you wrote: &amp;#34;Also, for spring DI none of your classes should be declared as @Components. You&amp;#39;ll want to purge all of these annotations.&amp;#34;&lt;br /&gt;When I ran Service Builder the first time, with the dependency-injector=&amp;#34;ds&amp;#34; as default, it generated the below code  in the skeleton of all *LocalServiceImpl classes:&lt;br /&gt;&lt;br /&gt;@Component(&lt;br /&gt;    property = &amp;#34;model.class.name=mc.infocomm.ipl.test.guestbook.model.Guestbook&amp;#34;,&lt;br /&gt;    service = AopService.class&lt;br /&gt;)&lt;br /&gt;public class GuestbookLocalServiceImpl extends GuestbookLocalServiceBaseImpl {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So now I have to remove the above code from all  *LocalServiceImpl classes ?&lt;br /&gt;&lt;br /&gt;Please note that actually the Guestbook portlet including the @Component annotations in all  *LocalServiceImpl classes is running very well and without errors.&lt;br /&gt;&lt;br /&gt;Thank you again for clarifications and help.&lt;br /&gt;&lt;br /&gt;Ivano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-29T13:58:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470931" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470931</id>
    <updated>2019-07-28T18:34:26Z</updated>
    <published>2019-07-28T18:34:26Z</published>
    <summary type="html">You&amp;#39;re welcome, Ivano.&lt;br /&gt;&lt;br /&gt;I think choosing the right dependency-injector is going to be a personal choice. I also don&amp;#39;t believe it has to be a &amp;#34;forever&amp;#34; choice; I think it is perfectly acceptable to choose &amp;#34;spring&amp;#34; for one SB implementation and &amp;#34;ds&amp;#34; for another. Use the one that best fits what you are building.&lt;br /&gt;&lt;br /&gt;Me, most of the time I tend to see all of my entities in the service.xml as &amp;#34;tightly coupled&amp;#34;, such as the guestbook and entry entities. Since they are coupled, for me at least, I feel like guestbook methods (like the delete example) will be invoking entry methods and entry methods will at times want to invoke guestbook methods (i.e. if guestbook had a &amp;#34;last entry timestamp&amp;#34; that was updated every time an entry were being added). Because I see these kinds of relationships as being a &amp;#34;default state&amp;#34; for the entities, I want them to establish and use the services and persistence layers of others and I wouldn&amp;#39;t want to have to figure out how to work around circular dependencies, etc. So for me, a &amp;#34;spring&amp;#34; dependency injector is typically going to be the right choice because of how I see the entities relating.&lt;br /&gt;&lt;br /&gt;The DS option is definitely easier when your service components need to access other DS components beyond the local service.xml services, so if I knew I had to go down that road, DS would probably be my choice.&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t think there&amp;#39;s ever going to be a &amp;#34;right&amp;#34; vs &amp;#34;wrong&amp;#34; answer, you can make both options fit in pretty much every case you find.&lt;br /&gt;&lt;br /&gt;I wrote the blog, though, because I really wasn&amp;#39;t aware of these changes for 7.2, and it wouldn&amp;#39;t surprise me if others who had been doing Liferay for a while didn&amp;#39;t know about them either. Yours is the second error about the new 7.2 implementation I&amp;#39;ve encountered, so I wanted to make sense out of what was going on and spell everything out to avoid future devs from stumbling into the same situation.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-28T18:34:26Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114473172" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114473172</id>
    <updated>2019-07-28T16:50:23Z</updated>
    <published>2019-07-28T16:50:23Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you very much for your efforts during the development of this thread.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In fact other than resolve the issue, you teached me a lot of things and helped me to follow my learning curve.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Contrarily to your final advise in the final chapter &amp;#34;Choosing The Right Dependency Injector&amp;#34; in the  &lt;a href="https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes"&gt;https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes&lt;/a&gt;  Blog article, I decided to use the new default in Service Builder that is &lt;strong&gt;dependency-injector=&amp;#34;ds&amp;#34;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;The above cause starting a new project based on 7.2 I think that if Liferay made the choice of the above as the new Service Builder default, it can be a better guarantee of continuity for the future.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best regards and thank you again for your help!&lt;br /&gt;Ivano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-28T16:50:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470570" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470570</id>
    <updated>2019-07-28T16:34:40Z</updated>
    <published>2019-07-28T16:34:40Z</published>
    <summary type="html">It wouldn&amp;#39;t surprise me if the environment is now confused, first version of API was based on OSGi, this one based on Spring...&lt;br /&gt;&lt;br /&gt;I would recommend purging Guestbook from the env completely (make sure there is nothing in osgi/modules, work, etc) as well as purging osgi/state.&lt;br /&gt;&lt;br /&gt;Also, for spring DI none of your classes should be declared as @Components. You&amp;#39;ll want to purge all of these annotations. It may be necessary, although I admit I don&amp;#39;t know, to try purging all of the generated SB code and then re-gen again, as this would help to eliminate any possible code hanging around that was based off of the other dependency injector.&lt;br /&gt;&lt;br /&gt;This kind of cleanup has never been easy in SB, relatively simple things like changing package name in the service.xml would often leave cruft hanging behind... It just takes a little bit of patience to work through it...</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-28T16:34:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470103" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114470103</id>
    <updated>2019-07-28T08:22:56Z</updated>
    <published>2019-07-28T08:22:56Z</published>
    <summary type="html">Ok, I added  &amp;#34;dependency-injector=&amp;#39;spring&amp;#39;&amp;#34; in the service.xml file.&lt;br /&gt;&lt;br /&gt;After I removed the below code in the GuestbookLocalServiceImpl class:&lt;br /&gt;&lt;br /&gt;@Reference(unbind = &amp;#34;-&amp;#34;)&lt;br /&gt;        protected void setEntryService(EntryLocalService entryLocalService) {&lt;br /&gt;            _entryLocalService = entryLocalService;&lt;br /&gt;        }        &lt;br /&gt;private EntryLocalService _entryLocalService;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then I changed the calls to the methods provided by the EntryLocalServiceImpl class, for example:&lt;br /&gt;&lt;br /&gt;List&amp;lt;Entry&amp;gt; entries = &lt;strong&gt;entryLocalService&lt;/strong&gt;.getEntries(serviceContext.getScopeGroupId(), guestbookId);    // NO MORE ERRORS !!!&lt;br /&gt;&lt;br /&gt;But at that point I get a lot of errors in the service packages saying:  &amp;#34;The import com.liferay.portal.spring cannot be resolved&amp;#34;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I solved the issue adding the below in the build.gradle:&lt;br /&gt;&lt;br /&gt;compile &amp;#39;com.liferay:com.liferay.portal.spring.extender:2.0.15&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BUT now in the IDE when I drag the guestbook-service module in the Tomcat bundle the module doesn&amp;#39;t start and is marked with a red point.&lt;br /&gt;&lt;br /&gt;If I do a deploy Gradle task I get the below error log:&lt;br /&gt;&lt;br /&gt;Gradle Tasks: deploy&amp;gt; Task :modules:guestbook:guestbook-api:compileJava UP-TO-DATE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:buildCSS NO-SOURCE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:processResources NO-SOURCE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:transpileJS SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:configJSModules SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:replaceSoyTranslation NO-SOURCE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:wrapSoyAlloyTemplate SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:classes UP-TO-DATE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-api:jar UP-TO-DATE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:compileJava UP-TO-DATE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:buildCSS NO-SOURCE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:processResources UP-TO-DATE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:transpileJS SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:configJSModules SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:replaceSoyTranslation NO-SOURCE&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:wrapSoyAlloyTemplate SKIPPED&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:classes UP-TO-DATE&amp;gt; Task :modules:guestbook:guestbook-service:jar FAILED&lt;br /&gt;error  : Class mc.infocomm.ipl.test.guestbook.service.impl.EntryLocalServiceImpl is not assignable to specified service com.liferay.portal.aop.AopService&lt;br /&gt;error  : Class mc.infocomm.ipl.test.guestbook.service.impl.EntryServiceImpl is not assignable to specified service com.liferay.portal.aop.AopService&lt;br /&gt;error  : Class mc.infocomm.ipl.test.guestbook.service.impl.GuestbookLocalServiceImpl is not assignable to specified service com.liferay.portal.aop.AopService&lt;br /&gt;error  : Class mc.infocomm.ipl.test.guestbook.service.impl.GuestbookServiceImpl is not assignable to specified service com.liferay.portal.aop.AopServiceFAILURE: Build failed with an exception.* What went wrong:&lt;br /&gt;Execution failed for task &amp;#39;:modules:guestbook:guestbook-service:jar&amp;#39;.&lt;br /&gt;&amp;gt; Bundle mc.infocomm.ipl.test.guestbook.service-1.0.0.jar has errors&lt;br /&gt;&lt;br /&gt;At this point I&amp;#39;m a bit worried about the absence of a some sort of guideline about dependencies to develop in 7.x versions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you in advance for any other help,&lt;br /&gt;Ivano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-28T08:22:56Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468672" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468672</id>
    <updated>2019-07-27T18:24:36Z</updated>
    <published>2019-07-27T18:24:36Z</published>
    <summary type="html">Yep, that&amp;#39;s spot on...&lt;br /&gt;&lt;br /&gt;Alternatively, you could set the dependency injector back to spring to make things work the way they used to.&lt;br /&gt;&lt;br /&gt;I wrote up a blog about SB 7.2 changes, some of which I learned about when helping here: &lt;a href="https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes"&gt;https://liferay.dev/blogs/-/blogs/important-7-2-service-builder-changes&lt;/a&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-27T18:24:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468340" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468340</id>
    <updated>2019-07-27T15:08:45Z</updated>
    <published>2019-07-27T15:08:45Z</published>
    <summary type="html">Dear David, probably I solved my case :-)&lt;br /&gt;&lt;br /&gt;I added the below code in the GuestbookLocalServiceImpl class:&lt;br /&gt;&lt;br /&gt;@Reference(unbind = &amp;#34;-&amp;#34;)&lt;br /&gt;        protected void setEntryService(EntryLocalService entryLocalService) {&lt;br /&gt;            _entryLocalService = entryLocalService;&lt;br /&gt;        }        private EntryLocalService _entryLocalService;&lt;br /&gt;&lt;br /&gt;Then I changed the calls to the methods provided by the EntryLocalServiceImpl class, for example:&lt;br /&gt;&lt;br /&gt;List&amp;lt;Entry&amp;gt; entries = _entryLocalService.getEntries(serviceContext.getScopeGroupId(), guestbookId);    // NO MORE ERRORS !!!&lt;br /&gt;&lt;br /&gt;It is the above the right solution ?&lt;br /&gt;&lt;br /&gt;Thank you,&lt;br /&gt;Ivvano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-27T15:08:45Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468008" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114468008</id>
    <updated>2019-07-27T14:57:35Z</updated>
    <published>2019-07-27T14:57:35Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;No apologies from you, you are teaching me many new things.&lt;br /&gt;&lt;br /&gt;Thank you for your last reply about the @Reference annotation.&lt;br /&gt;Unfortunately I can&amp;#39;t understand where I have to put the above annotation.&lt;br /&gt;&lt;br /&gt;Also I read your Blog article here  &lt;a href="https://liferay.dev/blogs/-/blogs/liferay-osgi-annotations-what-they-are-and-when-to-use-them"&gt;https://liferay.dev/blogs/-/blogs/liferay-osgi-annotations-what-they-are-and-when-to-use-them&lt;/a&gt;   but still I&amp;#39;m not able to call methods in EntryLocalServiceImpl class from the GuestbookLocalServiceImpl class in my Guestbook application in 7.2 environment.&lt;br /&gt;&lt;br /&gt;Please could you address me where I have to put the @Reference annotation in my services ?&lt;br /&gt;&lt;br /&gt;Thank you in advance,&lt;br /&gt;Ivano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-27T14:57:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114463007" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114463007</id>
    <updated>2019-07-26T20:27:42Z</updated>
    <published>2019-07-26T20:27:42Z</published>
    <summary type="html">Okay, Ivano, I have to start with an apology...&lt;br /&gt;&lt;br /&gt;I was assuming that the long-standing practice of Service Builder injecting local service and persistence automatically in the XXXLocalServiceImpl&amp;#39;s super class would obviously not have been stripped, even for 7.2.&lt;br /&gt;&lt;br /&gt;But in discussions w/ other Liferay folks I&amp;#39;ve learned that actually has happened. Other local services and persistence instances for entities in the same service.xml file are no longer automatically injected.&lt;br /&gt;&lt;br /&gt;Mostly this was due to the conversion of the local services into pure OSGi components and the issues that would have sprung from having circular references on all of the local service implementations (if Guestbook @References the Entry local service and Entry @References the Guestbook local service, neither one can be resolved by OSGi since all references are not ready for injection).&lt;br /&gt;&lt;br /&gt;Instead, that whole practice has been scrapped.&lt;br /&gt;&lt;br /&gt;Going forward, if you need other local service or persistence instances for the other entities, you need to manually declare the member variables yourself and @Reference inject them. Note, however, that by doing this yourself it doesn&amp;#39;t eliminate the potential of creating a circular reference in your components that would prevent them from starting.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m going to hook up w/ the documentation team and other folks involved to get clarification about how developers should proceed and certainly update the doco to represent these new developer responsibilities.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m just sorry it took this long to develop the proper answer for you...</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-26T20:27:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114461983" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114461983</id>
    <updated>2019-07-26T19:07:00Z</updated>
    <published>2019-07-26T19:07:00Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Ah, I have an inkling having seen the 7.2 syntax...&lt;br&gt;&lt;br&gt;Can you try adding the following to your bnd.bnd file in the guestbook-service module:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;-dsannotations-options: inherit
&lt;/code&gt;&lt;/pre&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-26T19:07:00Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114460020" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114460020</id>
    <updated>2019-07-26T15:40:25Z</updated>
    <published>2019-07-26T15:40:25Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Of course there is an EntryLocalServiceImpl class in the mc.infocomm.ipl.test.guestbook.service.impl package.&lt;br /&gt;&lt;br /&gt;It is the one with inside the Entry&amp;#39;s methods  that are not found from the GuestbookLocalServiceImpl class.&lt;br /&gt;I can&amp;#39;t call the methods entryLocalService.getEntries() and entryLocalService.deleteEntry().&lt;br /&gt;&lt;br /&gt;Here is the code:&lt;br /&gt;&lt;br /&gt;package mc.infocomm.ipl.test.guestbook.service.impl;import com.liferay.portal.aop.AopService;&lt;br /&gt;import com.liferay.portal.kernel.exception.PortalException;&lt;br /&gt;import com.liferay.portal.kernel.exception.SystemException;&lt;br /&gt;import com.liferay.portal.kernel.model.User;&lt;br /&gt;import com.liferay.portal.kernel.service.ServiceContext;&lt;br /&gt;import com.liferay.portal.kernel.util.OrderByComparator;&lt;br /&gt;import com.liferay.portal.kernel.util.Validator;import java.util.Date;&lt;br /&gt;import java.util.List;import mc.infocomm.ipl.test.guestbook.model.Entry;&lt;br /&gt;import mc.infocomm.ipl.test.guestbook.service.base.EntryLocalServiceBaseImpl;&lt;br /&gt;import mc.infocomm.ipl.test.guestbook.exception.EntryEmailException;&lt;br /&gt;import mc.infocomm.ipl.test.guestbook.exception.EntryMessageException;&lt;br /&gt;import mc.infocomm.ipl.test.guestbook.exception.EntryNameException;import org.osgi.service.component.annotations.Component;/**&lt;br /&gt; * The implementation of the entry local service.&lt;br /&gt; *&lt;br /&gt; * &amp;lt;p&amp;gt;&lt;br /&gt; * All custom service methods should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the &amp;lt;code&amp;gt;mc.infocomm.ipl.test.guestbook.service.EntryLocalService&amp;lt;/code&amp;gt; interface.&lt;br /&gt; *&lt;br /&gt; * &amp;lt;p&amp;gt;&lt;br /&gt; * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.&lt;br /&gt; * &amp;lt;/p&amp;gt;&lt;br /&gt; *&lt;br /&gt; * @author icarrara&lt;br /&gt; * @see EntryLocalServiceBaseImpl&lt;br /&gt; */&lt;br /&gt;@Component(&lt;br /&gt;    property = &amp;#34;model.class.name=mc.infocomm.ipl.test.guestbook.model.Entry&amp;#34;,&lt;br /&gt;    service = AopService.class&lt;br /&gt;)&lt;br /&gt;public class EntryLocalServiceImpl extends EntryLocalServiceBaseImpl {    /*&lt;br /&gt;     * NOTE FOR DEVELOPERS:&lt;br /&gt;     *&lt;br /&gt;     * Never reference this class directly. Use &amp;lt;code&amp;gt;mc.infocomm.ipl.test.guestbook.service.EntryLocalService&amp;lt;/code&amp;gt; via injection or a &amp;lt;code&amp;gt;org.osgi.util.tracker.ServiceTracker&amp;lt;/code&amp;gt; or use &amp;lt;code&amp;gt;mc.infocomm.ipl.test.guestbook.service.EntryLocalServiceUtil&amp;lt;/code&amp;gt;.&lt;br /&gt;     */&lt;br /&gt;    &lt;br /&gt;    public Entry addEntry(long userId, long guestbookId, String name, String email, String message, ServiceContext serviceContext) throws PortalException {            long groupId = serviceContext.getScopeGroupId();            User user = userLocalService.getUserById(userId);            Date now = new Date();            validate(name, email, message);            long entryId = counterLocalService.increment();            Entry entry = entryPersistence.create(entryId);            entry.setUuid(serviceContext.getUuid());&lt;br /&gt;            entry.setUserId(userId);&lt;br /&gt;            entry.setGroupId(groupId);&lt;br /&gt;            entry.setCompanyId(user.getCompanyId());&lt;br /&gt;            entry.setUserName(user.getFullName());&lt;br /&gt;            entry.setCreateDate(serviceContext.getCreateDate(now));&lt;br /&gt;            entry.setModifiedDate(serviceContext.getModifiedDate(now));&lt;br /&gt;            entry.setExpandoBridgeAttributes(serviceContext);&lt;br /&gt;            entry.setGuestbookId(guestbookId);&lt;br /&gt;            entry.setName(name);&lt;br /&gt;            entry.setEmail(email);&lt;br /&gt;            entry.setMessage(message);            entryPersistence.update(entry);            return entry;&lt;br /&gt;            &lt;br /&gt;        }&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;        public Entry updateEntry (long userId, long guestbookId, long entryId, String name, String email, String message, ServiceContext serviceContext) throws PortalException, SystemException {&lt;br /&gt;    &lt;br /&gt;                Date now = new Date();&lt;br /&gt;    &lt;br /&gt;                validate(name, email, message);&lt;br /&gt;    &lt;br /&gt;                Entry entry = getEntry(entryId);&lt;br /&gt;    &lt;br /&gt;                User user = userLocalService.getUserById(userId);&lt;br /&gt;    &lt;br /&gt;                entry.setUserId(userId);&lt;br /&gt;                entry.setUserName(user.getFullName());&lt;br /&gt;                entry.setModifiedDate(serviceContext.getModifiedDate(now));&lt;br /&gt;                entry.setName(name);&lt;br /&gt;                entry.setEmail(email);&lt;br /&gt;                entry.setMessage(message);&lt;br /&gt;                entry.setExpandoBridgeAttributes(serviceContext);&lt;br /&gt;    &lt;br /&gt;                entryPersistence.update(entry);&lt;br /&gt;    &lt;br /&gt;                return entry;&lt;br /&gt;                &lt;br /&gt;            }&lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;            public Entry deleteEntry (long entryId, ServiceContext serviceContext) throws PortalException {&lt;br /&gt;    &lt;br /&gt;                Entry entry = getEntry(entryId);                entry = deleteEntry(entryId);                return entry;&lt;br /&gt;                    &lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;            &lt;br /&gt;            public List&amp;lt;Entry&amp;gt; getEntries(long groupId, long guestbookId) {&lt;br /&gt;                &lt;br /&gt;                return entryPersistence.findByG_G(groupId, guestbookId);&lt;br /&gt;                &lt;br /&gt;            }            &lt;br /&gt;            public List&amp;lt;Entry&amp;gt; getEntries(long groupId, long guestbookId, int start, int end) throws SystemException {                return entryPersistence.findByG_G(groupId, guestbookId, start, end);&lt;br /&gt;                &lt;br /&gt;            }            &lt;br /&gt;            public List&amp;lt;Entry&amp;gt; getEntries(&lt;br /&gt;                    &lt;br /&gt;                long groupId, long guestbookId, int start, int end, OrderByComparator&amp;lt;Entry&amp;gt; obc) {                return entryPersistence.findByG_G(groupId, guestbookId, start, end, obc);&lt;br /&gt;                &lt;br /&gt;            }            &lt;br /&gt;            public int getEntriesCount(long groupId, long guestbookId) {&lt;br /&gt;                &lt;br /&gt;                return entryPersistence.countByG_G(groupId, guestbookId);&lt;br /&gt;                &lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;    &lt;br /&gt;            protected void validate(String name, String email, String entry) throws PortalException {                if (Validator.isNull(name)) {&lt;br /&gt;                    &lt;br /&gt;                    throw new EntryNameException();&lt;br /&gt;                    &lt;br /&gt;                }                if (!Validator.isEmailAddress(email)) {&lt;br /&gt;                    &lt;br /&gt;                    throw new EntryEmailException();&lt;br /&gt;                    &lt;br /&gt;                }                if (Validator.isNull(entry)) {&lt;br /&gt;                    &lt;br /&gt;                    throw new EntryMessageException();&lt;br /&gt;                    &lt;br /&gt;                }&lt;br /&gt;                    &lt;br /&gt;            }&lt;br /&gt;    &lt;br /&gt;    }</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-26T15:40:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114458546" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114458546</id>
    <updated>2019-07-26T15:11:42Z</updated>
    <published>2019-07-26T15:11:42Z</published>
    <summary type="html">Hmm, wicked.&lt;br /&gt;&lt;br /&gt;So I can see from the buildService output there is an Entry entity, so I&amp;#39;m also assuming you have an EntryLocalServiceImpl class, etc., in the mc.infocomm.ipl.test.guestbook.service.impl package?</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-26T15:11:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114457038" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114457038</id>
    <updated>2019-07-26T14:09:36Z</updated>
    <published>2019-07-26T14:09:36Z</published>
    <summary type="html">Dear David, here is the output from the complete build using &amp;#34;gradlew.bat build&amp;#34; within the guestbook-service module:&lt;br /&gt;&lt;br /&gt;C:\dev\liferay\7.2.0-ce-ga1\ipl-workspace\mc-infocomm-ipl\modules\guestbook\guestbook-service&amp;gt;..\..\..\gradlew.bat build&lt;br /&gt;Starting a Gradle Daemon, 3 incompatible and 1 stopped Daemons could not be reused, use --status for details&amp;gt; Task :modules:guestbook:guestbook-service:compileJava&lt;br /&gt;C:\dev\liferay\7.2.0-ce-ga1\ipl-workspace\mc-infocomm-ipl\modules\guestbook\guestbook-service\src\main\java\mc\infocomm\ipl\test\guestbook\service\impl\GuestbookLocalServiceImpl.java:117: error: cannot find symbol&lt;br /&gt;                    List&amp;lt;Entry&amp;gt; entries = entryLocalService.getEntries(serviceContext.getScopeGroupId(), guestbookId);  // entryLocalService cannot be resolved&lt;br /&gt;                                          ^&lt;br /&gt;  symbol:   variable entryLocalService&lt;br /&gt;  location: class GuestbookLocalServiceImpl&lt;br /&gt;C:\dev\liferay\7.2.0-ce-ga1\ipl-workspace\mc-infocomm-ipl\modules\guestbook\guestbook-service\src\main\java\mc\infocomm\ipl\test\guestbook\service\impl\GuestbookLocalServiceImpl.java:120: error: cannot find symbol&lt;br /&gt;                            entryLocalService.deleteEntry(entry.getEntryId());  // entryLocalService cannot be resolved&lt;br /&gt;                            ^&lt;br /&gt;  symbol:   variable entryLocalService&lt;br /&gt;  location: class GuestbookLocalServiceImpl&lt;br /&gt;Note: Some input files use unchecked or unsafe operations.&lt;br /&gt;Note: Recompile with -Xlint:unchecked for details.&lt;br /&gt;2 errors&amp;gt; Task :modules:guestbook:guestbook-service:compileJava FAILEDFAILURE: Build failed with an exception.* What went wrong:&lt;br /&gt;Execution failed for task &amp;#39;:modules:guestbook:guestbook-service:compileJava&amp;#39;.&lt;br /&gt;&amp;gt; Compilation failed; see the compiler error output for details.* Try:&lt;br /&gt;Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 11s&lt;br /&gt;3 actionable tasks: 1 executed, 2 up-to-date</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-26T14:09:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114457504" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114457504</id>
    <updated>2019-07-26T13:16:22Z</updated>
    <published>2019-07-26T13:16:22Z</published>
    <summary type="html">So it builds the services fine, how about just a complete build using &amp;#34;gradlew.bat build&amp;#34; and let it churn it all?&lt;br /&gt;&lt;br /&gt;You should be able to run gradlew in subdirs, but you&amp;#39;ll have to use a relative path to get there, i.e. within the guestbook-service module it would be &amp;#34;..\..\..\gradlew.bat build&amp;#34;.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-26T13:16:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114454263" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114454263</id>
    <updated>2019-07-26T07:24:54Z</updated>
    <published>2019-07-26T07:24:54Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;I executed the gradlew.bat buildService command from the root of the project.&lt;br /&gt;I&amp;#39;m not able to tun Gradle commands from other folders. I&amp;#39;m using only the Gradle wrapped in the IDE.&lt;br /&gt;Below what I done and no errors building services:&lt;br /&gt;&lt;br /&gt;C:\dev\liferay\7.2.0-ce-ga1\ipl-workspace\mc-infocomm-ipl&amp;gt;gradlew.bat buildService&lt;br /&gt;&amp;gt; Task :modules:guestbook:guestbook-service:buildService&lt;br /&gt;Building Entry&lt;br /&gt;Building Guestbook&lt;br /&gt;Writing src\main\resources\service.properties&lt;br /&gt;BUILD SUCCESSFUL in 4s&lt;br /&gt;1 actionable task: 1 executed</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-26T07:24:54Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114451533" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114451533</id>
    <updated>2019-07-26T00:13:40Z</updated>
    <published>2019-07-26T00:13:40Z</published>
    <summary type="html">Okay, let&amp;#39;s try something different.&lt;br /&gt;&lt;br /&gt;If you open a command prompt in the guestbook-service module and attempt to build it, what is the generated output?</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-26T00:13:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114448463" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114448463</id>
    <updated>2019-07-25T20:54:23Z</updated>
    <published>2019-07-25T20:54:23Z</published>
    <summary type="html">Dear David,&lt;br /&gt;After I dragged the guestbook-api and guestbook-service from the Project Explorer to the running Tomcat bundle, only guestbook-api is present in the lb command output in the Gogo shell:&lt;br /&gt;&lt;br /&gt; 2150|Active | 1|guestbook-api (1.0.0)|1.0.0&lt;br /&gt;&lt;br /&gt;So I can&amp;#39;t try to start  guestbook-service because it is not present.&lt;br /&gt;&lt;br /&gt;Thank you for your support !&lt;br /&gt;&lt;br /&gt;Ivano</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-25T20:54:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114449527" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114449527</id>
    <updated>2019-07-25T20:25:19Z</updated>
    <published>2019-07-25T20:25:19Z</published>
    <summary type="html">A red X doesn&amp;#39;t do anything to diagnose the issue...&lt;br /&gt;&lt;br /&gt;Can you get into the Gogo shell (&lt;strong&gt;telnet localhost 11311&lt;/strong&gt; if on 7.0 or use the Gogo control panel in 7.1+), use the &lt;strong&gt;lb&lt;/strong&gt; command to find the service, then &lt;strong&gt;start &lt;em&gt;XXX&lt;/em&gt;&lt;/strong&gt; to start the bean w/ the matching id?&lt;br /&gt;&lt;br /&gt;That will give you the detailed OSGi reason why the bundle cannot start. It&amp;#39;s from that point that we&amp;#39;ll diagnose and resolve the issue.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-07-25T20:25:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay Guestbook Web Application - entryLocalService cannot be resolve</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114440837" />
    <author>
      <name>Ivano Carrara</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=114440837</id>
    <updated>2019-07-25T17:06:41Z</updated>
    <published>2019-07-25T17:06:41Z</published>
    <summary type="html">Dear David,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m deployng the test modules in Eclipse IDE - attached here you can see the error mark of guestbook-service in Servers panel of the IDE.&lt;br /&gt;Maibe I have to delete the project and restart from scratch but I&amp;#39;m a bit worried since this big issue in a so simple module.&lt;br /&gt;&lt;br /&gt;Ivano C.</summary>
    <dc:creator>Ivano Carrara</dc:creator>
    <dc:date>2019-07-25T17:06:41Z</dc:date>
  </entry>
</feed>
