Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello,

I'am using Scripmaster 4_131 with FM10A and FM11 on Mac (10.6.8 and 10.5.8) and on windows XP.

I have also tried with Scripmaster 4_132

I have no problem for registering CreateFolder, with the variable declaration in my startup script.

But, when I try to register Send Email With Authentication on startup, with a variable declaration (copy to clipboard method), this function is not registered.

The report with SMLastError is:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script1.groovy: 10: unable to resolve class MimeMessage

@ line 10, column 14.

MimeMessage msg = new MimeMessage(Session.getInstance(props));

^

Script1.groovy: 10: unable to resolve class MimeMessage

@ line 10, column 20.

MimeMessage msg = new MimeMessage(Session.getInstance(props));

^

Script1.groovy: 11: unable to resolve class Multipart

@ line 11, column 12.

Multipart content = new MimeMultipart();

^

Script1.groovy: 11: unable to resolve class MimeMultipart

@ line 11, column 22.

Multipart content = new MimeMultipart();

^

Script1.groovy: 13: unable to resolve class MimeBodyPart

@ line 13, column 15.

MimeBodyPart bodyPart = new MimeBodyPart();

^

Script1.groovy: 13: unable to resolve class MimeBodyPart

@ line 13, column 26.

MimeBodyPart bodyPart = new MimeBodyPart();

^

Script1.groovy: 18: unable to resolve class MimeBodyPart

@ line 18, column 16.

MimeBodyPart attachmentPart = new MimeBodyPart();

^

Script1.groovy: 18: unable to resolve class MimeBodyPart

@ line 18, column 33.

MimeBodyPart attachmentPart = new MimeBodyPart();

^

Script1.groovy: 24: unable to resolve class InternetAddress

@ line 24, column 14.

msg.setFrom(new InternetAddress(from));

^

Script1.groovy: 25: unable to resolve class InternetAddress

@ line 25, column 45.

ent(Message.RecipientType.TO, new Intern

^

Script1.groovy: 27: unable to resolve class Transport

@ line 27, column 12.

Transport transport = Session.getDefaultInstance(props).getTransport("smtp");

^

11 errors

The only way to register this function in my solution is to use the Register on startup method with a scripts that opens and closes ScripMaster.

Do you have any idea for this problem ?

Thanks a lot

Posted

Are you using the function code unmodifed??

Are all the IMPORT lines there at the beginning of the function?

If you click the jars tab are Mail.jar and Activation.jar ticked?

In your file are you expliclicitly loading the jars first? What does SMGetLoadedJars say in the data viewer? If mail and activation are there, then it's not surprising the Groovy code can't call classes from those files.

Posted

I'm also having trouble registering SendEmailWithAuthentication.

To troubleshoot, I created a new database with one table, two fields, two records, and one script. I'm using SM 4.132 and FMPA 11.0.3.

I don't want to call the ScriptMaster.fp7 file every time I launch my solution, so I copied & pasted the 'registration calculation' from ScriptMaster.fp7 into my test script. The attached screenshot shows the result I see in Data Viewer ('ERROR') when I run the 'set variable' script. And the SendEmailWithAuthentication function does not appear among the other SM External Functions. I even tested on another computer on another network, same result.

I'm probably doing something wrong; Any help greatly appreciated!

[EDIT: For some reason my screenshot file didn't upload. Let's try uploading it again]

post-63807-0-79500900-1337015625_thumb.j

Posted

I should add that what I'm seeing in SMLastError is identical to the report supplied yesterday by the original poster.

Posted

Hello,

It seems that I have the same problem than emosensei.

My function's code is unmodified.

I just copy the code in ScriptMaster (copy to clipboard in the Register Panel) and then copy this code in SetVariable in my StartupScript of my solution.

I will post tonight the result of SMGetLoadedJars (I'm not now with my own computer)...

Posted

Gastion, I found a solution in a post from a couple years ago. I followed these steps and registration works for me now:

I believe that The Send Email With Authentication module also requires that you import a .jar file, so you will need to copy The mail.jar file from The scriptmaster Jar Libraries into a container in your own database, and then call SMLoadJar (container with mail.jar in it) in a set variable script step before The set variable step which registers The Send Mail module.

You will have to add two script steps to your opening file:

Set Variable: $loadjar - SMLoadJar(yourjarfile::containerfield)

Set Variable: $register - calculation_copied_from_scriptmaster_file

Posted

WOUAH !!!! GREAT :yep: :yep: :yep::laugh2::hug:

Thanks a lot !

In my solution, nothing was returned with SMGetLoadedJars.

Next, I was looking in ScriptMaster solution. Mail and Activation.jar are ticked.

I thought that this problem could be with these two librairies, as said on the top most Jar Librairies panel of this solution.

But I had no idea on how to solve the problem.

You found the Answer . THANKS

Posted

When the jar files are ticked in the demo file, it loads them to make sure the script will run, so for any function you are trying to use, check first which jar files are ticked then, make sure you follow those steps above to load them in your solution first.

The message unable to resolve class always means just that - you are trying to use a custom function (class) from another jar file but haven't bothered to load it yet.

Posted

Thank you John for your advice.

Best regards :smile:

This topic is 4643 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.