Class 'myClassName' already exists in package 'myPackageName'
Asked Answered
S

1

6

I suddenly started facing a strange issue while working on my Grails application using IntelliJ. I have different domain classes and some other classes under src/groovy. When I open a class file to make some changes, I get an error that this class already exists in package which I don't have. I tried to rename the class using refactor but after that I still get the same error.

Can anybody suggest what's wrong here or if I did something wrong?

Selfsacrifice answered 19/6, 2014 at 8:8 Comment(2)
Now, Even I create a new Domain Class, Service or Grails Job for the very first time, I get this errorSelfsacrifice
Maybe related: https://mcmap.net/q/1286820/-quot-class-already-exists-quot-error-in-intellij-on-groovy-class/437212 or https://mcmap.net/q/1447811/-idea-groovy-test-class-already-exists/437212Anomalistic
F
0

Try to "Clear" you project and build again.

Francoise answered 19/6, 2014 at 8:14 Comment(2)
You mean grails clean?Broadside
I have cleaned my application by 'grails clean' but for the time being error dis-appears but when I try to edit or even open that file, this error occurs againSelfsacrifice

© 2022 - 2024 — McMap. All rights reserved.