Trying to publish But this error occurs | Community
Skip to main content
New Participant
Sep 25, 2023 5:26 AM UTC
Solved

Trying to publish But this error occurs

[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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Sep 25, 2023 5:56 AM UTC

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

4 replies

kautuk_sahni
Employee
Sep 25, 2023 12:52 PM UTC

@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.

Translate
Kautuk Sahni
varun249715
Employee
Sep 25, 2023 8:03 AM UTC

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.

Translate
Jagadeesh_Prakash
New Participant
Sep 25, 2023 7:07 AM UTC

@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 

Translate
aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Sep 25, 2023 5:56 AM UTC

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.

Translate
Aanchal Sikka