Newbies konradBerlin Posted November 24, 2008 Newbies Posted November 24, 2008 (edited) Hi, i'm currently building some address/letter solution under filemaker 9 for our office. one part of it will be the creation of .rtf documents based on some template using address-, salutation-, etc. data from the filemaker database. this all works fine already. for the creation of the new letter on the intranet file server i use scriptmaster and the java OutputStreamWriter. the java code bit looks like this: //writes text in var 'textToWrite' to file in var 'filePath' RegisterGroovy( "SM_writeNewFile ( filePath ; textToWrite )"; " OutputStreamWriter writer = new OutputStreamWriter( new FileOutputStream( filePath ), "ISO-8859-1" ); writer.write( textToWrite ); writer.close(); return true; " ) the solution resides on an FMS9 advanced under w2k3s. when running the solution in FM9 pro, it works fine. but i would like to run the whole solution under IWP, it should appear as-if integrated in outlook2007, as a webpage pasted onto a public folder. but the behavior of the java trying to access fileserver shares under IWP is strange. if it would not work at all, i would think, it is about security setting of IE7, but it does always work the first time, and than not anymore in the same session. Under IWP running in outlook2007/ IE7 i can create a new letter on the file server by using an UNC path like myservermysharelettersprojektnewletter.rtf and let it open in word using the ‘openUrl’ script step once. the second time in the same IWP session filecreation fails, IWP throws an error message in the IWP server log about some ‘no access’ problem: IWP server log: (C++ Mon Nov 24 14:16:16 2008) Writing to log file at C:Dokumente und EinstellungenDefault UserEigene Dateien360Plugin Logs360Works ScriptMaster_WPE.log (C++ Mon Nov 24 14:16:16 2008) *** INIT for 360Works ScriptMaster_WPE at Mon Nov 24 14:16:16 2008, headless mode 1 (C++ Mon Nov 24 14:16:17 2008) Found JVM dll at C:ProgrammeJavajre1.6.0_07binclientjvm.dll (C++ Mon Nov 24 14:16:17 2008) No existing JVM found; creating one. (C++ Mon Nov 24 14:16:17 2008) Enabling headless mode (C++ Mon Nov 24 14:16:17 2008) 0: -Xms4m (C++ Mon Nov 24 14:16:17 2008) 1: -Xmx64m (C++ Mon Nov 24 14:16:17 2008) 2: -Djava.awt.headless=true (C++ Mon Nov 24 14:16:17 2008) 3: -Djava.util.logging.config.file=C:Templogging.properties (C++ Mon Nov 24 14:16:17 2008) 4: vfprintf (C++ Mon Nov 24 14:16:17 2008) 5: -Xbootclasspath/a:C:ProgrammeJavajre1.6.0_07libdeploy.jar;C:ProgrammeJavajre1.6.0_07libplugin.jar;C:ProgrammeJavajre1.6.0_07libjavaws.jar (C++ Mon Nov 24 14:16:17 2008) 6: -Djava.ext.dirs=C:ProgrammeJavajre1.6.0_07libext;C:ProgrammeJavajre1.6.0_07lib;C:ProgrammeJavajre1.6.0_07libdeploy;C:WINDOWSSunJavalibext; (C++ Mon Nov 24 14:16:18 2008) JVM started successfully - jvm references is 56157936 (C++ Mon Nov 24 14:16:18 2008) writeAttachedJarFile(): writing jar C:WINDOWSTEMP/360Works_ScriptMaster.jar 24.11.2008 14:16:23 com.prosc.fmkit.PluginBridge initLogging KONFIG: Will write normal log file to C:Dokumente und EinstellungenDefault UserEigene Dateien360Plugin Logs360Works ScriptMaster_WPE.log 24.11.2008 14:16:24 com.prosc.fmkit.PluginBridge initWindows KONFIG: Loading dynamic library at C:ProgrammeFileMakerFileMaker ServerWeb Publishingpublishing-enginewpcPlugins360Works_ScriptMaster.fmx 24.11.2008 14:16:24 com.prosc.fmkit.PluginBridge initWindows KONFIG: Loading plugin jar at C:WINDOWSTemp360Works_ScriptMaster.jar 24.11.2008 14:16:24 com.prosc.fmkit.PluginBridge getPluginClassNameForPluginJar KONFIG: Loading Plugin class named com.prosc.beanshell.BeanShellPlugin 24.11.2008 14:16:24 com.prosc.fmkit.PluginBridge INFO: 360Works custom SecurityManager has been installed 24.11.2008 14:16:25 com.prosc.beanshell.BeanShellPlugin customizeFunction INFO: Function PluginFunction{name='EvaluateGroovy', functionID=28121, minArgs=null, maxArgs=1} runs in swing 24.11.2008 14:16:25 com.prosc.fmkit.PluginBridge fmxInit INFO: Creating shared PluginBridge instance / plugin bridge version 1.51 bundlePath: C:ProgrammeFileMakerFileMaker ServerWeb Publishingpublishing-enginewpcPlugins360Works_ScriptMaster.fmx;C:WINDOWSTemp/360Works_ScriptMaster.jar jvm version: 10.0-b23 from C:ProgrammeJavajre1.6.0_07 Operating system info: Windows 2003 5.2 running on x86 architecture 24.11.2008 14:16:25 com.prosc.fmkit.PluginBridge fmxInit KONFIG: Initialize 360Works ScriptMaster 24.11.2008 14:16:25 com.prosc.fmkit.Plugin init KONFIG: Created new plugin instance: com.prosc.beanshell.BeanShellPlugin named 360Works ScriptMaster; version: 2.05 24.11.2008 14:16:25 com.prosc.fmkit.PluginBridge fmxInit KONFIG: Return VERSION_CURRENT: 51 24.11.2008 14:18:20 com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'SM_writeNewFile ( filePath ; textToWrite )' 24.11.2008 14:18:20 com.prosc.beanshell.BeanShellPlugin RegisterGroovy INFO: Registering function 'SM_fileExists ( filePath )' 24.11.2008 14:19:33 com.prosc.fmkit.Plugin setLastError SCHWERWIEGEND: PluginFunction com.prosc.beanshell.GroovyFunction@15fadcf got an error with converted args [andorabuerotempADA081124LTR_ADA_Blume_wejrhlwerhtiweur.rtf, {rtf1adeflang1025ansi ...... --> that is the RTF-document content failed writing to the file ....... 00000}}] java.io.FileNotFoundException: andorabuerotempADA081124LTR_ADA_Blume_wejrhlwerhtiweur.rtf (Zugriff verweigert) --> access denied at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(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 Script1.run(Script1.groovy:1) 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:886) at com.prosc.fmkit.PluginBridge.runTask(PluginBridge.java:945) at com.prosc.fmkit.PluginBridge.doFunction(PluginBridge.java:902) Does anybody know what’s going on here? Thanks , konrad Edited November 24, 2008 by Guest
Jesse Barnum Posted November 24, 2008 Posted November 24, 2008 Keep in mind that FileMaker runs as a different user when running as IWP (I think it's the 'SYTEM' user but I'm not sure; check task manager to find out) than running in the client, where it just runs as you. This is probably the reason why it works from the client but gives you a security error from the server.
Newbies konradBerlin Posted November 24, 2008 Author Newbies Posted November 24, 2008 Great hint! the process runs under SYSTEM account. the docs root was on an different server than filemaker, and SYSTEM can for all i know only access the local system. i created a share on the server filemaker server in running on, and it seems to work. Changing service account of FMS to domain-administrator also allows creation of rtf-files on other servers. Very strange file creation with SYSTEM account on another file server did work before at all! it should not... I kind of thought, IE7 as a client is creating the RTF-File, but its the IWP server proccess it self! thanks a lot. scriptMaster is really great ! konrad | berlin
Recommended Posts
This topic is 6185 days old. Please don't post here. Open a new topic instead.
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