Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Application class not found #997

Open
ronaldpatino opened this issue Jan 11, 2024 · 4 comments
Open

Error Application class not found #997

ronaldpatino opened this issue Jan 11, 2024 · 4 comments
Assignees

Comments

@ronaldpatino
Copy link

ronaldpatino commented Jan 11, 2024

Issue description

The Plugin Version: 6.1.1
Grails Version: 6.1.1
Java: 17.0.9" 2023-10-17 LTS

  1. Add the dependency
implementation("org.grails.plugins:spring-security-core:6.1.1")

The gradle.properties file:

grailsVersion=6.1.1
grailsGradlePluginVersion=6.1.1

Run the following command from the Command Line/Terminal (from the project root):

./gradlew runCommand "-Pargs=s2-quickstart com.package.app User Role"

Problem

| Error Application class not found

> Task :runCommand FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':runCommand'.
> Process 'command '/home/user/.sdkman/candidates/java/17.0.9-oracle/bin/java'' finished with non-zero exit value 1
@jromero-onclick
Copy link

Same for me

grailsVersion=6.1.1
grailsGradlePluginVersion=6.1.1
grails-spring-security-core : 6.1.1
implementation("org.grails.plugins:spring-security-core:6.1.1")
Java 11.0.21-zulu

Task :runCommand FAILED
| Error Application class not found

@jromero-onclick
Copy link

jromero-onclick commented Jan 21, 2024

FYI, the command started to work when I have commented this dependency:

// developmentOnly("org.springframework.boot:spring-boot-devtools")

But other error appeared.
I think that is not related to this issue, the command finishes with an script error:

Configuring Spring Security Core ...
... finished configuring Spring Security Core
Grails application running at http://localhost:0 in environment: development
|
Creating User class User in package com.example
|
Creating Role class Role in package com.example
Rendered template PersonWithoutInjection.groovy.template to destination grails-app/domain/com/example/User.groovy
Rendered template PersonPasswordEncoderListener.groovy.template to destination src/main/groovy/com/example/UserPasswordEncoderListener.groovy
| Error Command execution error: grails-app/conf/spring/resources.groovy (No such file or directory)

@puneetbehl
Copy link
Contributor

@ronaldpatino Can you please write step-by step instructions to either create the application and how replicate this problem? or share a sample application to start with?

This would help us to quickly resolve this problem.

@digdas1
Copy link

digdas1 commented Jul 21, 2024

My steps:
1: Create an application from start.grails.org (Grails 6.2.0
2: Add line to build.gradle: implementation 'org.grails.plugins:spring-security-core:6.1.1'
3: ./gradlew runCommand "-Pargs=s2-quickstart my.application User Role"
-> Fails
4: mkdir grails-app/conf/spring
5: Comment out (build.gradle) developmentOnly("org.springframework.boot:spring-boot-devtools")
6: ./gradlew runCommand "-Pargs=s2-quickstart my.application User Role"

It works now
7: undo step 5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants