Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-90898

Deprecated Liferay JDBC driver for mariadb v.1.1.9 (2015) makes Tomcat's JNDI DBCP not stable.

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.1.2 CE GA3
    • Fix Version/s: None
    • Component/s: Portal Configuration
    • Labels:
      None

      Description

      I have Liferay Portal v.7.1.2 MariaDB v.10.0 and this is version of MariaDB driver in bundles/tomcat-9.0.10/lib/ext/mariadb.jar (original Tomcat servlet container don't have drivers for MariaDB)

      https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client/1.1.9

      Generally JNDI works. But its not stable. This driver have issues like this:
      https://mariadb.atlassian.net/browse/CONJ-68

      and I have a rare exception (but this make code not ready for production)

      20-Feb-2019 08:30:56.189 WARNING [commons-pool-evictor-thread] org.apache.tomcat.dbcp.dbcp2.SwallowedExceptionLogger.onSwallowException An internal object pool swallowed an Exception.
       java.sql.SQLNonTransientConnectionException: Could not connect to mariadb:3306: unexpected end of stream, read 0 bytes from 4
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:136)
      	at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:115)
      	at org.apache.tomcat.dbcp.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
      	at org.apache.tomcat.dbcp.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:279)
      	at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:886)
      	at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.ensureIdle(GenericObjectPool.java:954)
      	at org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.ensureMinIdle(GenericObjectPool.java:933)
      	at org.apache.tomcat.dbcp.pool2.impl.BaseGenericObjectPool$Evictor.run(BaseGenericObjectPool.java:1121)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not connect to mariadb:3306: unexpected end of stream, read 0 bytes from 4
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:547)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.connect(MySQLProtocol.java:722)
      	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.<init>(MySQLProtocol.java:281)
      	at org.mariadb.jdbc.Driver.connect(Driver.java:111)
      

      If I try to update driver (remove old one v.1.1.9 and replace the new one -> v2.4.0) I can repeat this issue:
      https://issues.liferay.com/browse/LPS-90597

      Maybe it's neeed to update in Liferay Hibernate version too?

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            sytolk Stanimir
            Recent user:
            Lester Pi
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package