An attempted but failed Lucee update from 6.2.1.122 to 7.0.0.202 has somehow broken Lucee’s SMTP capability. I have since successfully replaced the 6.2.1.122 jar with the 6.2.2.90-RC jar just to make sure it would update properly, but that obviously did not solve the email problem.
I use the cfmail tag/function in my code, and my SMTP server is Microsoft Outlook SMTP Relay, *.mail.protection.outlook.com.
What is really odd is that the initial message fails but I can still go in to the “Services - Tasks” screen in Lucee Administrator afterwards, select the failed message, click the Execute button and that succeeds with no error.
Could someone please help me or point me in the right direction with the error message I’ve pasted below?
If possible, I’d like to avoid a full Lucee reinstallation, but I’m completely lost here.
Please let me know if I need to provide further details and I’ll do my best.
“ERROR”,“Thread-192681”,“07/30/2025”,“07:03:46”,“remote-client”,"failed to execute: Technology Assistance Request - STUDENT STATUS CHANGES;com/sun/mail/util/SocketConnectException;com/sun/mail/util/SocketConnectException;com.sun.mail.util.SocketConnectException not found by javax.mail [124];lucee.runtime.exp.NativeException: com/sun/mail/util/SocketConnectException
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.getConstructor(Class.java:2151)
at javax.mail.Session.getService(Session.java:799)
at javax.mail.Session.getTransport(Session.java:728)
at javax.mail.Session.getTransport(Session.java:668)
at javax.mail.Session.getTransport(Session.java:648)
at lucee.runtime.net.smtp.SMTPConnectionPool$SessionAndTransport.(SMTPConnectionPool.java:171)
at lucee.runtime.net.smtp.SMTPConnectionPool.getSessionAndTransport(SMTPConnectionPool.java:57)
at lucee.runtime.net.smtp.SMTPClient.createMimeMessage(SMTPClient.java:492)
at lucee.runtime.net.smtp.SMTPClient._send(SMTPClient.java:859)
at lucee.runtime.spooler.mail.MailSpoolerTask.execute(MailSpoolerTask.java:139)
at lucee.runtime.spooler.SpoolerTaskSupport._execute(SpoolerTaskSupport.java:107)
at lucee.runtime.spooler.SpoolerEngineImpl.execute(SpoolerEngineImpl.java:619)
at lucee.runtime.spooler.SpoolerEngineImpl.execute(SpoolerEngineImpl.java:612)
at lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.run(SpoolerEngineImpl.java:548)
Caused by: java.lang.NoClassDefFoundError: com/sun/mail/util/SocketConnectException
… 17 more
Caused by: java.lang.ClassNotFoundException: com.sun.mail.util.SocketConnectException not found by javax.mail [124]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1358)
at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1612)
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1528)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
… 17 more
"
Don’t forget to tell us about your stack! OS: Ubuntu 20.04.6 LTS Java Version: 11.0.27 (Ubuntu) 64bit Tomcat Version: Apache Tomcat/9.0.71 Lucee Version: Lucee 6.2.2.90-RC
7.0.0.202 was an accidental release and should be ignored, 7 is still in the RC stage
Did you check for release notes before upgrading?
As noted in the breaking changes document, which you should always check before doing a update between versions, Lucee 7 requires a loader upgrade and Tomcat 10+
Okay. I hereby fully accept and admit that this was 100% my fault.
However… I have just done a full install of 6.2.1.122 into a brand new directory using the Linux Installer downloaded from lucee.org. Tomcat is now version 11.0.6 and Java is now version 21.0.7. Literally the ONLY things I have copied over from the original Lucee directory were the .CFConfig.json file and my <Host…> block from the server.xml file.
The Lucee installation is functional, but the SMTP still is NOT functional. Exactly the same error message as before, unless I execute from the Services - Tasks screen in Administrator. So, unless this problem is caused by something in the config or in server.xml, then it appears to exist outside of the Lucee installation directory. This is the exact Lucee version I was running before my stupid mistake. And now I’m even more confused than before.
{
“instant”: {
“epochSecond”: 1754894071,
“nanoOfSecond”: 8078495
},
“thread”: {
“id”: 24427,
“priority”: 1
},
“level”: “ERROR”,
“loggerName”: “remoteclient”,
“application”: “remote-client”,
“message”: “failed to execute: test from - text”,
“thrown”: {
“commonElementCount”: 0,
“message”: “com/sun/mail/util/SocketConnectException”,
“name”: “lucee.runtime.exp.NativeException”
},
“extendedStackTrace”: " at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3549)
at java.base/java.lang.Class.getConstructor0(Class.java:3754)
at java.base/java.lang.Class.getConstructor(Class.java:2442)
at javax.mail.Session.getService(Session.java:799)
at javax.mail.Session.getTransport(Session.java:728)
at javax.mail.Session.getTransport(Session.java:668)
at javax.mail.Session.getTransport(Session.java:648)
at lucee.runtime.net.smtp.SMTPConnectionPool$SessionAndTransport.(SMTPConnectionPool.java:171)
at lucee.runtime.net.smtp.SMTPConnectionPool.getSessionAndTransport(SMTPConnectionPool.java:57)
at lucee.runtime.net.smtp.SMTPClient.createMimeMessage(SMTPClient.java:492)
at lucee.runtime.net.smtp.SMTPClient._send(SMTPClient.java:859)
at lucee.runtime.spooler.mail.MailSpoolerTask.execute(MailSpoolerTask.java:139)
at lucee.runtime.spooler.SpoolerTaskSupport._execute(SpoolerTaskSupport.java:107)
at lucee.runtime.spooler.SpoolerEngineImpl.execute(SpoolerEngineImpl.java:619)
at lucee.runtime.spooler.SpoolerEngineImpl.execute(SpoolerEngineImpl.java:612)
at lucee.runtime.spooler.SpoolerEngineImpl$TaskThread.run(SpoolerEngineImpl.java:548)
",
“endOfBatch”: false
}
that usually means the host:port is wrong, does the mail server validation in the admin work?
cfmail also has a debug attribute, which logs out debug to the console
13-Aug-2025 10:04:17.851 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [7455] milliseconds
DEBUG: setDebug: Jakarta Mail version 1.6.7
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 1025, isSSL false
DEBUG: setDebug: Jakarta Mail version 1.6.7
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
The server configuration of the smtp service (Postfix) on those servers hasn’t changed in years, they’ve always been 127.0.0.1:25 and have worked fine on multiple Lucee 5 revisions, and V6 up until 6.2.1.122 when it stopped working.
When I get a chance to spin up a 6.2.3.15-SNAPSHOT testbed I’ll add debugging output here.