Sometimes the IDE makes some error because of the cache. In Eclipse, we can use clean to solve the problem. But how can I do this in IntelliJ?
Delete the "target" folder under the offending module. Then Build | Rebuild Project. Also make sure your clear the web browsers cache.