Question

So I've been writing this for some time and up until today was able to generate the WAR files without issue. I made some changes (unfortunately I can't revert the changes as I don't have version control) and now I can't generate the WAR files, although the project will still rnn fine within GGTS. When I run WAR --stacktrace --verbose I get this

Problem executing: war --stacktrace --verbose
Command terminated with an exception: java.lang.Exception: Command: C:\Program Files\Java\jdk1.7.0_11\bin\javaw.exe (20 Feb 2014 12:50:26)
---- System.out ----
Base Directory: C:\grails\MYFramework
| Loading Grails 2.1.1
| Configuring classpath.
| Environment set to production.....
| Packaging Grails application.....
| Compiling 2 source files
  [groovyc] Compiling 2 source files to C:\grails\MYFramework\target\classes
| Compiling 2 source files.....
| Compiling 94 GSP files for package [MYFramework].
| Error Compilation error: startup failed:
C:\Users\myAccnt\.grails\2.1.1\projects\MYFramework\gspcompile\gsp_MYFramework_releasecreate_gsp.groovy: 1: unable to resolve class MYframework.Release
 @ line 1, column 1.
   import MYframework.Release
   ^
1 error

Which seems to be pointing towards the file: -C:\Users\myAccnt\.grails\2.1.1\projects\MYFramework\gspcompile\gsp_MYFramework_releasecreate_gsp.groovy

When I check this out it does indeed have a line stating: - import MYframework.Release

Now "Release" was the name of a domain I set up, but shortly after creating it I renamed it to "testRelease" (before generating the controller and views etc) as I realised there was a potential for a domain called "release" to cause issues (I've had other situations like this come up).

As I said earlier, since I made that rename I have successfully re-generated the WAR files several times, until today. Has anyone experienced this? I've tried a clean and thats not made a difference. What are the files in C:\Users\myAccnt.grails\2.1.1\projects\MYFramework\gspcompile\ used for?

Can I delete these without issue?

Thanks for any help I'm at a complete loss! :S

Was it helpful?

Solution

You shouldn't touch .grails\2.1.1\projects\** files at all, as they get overwritten each time you make grails clean and grails [run/war/compile].

The obvious solution would be to open the grails-app/views/release/create.gsp and delete <%@ page import="MYframework.Release" %> from the top of it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top