Guestbook tutorial Error: Could not resolve moduleGuestbook tutorial Error: Could not resolve modulehttps://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=1215362142024-03-29T01:27:18Z2024-03-29T01:27:18ZGuestbook tutorial Error: Could not resolve moduleJohn Muellerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1215362132022-10-13T16:16:53Z2022-10-13T15:34:13Z<p>Hi,</p>
<p>I'm doing the guestbook tutorial and I'm stuck at this point:Â https://help.liferay.com/hc/en-us/articles/360032887712-Integrating-the-Back-end</p>
<p>As soon as I'm integrating the following code into the
GuestbookPortlet.java I'm getting an error.</p>
<blockquote>
<p>@Reference<br /> Â Â Â private GuestbookEntryLocalService _guestbookEntryLocalService;</p>
<p>Â Â Â @Reference<br /> Â Â Â private GuestbookLocalService _guestbookLocalService;</p></blockquote>
<p>The error:</p>
<blockquote>
<p>org.osgi.framework.BundleException: Could not resolve module:
com.liferay.docs.guestbook.portlet [2131]_ Â Unresolved requirement:
Import-Package: com.liferay.docs.guestbook.service;
version="[1.0.0,2.0.0)"_ [Sanitized]<br /> Â Â Â at
org.eclipse.osgi.container.Module.start(Module.java:444)<br /> Â Â
 at
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1682)<br />
   at
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1662)<br />
   at
org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1624)<br />
   at
org.eclipse.osgi.container.SystemModule.startWorker(SystemModule.java:264)<br />
   at
org.eclipse.osgi.container.Module.doStart(Module.java:581)<br /> Â Â
 at org.eclipse.osgi.container.Module.start(Module.java:449)<br />
   at
org.eclipse.osgi.container.SystemModule.start(SystemModule.java:188)<br />
   at
org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)<br />
   at
org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:447)<br />
   at org.eclipse.osgi.launch.Equinox.start(Equinox.java:115)<br />
   at
com.liferay.portal.bootstrap.ModuleFrameworkImpl.startFramework(ModuleFrameworkImpl.java:399)<br />
   at
com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.startFramework(ModuleFrameworkUtilAdapter.java:100)<br />
   at
com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:300)<br />
   at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682)<br />
   at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150)<br />
   at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)<br />
   at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)<br />
   at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)<br />
   at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)<br />
   at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)<br />
   at
org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832)<br />
   at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)<br />
   at
java.util.concurrent.FutureTask.run(FutureTask.java:266)<br /> Â Â
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)<br />
   at
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)<br />
   at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526)<br />
   at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)<br />
   at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)<br />
   at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)<br />
   at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)<br />
   at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)<br />
   at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)<br />
   at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)<br />
   at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)<br />
   at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)<br />
   at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)<br />
   at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)<br />
   at
java.util.concurrent.FutureTask.run(FutureTask.java:266)<br /> Â Â
 at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)<br />
   at
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)<br />
   at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)<br />
   at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)<br />
   at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)<br />
   at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)<br />
   at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)<br />
   at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)<br />
   at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)<br />
   at
org.apache.catalina.startup.Catalina.start(Catalina.java:634)<br />
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)<br /> Â Â Â at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br />
   at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br />
   at java.lang.reflect.Method.invoke(Method.java:498)<br />    at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)<br />
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)</p></blockquote>
<p>Also the tomcat server says: Error "Could not create output
jar" happened on guestbook-web</p>
<p>I can run the server and access the liferay dashboard and everything
but the portlet wouldn't show anymore. Before adding the @reference
everything was working fine. </p>
<p>What is also weird when I type in lb guestbook in Gogo Shell only the
guestbook-web appears:</p>
<blockquote>
<p>
<b>Output</b></p>
<pre>
START LEVEL 20
ID|State |Level|Name
2131|Installed | 1|guestbook-web (1.0.0)|1.0.0</pre></blockquote>
<p>As far as I understood in a different post there should be
guestbook-api and guestbook-service showing too? I integrated the
dependencies for both in guestbook-web's build-gradle.</p>
<blockquote>
<p>Â Â compileOnly
project(":modules:guestbook:guestbook-api")<br /> Â Â
compileOnly project(":modules:guestbook:guestbook-service")</p></blockquote>
<p>I'm very new to liferay I've never worked with this kind of software.
I'm thrown in at the deep end here from my work. So please bear with
me and talk to me like I'm a toddler or similar :).</p>
<p>Appreciate your feedback!</p>
<p>Thanks</p>
<p>Â