Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Java files not compiling

Avatar

Level 2

Hello everyone.

I'm extremely new to Java and AEM. I can't figure out why my Java classes are not working properly. For example I set up a method to return a string in a class that has already been made and verified. Yet when I restart my server the string is no different. I do everything in Eclipse, not sure If I'm missing something or not. Eclipse is set to build automatically.

AEM is not in debug mode, as I can't figure that out either.

 

Sorry for the noob questions.

1 Accepted Solution

Avatar

Correct answer by
Employee

Are you sure you have deployed your code into AEM?

Check /system/console for when your bundle has been updated

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Are you sure you have deployed your code into AEM?

Check /system/console for when your bundle has been updated

Avatar

Community Advisor

Hi,

are you using any project structure using maven or Lazybones ?

Make sure your Java classes are present in bundle console as feike suggested.

if not, try to click on install/update and browse your core package jar file under target folder.

 

~ Prince

Avatar

Level 2

Feike, thank you for the answer. I had to do "mvn clean install -PdeployAuthor", I'm unaware of what that's actually doing other than just deploying everything. It fixed my issue with updating classes although I get an error when I do it and it stops the build halfway through saying: 

 

Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.5.1:install (install-content-package-author) on project ui-content: Error while installing package. Check log for details. -> [Help 1]

Thanks

Avatar

Level 1

I just ran into this as well. Rookie mistake! Don't forget to run AEM before building to it

This is the full error I observed:

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.5.1:install (install-package) on project aem-guides-wknd.ui.apps: Connection refused (Connection refused) -> [Help 1]