User 55ffa2f197
06-05-2012 23:45:05
Hi, I am writting following simple script, it runs fine outside of the IJC. However IJC seems do not like it.
Following are the scripts + the Error details. I am using IJC 5.9.3. Any solution or alternative will be greatly appreciated
Thanks
Dong
Script:
import groovy.swing.SwingBuilder
import javax.swing.*
import java.awt.*
new SwingBuilder().edt {
frame(title:'Searching IBM patent solr indexes', defaultCloseOperation:JFrame.EXIT_ON_CLOSE, pack:true, show:true){
vbox{
textlabel = label("Type in a valid solr query")
query = textField()
querylabel = label("Give the query a short/descriptive name")
qname = textField()
button(
text:'Search',
actionPerformed: {
println "Query is " + query.text
println "query name is " + qname.text
}
)
}
}
}
Error stacktrace:
org.netbeans.ExitSecurityException: Illegal attempt to exit early
at org.netbeans.TopSecurityManager.checkExitImpl(TopSecurityManager.java:214)
at org.netbeans.TopSecurityManager$PrivilegedCheck.run(TopSecurityManager.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at org.netbeans.TopSecurityManager$PrivilegedCheck.check(TopSecurityManager.java:729)
at org.netbeans.TopSecurityManager$PrivilegedCheck.checkExit(TopSecurityManager.java:717)
at org.netbeans.TopSecurityManager.checkExit(TopSecurityManager.java:157)
at javax.swing.JFrame.setDefaultCloseOperation(Unknown Source)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2388)
at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3312)
at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:183)
at groovy.util.FactoryBuilderSupport.setNodeAttributes(FactoryBuilderSupport.java:1047)
at groovy.util.FactoryBuilderSupport.handleNodeAttributes(FactoryBuilderSupport.java:929)
at groovy.util.FactoryBuilderSupport.createNode(FactoryBuilderSupport.java:690)
at groovy.util.FactoryBuilderSupport.dispathNodeCall(FactoryBuilderSupport.java:807)
at groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:745)
at groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:465)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:423)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:346)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:145)
at script13363478492611471584147$_run_closure1.doCall(script13363478492611471584147.groovy:6)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:928)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.Closure.call(Closure.java:410)
at groovy.lang.Closure.call(Closure.java:404)
at java_util_concurrent_Callable$call.call(Unknown Source)
at groovy.swing.SwingBuilder$_edt_closure1.doCall(SwingBuilder.groovy:282)
at sun.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at groovy.swing.SwingBuilder$_edt_closure1.doCall(SwingBuilder.groovy)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
at groovy.lang.Closure.call(Closure.java:410)
at groovy.lang.Closure.call(Closure.java:404)
at groovy.lang.Closure.run(Closure.java:488)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:137)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)