# SSLexception error in Catalina.out

**URL:** <https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741>\
**Category:** support\
**Created:** [July 9, 2019, 2:02pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741 "2019-07-09T14:02:35Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [July 9, 2019, 2:02pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/1 "2019-07-09T14:02:35Z")

</div>

Hey, I upgraded to Lucee 5.3.3.60-RC last night on my test server to verify it works with OpenJDK 12.0.1 - (It does, yes!)

However, every hour I am getting the following error and this is on a cloud instance that has 0 traffic unless I am working on it. So I assumed this was a new issue. However, looking at my production Catalina.out log, it’s there as well for version 5.3.2.77

```auto
Tue Jul 09 03:13:41 EDT 2019 WARN: Caught while disconnecting...

EXCEPTION STACK TRACE:

**BEGIN NESTED EXCEPTION** 

javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:133)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:307)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:263)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:254)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:650)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:629)
	at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1319)
	at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
	at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
	at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
	at lucee.runtime.db.DatasourceConnectionImpl.close(DatasourceConnectionImpl.java:309)
	at lucee.runtime.db.DCStack.clear(DCStack.java:159)
	at lucee.runtime.db.DCStack.clear(DCStack.java:139)
	at lucee.runtime.db.DatasourceConnectionPool.clear(DatasourceConnectionPool.java:175)
	at lucee.runtime.engine.Controler.control(Controler.java:325)
	at lucee.runtime.engine.Controler.control(Controler.java:236)
	at lucee.runtime.engine.Controler.access$000(Controler.java:60)
	at lucee.runtime.engine.Controler$ControlerThread.run(Controler.java:113)

**END NESTED EXCEPTION**

```

---

<div class="post-metadata">

**Author:** ![Zackster](https://dev.lucee.org/user_avatar/dev.lucee.org/zackster/32/3484_2.png) [@Zackster](https://dev.lucee.org/u/Zackster)\
**Post date:** [July 9, 2019, 2:13pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/2 "2019-07-09T14:13:19Z")

</div>

[https://luceeserver.atlassian.net/browse/LDEV-2355](https://luceeserver.atlassian.net/browse/LDEV-2355)

quite a few of the db extensions need updating, i.e mysql and sql server

---

<div class="post-metadata">

**Author:** ![bdw429s](https://dev.lucee.org/user_avatar/dev.lucee.org/bdw429s/32/37_2.png) [@bdw429s](https://dev.lucee.org/u/bdw429s)\
**Post date:** [July 9, 2019, 2:48pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/3 "2019-07-09T14:48:33Z")

</div>

Dang, Zac beat me to it 🙂 That’s a bug in the JDBC driver, which has since been patched in the driver, but Lucee has not yet made that new driver available. You can either disable SSL in your datasource connection or go make some noise on that ticket. Or both 🙂

---

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [July 9, 2019, 8:01pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/4 "2019-07-09T20:01:22Z")

</div>

So, “in the old days” you could get the driver and manually update the file. Is that still possible?

Let me rephrase that - can I swap out

```auto
/lucee-server/bundles/com.mysql.cj-8.0.15.jar

```

with

```auto
mysql-connector-java-8.0.16.jar

```

from MySQL?

---

<div class="post-metadata">

**Author:** ![bdw429s](https://dev.lucee.org/user_avatar/dev.lucee.org/bdw429s/32/37_2.png) [@bdw429s](https://dev.lucee.org/u/bdw429s)\
**Post date:** [July 9, 2019, 8:07pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/5 "2019-07-09T20:07:13Z")

</div>

Yeah, you could grab the jar, or an OSGI bundle if they have it and then specify the classname or bundle name manually. I think adding an “other” dsn via the web admin only allows class name so it you go the bundle route, you’d probably need to specify the connection in your `Application.cfc`.

---

<div class="post-metadata">

**Author:** ![Leftbower](https://dev.lucee.org/user_avatar/dev.lucee.org/leftbower/32/4395_2.png) [@Leftbower](https://dev.lucee.org/u/Leftbower)\
**Post date:** [July 10, 2019, 1:05am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/6 "2019-07-10T01:05:56Z")

</div>

You should be able to grab the `mysql-connector-java-8.0.16.jar` from Maven and throw it into a quick OSGI bundle and voila!

To make it real easy, you could probably just copy out the `.lex` from the installed MySQL `.15` bundle, open it, replace it with the `.16` jar and update the MANIFEST to the new version and then drop it back into Lucee.

There’s not much to those bundles! I’ve made several for older databases we still need to connect to…

---

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [July 10, 2019, 1:10am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/7 "2019-07-10T01:10:44Z")

</div>

That’s kind of what I did.

I downloaded the 8.0.16 jar from MySQL and changed the name to com.mysql.cj-8.0.16, removed the 8.0.15 jar, opened the LEX and changed the versions. Also had to change the versions in the Lucee-server.xml file.

Working on test system with, no errors about SSL.

Of course, doing this for multiple contexts is a bit of a pain, but it avoids a huge log file.

Only thing now is that the Lucee Extension Application information (in Lucee admin) - it shows 8.0.16 but states that it requires 8.0.15.

 ![43%20PM](https://dev.lucee.org/uploads/default/original/2X/d/d2dae3a4e4eb51bab72ace5490134471193c9cb2.png)

---

<div class="post-metadata">

**Author:** ![Leftbower](https://dev.lucee.org/user_avatar/dev.lucee.org/leftbower/32/4395_2.png) [@Leftbower](https://dev.lucee.org/u/Leftbower)\
**Post date:** [July 10, 2019, 2:23am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/8 "2019-07-10T02:23:30Z")

</div>

I left the jar name alone as `mysql-connector-java-8.0.16.jar` and updated the MANIFEST.

You shouldn’t have to change anything in Lucee-server.xml? If you then just deploy the `.lex` it should update everything on its own:

 ![Capture](https://dev.lucee.org/uploads/default/original/2X/4/40462651faa3a186c4705f53af082af547e49990.png)

No more log files with errors! You can download my version here to try:

[mysql-connector-java-8.0.16.lex](https://dev.lucee.org/uploads/short-url/5dd3V9iV6ogIOGq3kgr0QkjXflx.lex) (2.1 MB)

---

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [July 10, 2019, 3:22am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/9 "2019-07-10T03:22:49Z")

</div>

Sweet! That did the trick!

Is there an easy to follow guide for creating these?

---

<div class="post-metadata">

**Author:** ![Leftbower](https://dev.lucee.org/user_avatar/dev.lucee.org/leftbower/32/4395_2.png) [@Leftbower](https://dev.lucee.org/u/Leftbower)\
**Post date:** [July 10, 2019, 6:36pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/10 "2019-07-10T18:36:07Z")

</div>

There are dozens of guides if you Google around on creating OSGI packages. But _OSGI’ifying_ a single jar is pretty simple… it’s basically just extra meta-data in the package.

It can get a bit more complex when you are packaging several jars and they have dependencies upon other jars outside of those you wish to package…

Turning it into a Lucee extension is more involved, but not difficult. There are some basic examples in the Lucee docs somewhere…

---

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [January 2, 2020, 9:21pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/11 "2020-01-02T21:21:49Z")

</div>

So… Happy new year!! I am now trying to create a 8.0.18 OSGI bundle. I followed the guide here - [https://lucee.daemonite.io/t/how-do-i-convert-an-existing-jar-file-into-an-osgi-bundle/374](https://lucee.daemonite.io/t/how-do-i-convert-an-existing-jar-file-into-an-osgi-bundle/374)

I started with your 8.0.16 lex file, unzipped that, dropped in a new 8.0.18 driver, changed the manifest and then

1. zipped it up, renamed extension to .lex - no go, Lucee did not recognize the manifest

2. Then I tried the method at the link above and again, Lucee does not recognize the manifest.

I am pretty sure the manifest is correct. Generated a new UUID and all. Is there some special file format that I am missing?

Feel like I have wasted 2 hours on this. Here is my attempt.

[com.mysql.cj-8.0.18.lex](https://dev.lucee.org/uploads/short-url/52ygWo0ZuOWlpOX7NWa0AZKu55m.lex) (2.1 MB) com.mysql.cj-8.0.18.lex

---

<div class="post-metadata">

**Author:** ![Leftbower](https://dev.lucee.org/user_avatar/dev.lucee.org/leftbower/32/4395_2.png) [@Leftbower](https://dev.lucee.org/u/Leftbower)\
**Post date:** [January 2, 2020, 9:59pm UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/12 "2020-01-02T21:59:34Z")

</div>

I am not positive, but just a quick look at the file you attached and your file structure appears to be an extra level deeper than mine.

i.e. my root contains 3 folders: “content”, “jars” and “META-INF” whereas your root contains “\_\_MACOSX” and “com.mysql.cj-8.0.18” (with the relevant files being one deeper inside com.mysql.cj-8.0.18)

Try mimicking the folder structure I used and see if that makes a difference?

---

<div class="post-metadata">

**Author:** ![derrickpeavy](https://dev.lucee.org/user_avatar/dev.lucee.org/derrickpeavy/32/2044_2.png) [@derrickpeavy](https://dev.lucee.org/u/derrickpeavy)\
**Post date:** [January 3, 2020, 12:43am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/13 "2020-01-03T00:43:05Z")

</div>

Excellent! Thank you! I took the easy way out and zipped the file from the Finder and then changed the extension to .lex.

This time, I zipped from the command line and made sure I zipped the correct folder.

Odd thing I created a valid UUID so that I would not use the same one you had in yours. But Lucee did not like that UUID. So, I reverted back to your UUID. Any idea why?

**So. For anyone who wants to do this for later versions (i.e.: me, 6 months from now):**

Download the file I have here 8.0.18, (or Leftbower’s) 8.0.16 version and do the following:

- Unzip the file (it’s .lex, but it can be unzipped, or you just change the extension to .zip and then unzip)
- Go to: the folder /com.mysql.cj-8.0.18/META-INF and open MANIFEST.MF (obviously with a text editor or IDE)
- Change the version to the next version (.16, .18, etc) in both places
- Drop the new JDBC driver from MySQL/Oracle into the /com.mysql.cj-8.0.18/jars folder
- Zip it up from the terminal (command line), and change the extension to .lex
- If you’re using MacOS you will want to do something like `zip -r com.mysql.cj-8.0.16.zip * -x "*.DS_Store"` to avoid the irritating DS\_store files

Then change the extension from .zip to .lex and add it in the Lucee admin and voila - latest version of MySQl driver.

[com.mysql.cj-8.0.16.lex](https://dev.lucee.org/uploads/short-url/jpgJ2jn9UBYSAiei1N1rp9CXvFK.lex) (2.1 MB)

---

<div class="post-metadata">

**Author:** ![Leftbower](https://dev.lucee.org/user_avatar/dev.lucee.org/leftbower/32/4395_2.png) [@Leftbower](https://dev.lucee.org/u/Leftbower)\
**Post date:** [January 3, 2020, 7:07am UTC](https://dev.lucee.org/t/sslexception-error-in-catalina-out/5741/14 "2020-01-03T07:07:31Z")

</div>

> [@derrickpeavy](#):
>
> Any idea why?

The UUID is extension-based, not different for each version of the same extension.
