Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Trying to publish But this error occurs

Avatar

Level 1

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project mysite.ui.apps: Compilation failure
[ERROR] /C:/AEMProjects/Projects/mysite/mysite/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/mysite/components/author__002d__books/author__002d__books_html.java:[43,65] cannot find symbol
[ERROR] symbol: class AuthorBooks
[ERROR] location: package com.mysite.core.models

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @vkl1 

 

I guess you are trying to build code and this error is appearing in the console.

It appears you have a component (author__002d__books), which is looking for a Model com.mysite.core.models.AuthorBooks

 

Requesting you to please verify, if its present in the code.

If its available, please confirm that core module is building before ui.apps.


Aanchal Sikka

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

Hello @vkl1 

 

I guess you are trying to build code and this error is appearing in the console.

It appears you have a component (author__002d__books), which is looking for a Model com.mysite.core.models.AuthorBooks

 

Requesting you to please verify, if its present in the code.

If its available, please confirm that core module is building before ui.apps.


Aanchal Sikka

Avatar

Community Advisor

@vkl1 seems their is some issue with AuthorBooks class. Can you try deleting the target folder and try. Some dependencies are not getting resolved may be 

Avatar

Employee

Its a compilation issue. Please check if class AuthorBooks is present or not.

If its present also check author component if correct path of AuthorBooks is mentioned or not.

Avatar

Administrator

@vkl1 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni