Jump to content
Server Maintenance This Week. ×

ScriptMaster not working on Fm Adv. Server 12


This topic is 3154 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi there,

we have serious trouble getting the ScriptMaster plugin working on Filemaker Server 12 Advanced (Windows 2008 / R2 all FM updates installed). We are using the email plugin as an enterprise licence for years now without any problems (we are using it even with iwp, works like a charm) but Scriptmaster refuses to work on our server.

Our database is using scriptmaster for copying and renaming files after the import in the database (Move Or Rename File). On FM 12 or Fm 12 Adv. (Client is OX and Windows 8) everything is working without any problems. We call the function via a seperate script wich calls the registration for the Scriptmaster functions (a startup script is no option because we want to use this script on Fm Server as a planned server side script).

When we try to use the same database on ous server nothing happens. We call the script like every ten minutes but the renaming is not working , the rest of the script works without problems.

Plugin is installed in the right folders an shows up in the Admin Console and stays registered (we have placed the plugin in all folders as 32bit and 64bit version, even in the iwp and cwp folder). On the server we have Java version 7.75 installed as 32bit and 64bit version (the mail plugin is working without any problems). On the fm clients we have installed Java 7.75 and 7.45, both are working.

We placed the "get last error" function in the database and after running the script server side we receive the following message:

groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.io.File#<init>.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
    [class java.net.URI]
    [class java.lang.String]

In the logfile we can't see anything special (I'm not an expert in reading the fm logfiles, maybe the is something) except that the plugin is working in demo mode for two hours, isn't the plugin free except for the advanced version ?

At this point we have no clue what to do to get the script working on our server, maybe someone can help us.

Greetings from germany !

Edited by hirsma
Link to comment
Share on other sites

Ok, solved the problem with the error in the log. One of the fields (original path e.g.) was empty so the script wasn't working properly.

The problem with the plugin still is present. I checked the solution on my mac, using fm pro adv. 12 and everything works perfect (every script step is usable via fm server, filemaker says). On the server there is simply nothing happening. All script steps are working except those from the scriptmaster plugin.

On Fm Server i placed my .xls files in the documents folder using this path (static):

filewin:/C:/Program Files/FileMaker/FileMaker Server/Data/Documents/FILEXYZ.xls

When the scheduled script is running the is no renaming happening (on FM client everything is working). There are no errors in the Server log except the following message in the ScriptMaster Logfile:

WARNUNG: License is invalid:
com.prosc.license.client.ExpiredLicenseException: DEMO mode expired! (24) You can continue to run in demo mode by restarting FileMaker, or you can register with a valid license key from http://www.360works.com.

Isn't scriptmaster free ? How to get rid of the error code ? We use the email plugin from 360works as an enterprise licence and have no problem with registering it by a script but where or how can I regsiter the free scriptmaster plugin (on my mac it runs for several hours without any problem but there is a regsitration number in the properties of the plugin, I have no clue where this comes from).

! Beside the stated issus I noticed a weird beahavior regarding the "MoveOrRenameFile( originalPath ; moveToPath )" Field in my database.

The whole script is only working when the used field with the "MoveOrRenameFile( originalPath ; moveToPath )" in it is present in the viewable layout (you really have to see it in the filemaker window). When I remove the field from the layout, the field is still present in the database, the script is not working. When I put the field on the bottom of my layout, layout is quite long so you have to scroll to the bottom, the isn't working too. When I can see the field in my layout and start the script everything works just perfect.

Maybe this is part of the problem because the server is kind of a headless device and there is no real layout to see. I never had a problem like this or have seen a behavior in fm before.

I really don't have a clue where the problem is.

Edited by hirsma
Link to comment
Share on other sites

True, that you need the field ON the visible part of the layout to set it in a PSOS script. I suggest creating a layout just for use with PSOS that only has on it the fields you require to fulfil the script.

Are you running this as a 'scheduled' script or is it a true PerformScriptOnServer??

