August 8, 200817 yr I am using RegisterGroovy to register a script when my Database opens. The problem I'm having is that the registered script gives me the following error unless I make a EvaluateGroovy call before using the registered script: java.lang.NullPointerException: Cannot invoke method evaluate() on null object Parameters: {} ---Script--- Once I make a EvaluateGroovy call the registered script starts working correctly. The weird thing is the EvaluateGroovy call doesn't need to have anything to do with the registered script. For now to patch the problem, I have added a line to the end of my open script that just has EvaluateGroovy return the verison of FileMaker: EvaluateGroovy("version = fmpro.evaluate('Get(ApplicationVersion)')" ) Any ideas why the registered script won't run until EvaluateGroovy is used? Thanks, Salvador
August 12, 200817 yr I've never heard of this happening - could you try doing it again without that line to fix it, and then post the log file here? The log file locations are listed here: http://wo.360works.com/cgi-bin/support/productsupport.cgi/Plugin_log_files
August 12, 200817 yr Author Here the log file: [color:blue]C++ Tue Aug 12 12:32:20 2008) Writing to log file at C:Documents and Settingssalvador.NAMBETECHMy Documents360Plugin Logs360Works ScriptMaster_FMAdvanced.log (C++ Tue Aug 12 12:32:20 2008) *** INIT for 360Works ScriptMaster_FMAdvanced at Tue Aug 12 12:32:20 2008, headless mode 0 (C++ Tue Aug 12 12:32:20 2008) Found JVM dll at C:Program FilesJavajre1.6.0_07binclientjvm.dll (C++ Tue Aug 12 12:32:20 2008) No existing JVM found; creating one. (C++ Tue Aug 12 12:32:20 2008) 0: -Xms4m (C++ Tue Aug 12 12:32:20 2008) 1: -Xmx64m (C++ Tue Aug 12 12:32:20 2008) 2: -Djava.util.logging.config.file=C:Templogging.properties (C++ Tue Aug 12 12:32:20 2008) 3: vfprintf (C++ Tue Aug 12 12:32:20 2008) 4: -Xbootclasspath/a:C:Program FilesJavajre1.6.0_07libdeploy.jar;C:Program FilesJavajre1.6.0_07libplugin.jar (C++ Tue Aug 12 12:32:20 2008) 5: -Djava.ext.dirs=C:Program FilesJavajre1.6.0_07libext;C:Program FilesJavajre1.6.0_07lib;C:Program FilesJavajre1.6.0_07libdeploy;C:WINDOWSSunJavalibext; (C++ Tue Aug 12 12:32:20 2008) JVM started successfully - jvm references is 1838999280 (C++ Tue Aug 12 12:32:20 2008) writeAttachedJarFile(): writing jar C:DOCUME~1SALVAD~2.NAMLOCALS~1Temp/360Works_ScriptMaster.jar Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge initLogging CONFIG: Will write normal log file to C:Documents and Settingssalvador.NAMBETECHMy Documents360Plugin Logs360Works ScriptMaster_FMAdvanced.log Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge initWindows CONFIG: Loading dynamic library at C:Program FilesFileMakerFileMaker Pro 9 AdvancedExtensions360Works_ScriptMaster.fmx Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge initWindows CONFIG: Loading plugin jar at C:Documents and Settingssalvador.NAMBETECHLocal SettingsTemp360Works_ScriptMaster.jar Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge getPluginClassNameForPluginJar CONFIG: Loading Plugin class named com.prosc.beanshell.BeanShellPlugin Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge INFO: 360Works custom SecurityManager has been installed Aug 12, 2008 12:32:20 PM com.prosc.beanshell.BeanShellPlugin customizeFunction INFO: Function PluginFunction{name='EvaluateGroovy', functionID=28121, minArgs=null, maxArgs=1} runs in swing Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge scanFunctions WARNING: Can't do conversions for at least one plugin function com.prosc.fmkit.types.FMType$UnsupportedTypeConversionException: (-2): No conversion capability for class java.lang.Object at com.prosc.fmkit.types.FMType.converterForClass(FMType.java:56) at com.prosc.fmkit.StaticFunction.initialize(StaticFunction.java:70) at com.prosc.fmkit.StaticFunction.(StaticFunction.java:48) at com.prosc.fmkit.PluginBridge.scanFunctions(PluginBridge.java:1065) at com.prosc.fmkit.PluginBridge.fmxInit(PluginBridge.java:588) Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge fmxInit INFO: Creating shared PluginBridge instance / plugin bridge version 1.51 bundlePath: C:Program FilesFileMakerFileMaker Pro 9 AdvancedExtensions360Works_ScriptMaster.fmx;C:Documents and Settingssalvador.NAMBETECHLocal SettingsTemp/360Works_ScriptMaster.jar jvm version: 10.0-b23 from C:Program FilesJavajre1.6.0_07 Operating system info: Windows XP 5.1 running on x86 architecture Aug 12, 2008 12:32:20 PM com.prosc.fmkit.PluginBridge fmxInit CONFIG: Initialize 360Works ScriptMaster Aug 12, 2008 12:32:20 PM com.prosc.fmkit.Plugin init CONFIG: Created new plugin instance: com.prosc.beanshell.BeanShellPlugin named 360Works ScriptMaster; version: 2.0 Aug 12, 2008 12:32:21 PM com.prosc.fmkit.PluginBridge fmxInit CONFIG: Return VERSION_CURRENT: 51 Aug 12, 2008 12:33:00 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'AuditLog_Revert' Aug 12, 2008 12:33:04 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'AuditLog_AddDelete( UniqueField )' Aug 12, 2008 12:33:05 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'AuditLog_AddEdit( UniqueField ; FieldsToExclude )' Aug 12, 2008 12:33:06 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'AuditLog_AddInit( UniqueField ; FieldsToExclude )' Aug 12, 2008 12:33:07 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'Select_Attachement_File' Aug 12, 2008 12:33:07 PM com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'Register_Plugins_Web' Aug 12, 2008 12:34:54 PM com.prosc.fmkit.Plugin setLastError [color:red]SEVERE: PluginFunction com.prosc.beanshell.GroovyFunction@149b290 got an error with converted args [__kp_ResourceID, z_] java.lang.NullPointerException: Cannot invoke method evaluate() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:781) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:757) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167) at Script1.run(Script1.groovy:7) at com.prosc.beanshell.GroovyFunction.invoke(GroovyFunction.java:122) at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:237) at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:221) at com.prosc.fmkit.PluginBridge$3.run(PluginBridge.java:887) at com.prosc.fmkit.PluginBridge$4.run(PluginBridge.java:929) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) 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) It look like the problem has something to do with the newly registered script not being able to deal with the text Parameters I'm passing it. [color:red]SEVERE: PluginFunction com.prosc.beanshell.GroovyFunction@149b290 got an error with converted args [__kp_ResourceID, z_]
August 13, 200817 yr Hi Salvador - thanks for posting that error log. I've posted a new version, 2.02, which I think will fix the problem. Please try that version and let me know if that is fixed.
August 13, 200817 yr Author Jesse I installed version, 2.02 and the problem has gone away. Thanks for the quick fix and AMAZING plugin. Sal
Create an account or sign in to comment