RE: RE: Liferay 7.4.1 and global classpath

thumbnail
Jamie Sammons, modified 4 Years ago. New Member Posts: 12 Join Date: 2/1/20 Recent Posts

I have been using mysql-connector by adding the JAR file to global classpath [tomcat-home]/lib/ext.

Liferay 7.4.1 has moved all JARs from [tomcat-home]/lib/ext to [tomcat-home]/webapps/ROOT/WEB-INF/lib and [tomcat-home]/lib/ext no more exists.

Any suggestions where I should put my mysql-connector? Deploying it into osgi/modules causes SQLException: Cannot load JDBC driver class 'com.mysql.cj.jdbc.Driver' when a portlet tries to load the class.

Cheers!

thumbnail
Jamie Sammons, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

${tomcat.home}/lib ?

thumbnail
Olaf Kock, modified 4 Years ago. New Member Posts: 12 Join Date: 2/1/20 Recent Posts

Thanks Olaf. I saw your reply but for some reason it no more exists.

[tomcat-home]/lib/ext had been removed from [tomcat-home]/conf/catalina.properties common.loader list in 7.4.1 GA2. Putting mysql connector to [tomcat-home]/lib worked fine. I guess it is possible to add a custom directory to catalina.properties common.loader list to have addidional jar files separated from tomcat's ones but for now [tomcat-home]/lib is Ok for me.

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

My answer is still there, but accepting it has put it back to invisible in the approval workflow. I'll leave it there as a demo for those who fix this kind of issues. It'll re-appear soon when someone approves it again.

If anybody wonders what I answered until it re-appears:

${tomcat.home}/lib ?