Message Boards
Guestbook-web not compiling
Guestbook-web not compiling
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsI am working through the tutorials 'Building a web application' in Liferay 7.2.
When I add the references to the services in the 'GuestbookPortlet', I see an error message in the 'guestbook-web' deployed in the server. I am not able to find out what is wrong because all my gradle tasks are greyed out.
@Reference
private GuestbookEntryLocalService _guestbookEntryLocalService;
@Reference
private GuestbookLocalService _guestbookLocalService;
RE: Guestbook-web not compiling
Expert Posts: 291 Join Date: 2/13/13 Recent PostsHi Anu, you probably already have this, but make sure you have the compileOnly project declarations for guestbook-api and guestbook-service in the web module's build.gradle file. And make sure you have the import for org.osgi.service.component.annotations.Reference
You can run the gradle tasks right from the command line as well. Do you have blade installed? You can run
blade gw clean
RE: RE: Guestbook-web not compiling
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsHi Russell,
Thanks for your immediate response. Yes, I do have the compileOnly project declarations for guestbook-api and guestbook-service. Also, I have the correct import of the Reference class in the GuestbookPortlet. BTW, I found an alternate method to run the gradle tasks to build the jar files. I right click the gradlew.batch and run configurations and pick the gradle task to create the jar file. It is not throwing any errors but still I see the red mark on the guestbook-web project under the server.
RE: RE: Guestbook-web not compiling
New Member Posts: 2 Join Date: 10/13/22 Recent PostsI have the same problem. Have you been able to resolve this?
RE: Guestbook-web not compiling
Junior Member Posts: 50 Join Date: 4/24/15 Recent PostsHi John, yes I resolved this. Dont know if there was any resolution for this but I started re-doing the entire project again in Liferay 7.3. It worked.
thanks,
Anu