Which version of the plugin do you have installed?? it is indeed 'free' and shouldn't require a registration step.

 

Link to comment
Share on other sites

True, that you need the field ON the visible part of the layout to set it in a PSOS script. I suggest creating a layout just for use with PSOS that only has on it the fields you require to fulfil the script.

Are you running this as a 'scheduled' script or is it a true PerformScriptOnServer??

Which version of the plugin do you have installed?? it is indeed 'free' and shouldn't require a registration step.

 

Hi,

thanks for the reply. We have to use the script as a scheduled script. We have to import and rename multiple xls-files which are on our nas device (we have a sync-script which copies them into the documents folder of the fm server). The schedule is planned to run every 5-10 minutes. We are running server 12 Advanced on Windows 2008r2, I think "perform script on server" is only available on Fm Server 13 & 14.

In total we try to get two modules working which are:

MoveOrRenameFile( originalPath ; moveToPath )
ListAllFilesInDirectory( path )

The script is working quite easy, list all files in folder (select first file), import the data, rename the files and copy them into another folder where all imported files get stored as a backup.

As mentioned, everything works perfect on fm client with the fields visible within the layout. 

Link to comment
Share on other sites

Just to ask the obvious.. You do have the paths correct on the server for these functions?

Not the filewin:\C:\ versions but the C:/ one?? 

And have you explicitly 'loaded' the functions on the server at least once??

There is something that doesn't work properly with the smgetregisteredfunctions when run on server, it works the FIRST time after you do a reset, but then returns nothing.

I have a function I am using which tell me if the functions have been loaded. so you can do If ( smIsLoaded ) {do nothing } else {load the 360works functions}

RegisterGroovy( "smIsLoaded" ; "// v1.0¶
¶
return true
¶
; isGui = false " )

 

Edited by john renfrew
Link to comment
Share on other sites

Just to ask the obvious.. You do have the paths correct on the server for these functions?

Not the filewin:\C:\ versions but the C:/ one?? 

And have you explicitly 'loaded' the functions on the server at least once??

There is something that doesn't work properly with the smgetregisteredfunctions when run on server, it works the FIRST time after you do a reset, but then returns nothing.

I have a function I am using which tell me if the functions have been loaded. so you can do If ( smIsLoaded ) {do nothing } else {load the 360works functions}

RegisterGroovy( "smIsLoaded" ; "// v1.0¶
¶
return true
¶
; isGui = false " )

 

Hi, when I use the "getdocumentspath" function within filemaker server I get

/C:/Program Files/FileMaker/FileMaker Server/Data/Documents/

The new calculated filename looks like this:

C:\Program Files\FileMaker\FileMaker Server\Data\Documents\filenameXZY.xls

Is it normal that the slashes of the path change, since I use the exact same field values from the original import path ?

as path from the server. On my mac the function is not working the right way, I get something like

/MacHD/Users/MyName/Documents/

which is not working. When I change the path manually to

/Users/MyName/Documents/

everything is ok.

 

Before the "getDocumentPath" function we used the following path (written manually into the database):

filewin:/C:/programm files/FileMaker/FileMaker Server/Data/Documents/

From this path we could import xls-data from a spreadsheet via script (import function of filemaker).

The modules get registered on the server (I changed the serverscript so that they get called every time the script runs, just for testing).

 

Regards

Link to comment
Share on other sites

yes...

but your issue is with the rename function which needs an OS  path not a Filemaker one..

Hi,

we tried a Windows path like c:\programm files\...

no success ar this point, going to try this on a Windows Client with fm 12 pro to see if the path is working. Is the synthax of the path the same as on windows Server ?

is anyone using the function itself on a Windows Server as a scheduled Script an can confirm that it is working ? The issue with the visible field is still on my mind and I'm Not really shure what the problem is (the path or the field).

Regards

Link to comment
Share on other sites

This topic is 3154 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.