November 15, 20169 yr 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........
November 15, 20169 yr 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?
November 15, 20169 yr 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 November 15, 20169 yr by john renfrew
November 15, 20169 yr 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?
November 15, 20169 yr 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.
November 15, 20169 yr 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 November 15, 20169 yr by john renfrew
November 18, 20169 yr Author I can confirm this issue is the same on a Mac, in this case running server 14...
November 18, 20169 yr 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.
November 18, 20169 yr 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