One of my coleagues has tried to reproduce on Windows. Thinking maybe the problem could be somehow windows specific. But he had no luck and couldn't reproduce.
Starting to get a little desperate here. The problem seems serious enough that it needs fixing, but if we can't reproduce or figure out why it happens that is hard.
Let's try to confirm first whether we are still dealing with the same ASTTranform related problem. The key to this is the contents of the "AuditLogEventController.class" file. There will be several versions of this .class file floating around on your system. I would like to get those files from you to inspect their contents.
So after you have had a chance to upgrade. Can you try to deploy your app to tc server.
For good measure first do a clean:
- clean your project before doing this (Menu Project >> Clean).
then with the server not yet started do
menu "run as >> run on server" to deploy your app to the server.
Confirm that the bug is happening still.
Then zip up the web-inf/classes folder from your app from the following places. (and make sure to label them so I can tell which is which).
1) the one you find actually deployed in the spring-insight instance of tc server.
E.g. on my machine that is:
2) The one in the war file that was built by STS (this should be actually the same file, but it could be different, want to make sure!
This file is inside the .metadata of the runonserver plugin in a kind of staging area used to take the contents of the war file built by grails and mix-and-match it with incremental changes from the workspace.
3) the one in your project, in the workspace under
If you are interested in what I'm looking for, it's a runtime Java annotation on this class that is inserted by an AST transform. All the trouble we had before was caused by this one missing annotation.
You can use command
javap -verbose -private -classpath <path-to-the-classes-dir> org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController
To print out the full details of that class file.
We are looking for something like this:
RuntimeVisibleAnnotations: length = 0x10
00 01 00 08 00 02 00 09 73 00 0A 00 0B 73 00 0C
Finally, another debugging tool is the Groovy event trace console. You can open this in the Eclipse console view, right click on the leftmost litte console icon and choose "Groovy event trace console". This will open a view displaying info on what groovy compiler is doing.
Interesting thing to check would be to go to the AuditLogEventController.groovy file. Add some meaningless white space and save it. After you save you should see something like
Ast Transforms : 10:39:34 Global transform org.codehaus.groovy.grails.compiler.injection.GlobalPluginAwareEntityASTTransformation on /SampleSTS/.link_to_grails_plugins/audit-logging-0.5.4/grails-app/controllers/org/codehaus/groovy/grails/plugins/orm/auditable/AuditLogEventController.groovy = 113ms
Something else that may (or may not) be important is that it looks like you have STS and your workspace under "Documents and Settings". That's a path with spaces in it, and this is often a cause for trouble (i.e. the spaces often trigger bugs which wouldn't happen if there where no spaces on the path). It is possible that you are experiencing a bug that is triggered specifically by spaces on the path. So something that may be worth a try is to put them somewhere else instead, making sure there are no spaces in the name. Maybe the spaces aren't really the cause of the problem, but it would be good to rule it out.