I recently updated my Grails project to version 2.3.1 from 2.0.1. The project works fine on my Window machine and on my colleague Mac (pulled through Git). However, on my Mac, I get this error when I try to launch the application after the plugins are installed and compiled:
ClassNotFoundException: org.springframework.beans.factory.NoUniqueBeanDefinitionException
The full stack trace is at http://pastebin.com/iEvKBmG5 , but that is the point of the error.
If I run grails interactively, the server starts, but when I go to the controller, I just get a white page.
What can be different from my environment on my Mac and the environment of my colleague that causes this error? Here I tried to fix the problem:
- Removing the contents of my ~ / .grails folder (as well as less extreme options for cleaning individual subfolders)
- Removing a project and extracting it from git
grails clean- Reinstall Grails 2.3.1 (using gvm, so my commands were
gvm uninstall grails 2.3.1 , gvm flush archives , gvm install grails 2.3.1 ) - Cloning project contents to another directory
- Checking the dependency report to ensure that the spring version is more than 3.2.1, to which the NoUniqueBeanDefinitionException class has been added. For a full report, see http://pastebin.com/0AVC0SA0 .
- Verify that the NoUniqueBeanDefinitionException.class file is in the spring-beans jar located at ~ / .gvm / grails / 2.3.1 / lib / org.springframework / spring-beans / jars / spring -. beans -3.2.4.RELEASE.jar
grails refresh-dependencies myApplicationDependencies.xml The resulting file is at http://pastebin.com/5bG9Vv78 .- Manually removed release 3.1.2 spring - beans and other spring cans from my maven repository, as it was indicated in the dependencies. Maven just solves it though.
- Switching the dependency converter to ivy and receiving a dependency report. Version 3.1.2 spring is listed as "evicted."
Both my colleague and I have Mac OS X Mavericks and the latest version of Java. Any thoughts are welcome.
UPDATE I also double-checked that my project did not contain duplicate classes. To do this, I ran grails dev war and used jar scan with the -double flag to find duplicate classes. Nothing found.
Again, I'm sure the system is not really trying to throw a NoUniqueBeanDefinitionException. I think he is just trying to find this class and cannot for some reason.
source share