Wednesday, May 9, 2012

Ahh... found a nice little nugget today related to Grails 2.0.3 - you can't have a domain class with 'DataSource' anywhere in it. I reversed engineered a legacy domain class called 'DataSource' - I figured this would cause a problem with the depenency injection, because there is an injectable object with the same name. I figure 'oh, I'll fool it and prefix the class with something'. Wrong, you can't do that either. It will give you weird compile errors on any class that references the class with 'DataSource' in it. Actually it looks like a compiler error, but under the covers it's actually a NPE in the compiler. Moral of the story is don't have a class name with 'datasource' anywhere in it :)



| Error Error running script run-app: org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see the full trace)
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more




No comments: