AnnualReturnsController.class (Permission denied)

crio-user@adiitrack7:~/workspace/adiitrack7-ME_QMONEY$ ./gradlew publishToMavenLocal

BUILD SUCCESSFUL in 18s
5 actionable tasks: 2 executed, 3 up-to-date
crio-user@adiitrack7:~/workspace/adiitrack7-ME_QMONEY$ ./gradlew verifyMavenJarsCreated

Task :verifyMavenJarsCreated
All Maven repository files are created and in place

BUILD SUCCESSFUL in 0s
2 actionable tasks: 2 executed
#######################################################
~/workspace/annual-return-app$ ./gradlew build bootrun

/home/crio-user/workspace/annual-return-app/src/main/java/com/crio/stock/annualreturnapp/AnnualReturnsController.java:21: error: error while writing AnnualReturnsController: /home/crio-user/workspace/annual-return-app/build/classes/java/main/com/crio/stock/annualreturnapp/AnnualReturnsController.class (Permission denied)
public class AnnualReturnsController {

#############################################################

~/workspace/annual-return-app$ sudo ./gradlew build bootrun

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:compileJava’.

Could not resolve all files for configuration ‘:compileClasspath’.
Could not find com.crio.warmup:annual-return:1.0.0.
Required by:
project :

#############################################################
jar file is already created and verified above
#############################################################

maybe you need to look into the config to publish in build.gradle

Refer to this FAQ :slight_smile:
https://forum.crio.do/t/error-maven-repository-directory-not-created/8133/2

crio-user@adiitrack7:~/workspace/adiitrack7-ME_QMONEY$ ./gradlew verifyMavenJarsCreated

Task :verifyMavenJarsCreated
All Maven repository files are created and in place

Again I am getting

/home/crio-user/workspace/annual-return-app/src/main/java/com/crio/stock/annualreturnapp/AnnualReturnsController.java:21: error: error while writing AnnualReturnsController: /home/crio-user/workspace/annual-return-app/build/classes/java/main/com/crio/stock/annualreturnapp/AnnualReturnsController.class (Permission denied)
public class AnnualReturnsController {

###############
@AmoghaKS #

Have you given execute permission to gradlew already?
before executing this ; ./gradlew build bootrun

am really not sure about this error; but am doing a wild guess, itz something to do with your conf, do check it…read doc and see if everything matches.

1 Like

#######################################################
~/workspace/annual-return-app$ ./gradlew build bootrun

/home/crio-user/workspace/annual-return-app/src/main/java/com/crio/stock/annualreturnapp/AnnualReturnsController.java:21: error: error while writing AnnualReturnsController: /home/crio-user/workspace/annual-return-app/build/classes/java/main/com/crio/stock/annualreturnapp/AnnualReturnsController.class (Permission denied)
public class AnnualReturnsController {

use these (referring to the ScreenShot)
cd ..
ls -l
then send a SS

i wanted to know if gradlew has execute permission

1 Like

“i wanted to know if gradlew has execute permission”

I meant to say go to annual-return

1 Like

yaa…n this is fine…
without looking at conf that you have written itz hard to tell what the error is

it can be cz of something else, in that case I cant help

1 Like

cleaning and building again resolve this issue… Thanks Everyone … :clinking_glasses:

1 Like