New -> Grails -> Grails Domain Class doesn't work on the first try

Hi there,

I use Idea 7343 and JGroovy plugin from SVN build from 2007/10/10. If I try to add a new domain class into a fresh and newly created project, the domain class is not being created at the first try. It took me a few tries to create a grails domain class. It seems that I have to change some selections or focus within the idea application. After that it was no problem to create further domain classes. I guess it has something to do with the event handling in Project Tree View. I see no exception. Can anybody confirm that behavior?

Greets
agrailsuser

PS: Maybe this exception has something to do with it. But I'm not sure. It was raised the other day on right mouse click on project node in the Project Tree View.

ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA (Selena) #7343 Build #7343
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_02
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - OS: Windows XP
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - Last Action:
2007-10-10 22:43:35,296 ERROR - com.intellij.ide.IdeEventQueue - Original exception:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:247)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.a(ActionManagerImpl.java:40)
at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.getAction(ActionManagerImpl.java:428)
at com.intellij.openapi.actionSystem.DefaultActionGroup.getChildren(DefaultActionGroup.java:225)
at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:4)
at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:79)
at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:22)
at com.intellij.openapi.actionSystem.impl.ActionMenu.f(ActionMenu.java:9)
at com.intellij.openapi.actionSystem.impl.ActionMenu.access$400(ActionMenu.java:82)
at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:3)
at javax.swing.JMenu.fireMenuSelected(JMenu.java:1028)
at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1107)
at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)
at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:215)
at javax.swing.JMenu.setSelected(JMenu.java:294)
at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1175)
at com.intellij.openapi.actionSystem.impl.ActionMenu.menuSelectionChanged(ActionMenu.java:21)
at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:101)
at javax.swing.JPopupMenu.setVisible(JPopupMenu.java:742)
at javax.swing.JPopupMenu.show(JPopupMenu.java:926)
at com.intellij.openapi.actionSystem.impl.ActionPopupMenuImpl$MyMenu.show(ActionPopupMenuImpl.java:36)
at com.intellij.ide.projectView.impl.AbstractProjectViewPane$3.invokePopup(AbstractProjectViewPane.java:3)
at com.intellij.ui.PopupHandler.mouseReleased(PopupHandler.java:54)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
at com.intellij.util.ui.Tree.processMouseEvent(Tree.java:71)
at com.intellij.ide.dnd.aware.DnDAwareTree.processMouseEvent(DnDAwareTree.java:5)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:94)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:194)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:207)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(Z)V at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.loadReflector(MetaClassRegistryImpl.java:259) at groovy.lang.MetaClassImpl.generateReflector(MetaClassImpl.java:2277) at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2161) at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.getMetaClass(MetaClassRegistryImpl.java:136) at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:70) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158) at org.jetbrains.plugins.grails.actions.NewGrailsTagLibAction.]]>(NewGrailsTagLibAction.groovy:25)
... 54 more

3 comments

Looking at presented stacktare I can suppose that the problem is closely related to plugin parts written on Groovy, such as Domain Class Create action. But I cannot suggest anything more original than re-building of all JetGroovy plugin project to solve your problem.
At last, it would be much simpler to make use of plugin manager.

0

Well, the problem still remains. Now I use the jgroovy plugin from the plugin manager (0.1.11594). No change...

Just create a new project from scratch and then try to add a new grails domain class via context menu in the project tree. These are the steps here to reproduce this behavior. It only occure on adding a domain class for the first time to a newly created project.

There was another exception in my idea log now. Any ideas?

2007-10-13 00:02:16,250 INFO - #com.intellij.idea.Main - -


IDEA STARTED -



2007-10-13 00:02:16,968 INFO - #com.intellij.idea.Main - Using "FocusKiller" library to prevent focus stealing.
2007-10-13 00:02:21,421 INFO - ij.vfs.local.win32.FileWatcher - Native file watcher is operational.
2007-10-13 00:02:26,578 INFO - llij.jetConnect.reader.JetFeed - Updating JetConnect channel: hints
2007-10-13 00:02:29,718 INFO - llij.jetConnect.reader.JetFeed - Updating JetConnect channel: news
2007-10-13 00:02:36,578 INFO - llij.jetConnect.reader.JetFeed - Updating JetConnect channel: hints
2007-10-13 00:03:15,109 INFO - s.communicator.p2p.NetworkUtil - Found Network Interfaces:
2007-10-13 00:03:15,125 INFO - .communicator.p2p.P2PTransport - Internal Web server is bound to port 2864
2007-10-13 00:03:15,125 INFO - unicator.p2p.UserMonitorThread - Force finding users
2007-10-13 00:03:15,125 INFO - unicator.p2p.UserMonitorThread - Start User Monitor Thread
2007-10-13 00:03:15,140 INFO - icator.p2p.MulticastPingThread - /192.168.178.21 IDEtalk Multicast Thread: Start thread.
2007-10-13 00:03:17,203 INFO - l.idCache.ImmutableIdCacheImpl - rebuilding cache: cache file does not exist
2007-10-13 00:03:26,109 INFO - unicator.p2p.UserMonitorThread - Force finding users
2007-10-13 00:03:29,109 INFO - or.jabber.impl.JabberTransport - Jabber connected
2007-10-13 00:03:29,343 INFO - r.jabber.impl.JabberFacadeImpl - SASL authentication failed
SASL authentication failed:
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java:204)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:433)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:396)
at jetbrains.communicator.jabber.impl.JabberFacadeImpl._createConnection(JabberFacadeImpl.java:162)
at jetbrains.communicator.jabber.impl.JabberFacadeImpl.connect(JabberFacadeImpl.java:119)
at jetbrains.communicator.jabber.impl.JabberFacadeImpl.connect(JabberFacadeImpl.java:115)
at jetbrains.communicator.jabber.impl.JabberTransport$1.run(JabberTransport.java:122)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:1)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:5)

0

Yes, the action does not work until you switch to another application, and module file is persisted. Fixed, thank you.

Eugene.

0

Please sign in to leave a comment.