Newbies ClaudioS8 Posted October 5, 2008 Newbies Posted October 5, 2008 Hi there, I'm running a virtualized Windows 2003 Server with FileMaker 9 Advanced and the scriptmaster plugin active on the IWP/plugins directory. All functions work correctly under Filemaker Pro environment but none of them can actually compile under IWP. I checked with SMVersion and it correctly returns 2.03 in both Pro environment and Instant Web Publishing. Evaluating all groovy expressions in a calculated field however returns "ERROR" but with SMlasterror I only get a question mark as output. I'm attaching the IWP log file of the plugin: (C++ Sun Oct 05 11:34:40 2008) Writing to log file at C:Documents and SettingsDefault UserDocumenti360Plugin Logs360Works ScriptMaster_WPE.log (C++ Sun Oct 05 11:34:40 2008) *** INIT for 360Works ScriptMaster_WPE at Sun Oct 05 11:34:40 2008, headless mode 1 (C++ Sun Oct 05 11:34:42 2008) Found JVM dll at C:ProgrammiJavajre1.6.0_07binclientjvm.dll (C++ Sun Oct 05 11:34:42 2008) No existing JVM found; creating one. (C++ Sun Oct 05 11:34:42 2008) Enabling headless mode (C++ Sun Oct 05 11:34:42 2008) 0: -Xms4m (C++ Sun Oct 05 11:34:42 2008) 1: -Xmx64m (C++ Sun Oct 05 11:34:42 2008) 2: -Djava.awt.headless=true (C++ Sun Oct 05 11:34:42 2008) 3: -Djava.util.logging.config.file=C:Templogging.properties (C++ Sun Oct 05 11:34:42 2008) 4: vfprintf (C++ Sun Oct 05 11:34:42 2008) 5: -Xbootclasspath/a:C:ProgrammiJavajre1.6.0_07libdeploy.jar;C:ProgrammiJavajre1.6.0_07libplugin.jar (C++ Sun Oct 05 11:34:42 2008) 6: -Djava.ext.dirs=C:ProgrammiJavajre1.6.0_07libext;C:ProgrammiJavajre1.6.0_07lib;C:ProgrammiJavajre1.6.0_07libdeploy;C:WINDOWSSunJavalibext; (C++ Sun Oct 05 11:34:48 2008) JVM started successfully - jvm references is 53208816 (C++ Sun Oct 05 11:34:48 2008) writeAttachedJarFile(): writing jar C:WINDOWSTEMP/360Works_ScriptMaster.jar 5-ott-2008 11.34.49 com.prosc.fmkit.PluginBridge initLogging CONFIG: Will write normal log file to C:Documents and SettingsDefault UserDocumenti360Plugin Logs360Works ScriptMaster_WPE.log 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge initWindows CONFIG: Loading dynamic library at C:ProgrammiFileMakerFileMaker ServerWeb Publishingpublishing-enginewpcPlugins360Works_ScriptMaster.fmx 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge initWindows CONFIG: Loading plugin jar at C:WINDOWSTemp360Works_ScriptMaster.jar 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge getPluginClassNameForPluginJar CONFIG: Loading Plugin class named com.prosc.beanshell.BeanShellPlugin 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge INFO: 360Works custom SecurityManager has been installed 5-ott-2008 11.34.50 com.prosc.beanshell.BeanShellPlugin customizeFunction INFO: Function PluginFunction{name='EvaluateGroovy', functionID=28121, minArgs=null, maxArgs=1} runs in swing 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge scanFunctions AVVERTENZA: 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:57) 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:1063) at com.prosc.fmkit.PluginBridge.fmxInit(PluginBridge.java:595) 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge fmxInit INFO: Creating shared PluginBridge instance / plugin bridge version 1.51 bundlePath: C:ProgrammiFileMakerFileMaker ServerWeb Publishingpublishing-enginewpcPlugins360Works_ScriptMaster.fmx;C:WINDOWSTemp/360Works_ScriptMaster.jar jvm version: 10.0-b23 from C:ProgrammiJavajre1.6.0_07 Operating system info: Windows 2003 5.2 running on x86 architecture 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge fmxInit CONFIG: Initialize 360Works ScriptMaster 5-ott-2008 11.34.50 com.prosc.fmkit.Plugin init CONFIG: Created new plugin instance: com.prosc.beanshell.BeanShellPlugin named 360Works ScriptMaster; version: 2.03 5-ott-2008 11.34.50 com.prosc.fmkit.PluginBridge fmxInit CONFIG: Return VERSION_CURRENT: 51 5-ott-2008 11.45.27 com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'GetFileAsContainer( pathToFile )' 5-ott-2008 11.45.29 com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'SelectFile' 5-ott-2008 11.45.30 com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'PopupMenu' 5-ott-2008 11.45.35 com.prosc.fmkit.Plugin setLastError GRAVE: PluginFunction PluginFunction{name='EvaluateGroovy', functionID=28121, minArgs=null, maxArgs=1} got an error with converted args [import java.awt.*; import javax.swing.JOptionPane; String title = "Example File Chooser"; FileDialog dialog = new FileDialog(JOptionPane.getRootFrame(),title); dialog.show(); if (dialog.getFile() != null) { return dialog.getDirectory() + dialog.getFile(); } else { return 0; }] java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at java.awt.Frame.(Unknown Source) at javax.swing.SwingUtilities$SharedOwnerFrame.(Unknown Source) at javax.swing.SwingUtilities.getSharedOwnerFrame(Unknown Source) at javax.swing.JOptionPane.getRootFrame(Unknown Source) 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:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226) at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1094) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:748) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:195) at Script1.run(Script1.groovy:5) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:543) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:518) at com.prosc.beanshell.BeanShellModel.evaluateGroovy(BeanShellModel.java:159) at com.prosc.beanshell.BeanShellPlugin.EvaluateGroovyNoUI(BeanShellPlugin.java:240) at com.prosc.beanshell.BeanShellPlugin.EvaluateGroovy(BeanShellPlugin.java:221) 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 com.prosc.fmkit.StaticFunction.invoke(StaticFunction.java:228) at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:238) at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:222) at com.prosc.fmkit.PluginBridge$3.run(PluginBridge.java:885) at com.prosc.fmkit.PluginBridge.runTask(PluginBridge.java:944) at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:901) 5-ott-2008 11.45.37 com.prosc.fmkit.Plugin setLastError GRAVE: PluginFunction com.prosc.beanshell.GroovyFunction@16acdd1 got an error with converted args [] java.awt.HeadlessException at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source) at java.awt.Window.(Unknown Source) at java.awt.Frame.(Unknown Source) at java.awt.Frame.(Unknown Source) at javax.swing.SwingUtilities$SharedOwnerFrame.(Unknown Source) at javax.swing.SwingUtilities.getSharedOwnerFrame(Unknown Source) at javax.swing.JDialog.(Unknown Source) at javax.swing.JDialog.(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:528) at groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2347) at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1244) at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1174) at org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:805) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:227) at swing.PopupMenu.drawPopupMenu(Script1.groovy:23) at swing.PopupMenu.this$2$drawPopupMenu(Script1.groovy) 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:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740) at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:777) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:757) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:195) at swing.PopupMenu.main(Script1.groovy:47) 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:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740) 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:86) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:226) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:899) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740) at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:765) at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167) at swing.PopupMenu.invokeMethod(Script1.groovy) at org.codehaus.groovy.runtime.InvokerHelper$2.run(InvokerHelper.java:426) at com.prosc.beanshell.GroovyFunction.invoke(GroovyFunction.java:122) at com.prosc.fmkit.Plugin.invokeFunction(Plugin.java:238) at com.prosc.fmkit.Plugin.invokeFunctionNoErrors(Plugin.java:222) at com.prosc.fmkit.PluginBridge$3.run(PluginBridge.java:885) at com.prosc.fmkit.PluginBridge.runTask(PluginBridge.java:944) at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:901) Please note the "conversion error" similar to another thread I've read on this forum. I tried to upgrade to the lastest JVM but to no avail. Any help would be immensely appreciated Claudio
Jesse Barnum Posted October 6, 2008 Posted October 6, 2008 This is because you're trying to perform a GUI function (showing a file chooser) on a server. GUI functions can only be performed when running the plugin on FileMaker Pro, not FileMaker Server or the Web Publishing Engine.
Carole Chaski Posted October 14, 2009 Posted October 14, 2009 It would be really useful if the documentation for Scriptmaster indicated which functions were really web publishable and which were not, since the documentaion does make it seem as though all the plugins (and hence all parts of the plugins) from 360 are compatible with web publishing. Does SuperContainer also have this restriction on GUI functions? Sorry if I'm a bit cranky, as I just spent an hour making sure that selecting and uploading a file works, then come to find out that it would not work under web publishing anyway once I put this on the server. Shucks!
Jesse Barnum Posted October 14, 2009 Posted October 14, 2009 Hi Carole - the reason this does not work is because when the plugin function runs, it runs on the computer that it's installed on. For doing something like sending an e-mail or running a credit card charge, it makes sense for that to happen on the web server (which is where the plugin is installed). However, for something like displaying a file chooser dialog, or any other graphic user interface action, having the plugin installed on the server can't make this happen on the computer where the web browser is running. SuperContainer is a little bit different, because it's not a plugin. It's a Java applet that is actually running inside the browser on the web user's computer, so it is capable of doing graphic user interface (GUI) operations that happen on the user's computer.
Carole Chaski Posted October 14, 2009 Posted October 14, 2009 Thanks, Jesse. So, I will be using SuperContainer as file upload/download is crucial for me. Blessings, Carole
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now