Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Issue when running on Server 15

Featured Replies

Been tearing my ears off most of the afternoon and there is an issue between 15 client and 15 server on Windows

Simplest case

load Java Mail 1.4.7 jar

use the following function

import javax.mail.*
import javax.mail.internet.*

fis = new FileInputStream(fm_fileIn)

mimeMessage = new MimeMessage(null, fis)
return mimeMessage.getContent().getContentType()

and send it the path an EML mail file.

Run from a client ON the server you get :

>>multipart/alternative;
    boundary="B_3517403371_9455676"

Run as PSOS from the same server with the same single jar loaded you get:

>>No signature of method: javax.mail.util.SharedByteArrayInputStream.getContentType() is applicable for argument types: () values: []

Something weird in the neighbourhood........

Are you sure that this isn't a simple permissions issue due to FMS being sandboxed? What's the location of the EML mail file?

  • Author

It's in the FMServer documents folder, BUT to be fair it happens if you turn a container field into a stream too, just didn't want to confuse the issue..

The issue is with the stream (FileInputStream or ContainerStream ) not being converted to the MAilMessage object correctly between the two JVMs

john

Edited by john renfrew

And if you do something else with the InputStream (like set a FileMaker field or save a file), it works fine?

Have you had the possibility to test on FMS running on a Mac?

Check the Java extensions directory on the server. Sounds like there may be a different version of mail.jar or activation.jar that is taking precedence over the jars you're loading with ScriptMaster.

  • Author

Will look when I in there later this week.....

Given that the behaviour is both from the server and the client on the same machine, surely the JVM attached to the script master object uses the same JRE, which is why I don't get the difference in behaviour - same file, same jars and functions loaded, nothing added to the JRE permanently.

 

 

 

john

Edited by john renfrew

  • Author

I can confirm this issue is the same on a Mac, in this case running server 14...

  • Author

The issue seems to be that for the mail functions, you need to explicitly re-load the jars files required AND the function, each time you use it.

Given that the default behaviour is that once a jar or a function is loaded it is available to all script until reminded or the script engine is restarted, this is not 'expected' behaviour.

 

  • Author

Is  this a change of behaviour in Server 15???????

if each PSOS was running anew session that knew nothing of the original server session that would make sense, except it only appears to affect Mail functions....

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.