3 Replies Latest reply on Oct 28, 2015 7:55 PM by SethRedlus

    XML Import in Server-Scheduled Script Fails with Error 100

    SethRedlus

      Hello All-

       

      I am attempting to schedule an import of an XML file with XSLT stylesheet via a scheduled import and it continually fails. I have a plugin that is delivering the XML data file to my documents folder located at:

      /Macintosh HD/Library/Filemaker Server/Data/Documents/file.xml

      I have confirmed through the Get (DocumentsPath) function that this is the correct location.

       

      For simplicity, I have co-located the XSLT Stylesheet in the same folder.

       

      In my script, I have a line that reads

      Import Records [No dialog ; file.xml; stylesheet.xslt ; Update matching; Mac Roman ]
      

       

      I have made a series of attempts to enter different locations for the file, including (and not limited to):

      file:/Macintosh HD/Library/Filemaker Server/Data/Documents/file.xml (and same for the stylesheet)

      file:file.xml

      file:/Library/Filemaker Server/Data/Documents/file.xml

      filemac:/Macintosh HD/Library/Filemaker Server/Data/Documents/file.xml (and same for the stylesheet)

      filemac:/Library/Filemaker Server/Data/Documents/file.xml

      I've even tried inserting pre-constructed variables such as $XMLFile, which was constructed with Get (DocumentsPath) & "file.xml"


      Not having any luck. Am I missing something here?


      Thanks all for your help.

        • 1. Re: XML Import in Server-Scheduled Script Fails with Error 100
          Menno

          Error 100 means the file is missing, but I think that also occurs when the access-settings to the file are wrong as well.

          FileMaker Server runs under a certain user and the files should be accessible for that usee. Open the terminal and paste the following command there:

          ls -l /Volumes/Macintosh\ HD/Library/FileMaker\ Server/Data/Documents/

          The result should look something like:

          -rwxrwxr-x  2 fmserver  fmsadmin   68 12 dec  2012 sheet.xsl

          -rwxrwxr-x  3 fmserver  fmsadmin  102 13 okt 11:27 file.xml

          If it is looking like

          -rwxrwx---- 2 otheruser othergroup  etc.etc

          FMS won't be able to open it and you should edit the modifier and / or the owner setting for the file using chown or chmod

          • 2. Re: XML Import in Server-Scheduled Script Fails with Error 100
            SethRedlus

            Thanks. I checked and the XSLT files had a different owner, so I changed them to fmserver, and I also just to be sure chmod to 777 on all the necessary files. Still no dice, and still a 100 error.

            • 3. Re: XML Import in Server-Scheduled Script Fails with Error 100
              SethRedlus

              I've managed to partially figure it out, though not sure I'm happy with the results.

              In the Import settings, if I specify Arrange by: to "Custom Input Order" the import works, but if I select "Matching Field Names" I get the 100 error. Not quite sure why that is, hopefully I can work around it. Does that sound like a bug, or is that an intentional operation?