RE: Stuck at Integrating the Back-end with Guestbook tutorial (OSGi depende

Robert Paul Meissner, modified 5 Years ago. New Member Posts: 12 Join Date: 2/7/20 Recent Posts
Hi,
 
I got stuck with the guestbook tutorial at integrating the backend. https://help.liferay.com/hc/en-us/articles/360032887712-Integrating-the-Back-end When I try to deploy my guestbook-service and guestbook-api (which is btw not mentioned until here in the turorial) i can install the modules, but they don't start. When I try to start the service, I get:
gogo: BundleException: Could not resolve module: com.liferay.docs.guestbook.service [2243]
  Unresolved requirement: Import-Package: com.liferay.docs.guestbook.model; version="[1.0.0,1.1.0)"
    -> Export-Package: com.liferay.docs.guestbook.model; bundle-symbolic-name="com.liferay.docs.guestbook.api"; bundle-version="1.0.0"; version="1.0.0"; uses:="com.liferay.exportimport.kernel.lar,com.liferay.portal.kernel.annotation,com.liferay.portal.kernel.bean,com.liferay.portal.kernel.model,com.liferay.portal.kernel.model.wrapper,com.liferay.portal.kernel.util"
       com.liferay.docs.guestbook.api [2244]
         Unresolved requirement: Import-Package: com.liferay.exportimport.kernel.lar; version="[2.0.0,3.0.0)"
  Unresolved requirement: Import-Package: com.liferay.docs.guestbook.exception; version="[1.0.0,2.0.0)"
    -> Export-Package: com.liferay.docs.guestbook.exception; bundle-symbolic-name="com.liferay.docs.guestbook.api"; bundle-version="1.0.0"; version="1.0.0"; uses:="com.liferay.portal.kernel.exception"

and when I try to start the api, I get:
gogo: BundleException: Could not resolve module: com.liferay.docs.guestbook.api [2244]
  Unresolved requirement: Import-Package: com.liferay.exportimport.kernel.lar; version="[2.0.0,3.0.0)"

I am using Liferay CE Portal 7.3.0-ga1 and the code is pretty much like here: https://github.com/liferay/liferay-docs/tree/master/en/developer/tutorials/code/guestbook/04-web-front-end/com-liferay-docs-guestbook

Any hints?
 
Best regards,
 
Rome
Robert Paul Meissner, modified 5 Years ago. New Member Posts: 12 Join Date: 2/7/20 Recent Posts
I have found a sulution (by accident) by adding version in the api and the service
 
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version:"5.3.0"

 
BUT 
bumping versions until you score
as suggested by David H Nebinger https://liferay.dev/forums/-/message_boards/message/102513997 seems to me not a feasible solution and i don't understand it to the fullest (why does 7.3.0 not work?), but how about putting all needed dependencies to a GA release under the same version? Or make a table with all dependencies for each version. This would make things easier...
 
Best regards,
 
Rome
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
That was the only solution 2 years ago when I posted it...

Now, however, we have the Target Platform: https://liferay.dev/blogs/-/blogs/what-is-the-target-platform-

Had you been using the TP, this would not have been an issue for you to deal with at all.
Robert Paul Meissner, modified 5 Years ago. New Member Posts: 12 Join Date: 2/7/20 Recent Posts
Thanks a lot! This works nicely. I knew, you Liferay guys made great progress in the last 2 years. emoticon