Message Boards

Unable to connect custom MySQL database with Liferay

Ramesh Kumar, modified 5 Years ago.

Unable to connect custom MySQL database with Liferay

New Member Posts: 10 Join Date: 4/24/18 Recent Posts
I want to connect custom MySQL database with liferay. As a start, I just created MySQL database using MySQL Workbench. I am able to access that database using JDBC in eclipse. So, when I do liferay server configuration. I choose MySQL database and provide database URL in the localhost:8080. When I click on finish configuration, I get error on eclipse


13:10:41,505 INFO  [http-bio-8080-exec-10][StartupAction:97] There are no patches installed
13:10:41,532 INFO  [http-bio-8080-exec-10][BaseDB:484] Database does not support case sensitive queries
13:10:41,641 ERROR [http-bio-8080-exec-10][SecureFilter:83] com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=20155, defaultUser=true}
com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=20155, defaultUser=true}
	at com.liferay.portal.service.persistence.UserPersistenceImpl.findByC_DU(UserPersistenceImpl.java:4033)
	at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceImpl.java:3041)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
	at com.sun.proxy.$Proxy108.loadGetDefaultUser(Unknown Source)
	at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl.java:2169)
	at sun.reflect.GeneratedMethodAccessor238.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
	at com.sun.proxy.$Proxy108.getDefaultUser(Unknown Source)
	at com.liferay.portal.service.UserLocalServiceUtil.getDefaultUser(UserLocalServiceUtil.java:1728)
	at com.liferay.portal.model.impl.CompanyImpl.getDefaultUser(CompanyImpl.java:95)
	at com.liferay.portal.util.PortalImpl.initUser(PortalImpl.java:5908)
	at com.liferay.portal.util.PortalUtil.initUser(PortalUtil.java:1657)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:289)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
	at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:6762)
	at com.liferay.portal.util.PortalImpl.sendError(PortalImpl.java:6622)
	at com.liferay.portal.util.PortalUtil.sendError(PortalUtil.java:1904)
	at com.liferay.portal.action.SetupWizardAction.execute(SetupWizardAction.java:94)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:168)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:557)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:534)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:361)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:57)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)


Any help would be appreciated.

Thanks
thumbnail
Olaf Kock, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Ramesh Kumar:
I want to connect custom MySQL database with liferay. As a start, I just created MySQL database using MySQL Workbench. I am able to access that database using JDBC in eclipse. So, when I do liferay server configuration. I choose MySQL database and provide database URL in the localhost:8080.


I'm not sure what you're doing here and when. Would you mind giving exact steps? What makes your database custom? There's nothing special in the database that Liferay stores its data in. The only issue you should be aware of is to create your database with the default character set utf8 (or utf-8, however mysql calls it)

And, whatever you do: Make sure that you use the mysql-driver jar for exactly the mysql version that you're using. Don't rely on Liferay shipping the correct driver for your version: Remove Liferay's from tomcat's lib/ext folder and install your own (matching) version
Ramesh Kumar, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

New Member Posts: 10 Join Date: 4/24/18 Recent Posts
Sorry, there is no custom database. I created MySQL database and updated data in the tables using MySQL Workbench. In order to access the created database using Java, I am using JDBC MySQL driver. Everything works fine when I try to connect using JDBC. Now, I want to connect same database with Liferay. So, I have changed the version of JDBC driver by putting jar file of correct MySQL version in tomcat's lib/ext folder. And during configuration of Liferay I specify the name of my created database. As a result, I get the error mentioned in the post. I can see that Liferay is able to create default tables in my database, but after sometimes, I get that error.
I have another question, Is there any other way to connect database with Liferay without creating using MySQL Workbench? I have heard about using ServiceBuilder. Is it possible to use ServiceBuilder for creating database and then connect with Liferay? Sorry, I am new to Liferay. That's why I am asking basic questions.

Thanks
thumbnail
Olaf Kock, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Ramesh Kumar:
Sorry, there is no custom database. I created MySQL database and updated data in the tables using MySQL Workbench. In order to access the created database using Java, I am using JDBC MySQL driver. Everything works fine when I try to connect using JDBC. Now, I want to connect same database with Liferay. So, I have changed the version of JDBC driver by putting jar file of correct MySQL version in tomcat's lib/ext folder. And during configuration of Liferay I specify the name of my created database. As a result, I get the error mentioned in the post. I can see that Liferay is able to create default tables in my database, but after sometimes, I get that error.


If you've had another installation available earlier under that address, there might be a browser that has some old cookies, including a "remember-me" cookie, claiming to be that user. This wouldn't be unheard of with cloud systems. Please make extra extra sure it's not that.

I have another question, Is there any other way to connect database with Liferay without creating using MySQL Workbench? I have heard about using ServiceBuilder. Is it possible to use ServiceBuilder for creating database and then connect with Liferay? Sorry, I am new to Liferay. That's why I am asking basic questions.

You've got to create at least the database somehow, before Liferay connects to it. If you do this with msql workbench, or with the command line (e.g. create database lportal character set utf8;) doesn't matter.

Check https://dev.liferay.com/en/discover/deployment/-/knowledge_base/7-0/deploying-product for detailed instruction

ServiceBuilder is used to create additional tables and relations, as well as an API for them. It won't help you with Liferay's own tables (even though many of them will be created by service builder as well.
Ramesh Kumar, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

New Member Posts: 10 Join Date: 4/24/18 Recent Posts
I created new database based on command you posted. But I am still unable to connect. My version of MySQL is 8.0.11 and using Eclipse I am able to connect with database using MySQL-connector with version: 5.1.4. Since I am using Maven, so my dependency looks like:

	<dependency>
			<groupid>mysql</groupid>
			<artifactid>mysql-connector-java</artifactid>
			<version>5.1.46</version>
		</dependency>


furthermore, when I add portal-ext.properties in tomcat-7.0.62/webapps/ROOT/WEB-INF/classes/, Server does not starts. This is my portal-ext.properties

jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal?autoReconnect=true&amp;useSSL=false;
jdbc.default.username=root
jdbc.default.password=root


i have also replaced
mysql-connector-java-5.1.46-bin.jar
in the lib directory with
mysql.jar
.

Since server fails to start when I create portal-ext.properties So, I remove it for time being and try to start the server. Then I am able to start the server but during configuration When I select mySQL database and
JDBC Driver Class Name (Required)
as
com.mysql.cj.jdbc.Driver

Then sometimes I get error that
Database driver (com.mysql.cj.jdbc.Driver) is not present. Please install it on your application server.


While sometimes i just say
Liferay is being installed. This may take a few minutes.
It takes more than half an hour but nothing appears. So I delibrately stop it.

Could you please help me this? I have wasted my whole day on this but cannot configure it properly.
thumbnail
Olaf Kock, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts
Ramesh Kumar:
I created new database based on command you posted. But I am still unable to connect. My version of MySQL is 8.0.11 and using Eclipse I am able to connect with database using MySQL-connector with version: 5.1.4. Since I am using Maven, so my dependency looks like:

...

furthermore, when I add portal-ext.properties in tomcat-7.0.62/webapps/ROOT/WEB-INF/classes/, Server does not starts. This is my portal-ext.properties

jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver
...


First of all, I'm assuming that the Maven dependency would not be needed.

Your portal-ext.properties should rather be in ${liferay.home}, e.g. the directory where the setup wizard also creates portal-setup-wizard.properties (and that file explicitly contains a definition of ${liferay.home}

But most importantly: I've not seen com.mysql.cj.jdbc.Driver. I have seen com.mysql.jdbc.Driver though. You might want to try that setting - it's understandable that this class can't be found if it's not available.

The mysql driver (again: Download the one matching provided for your database's version) should be in tomcat/lib/ext/ (make sure to have exactly one mysql driver jar in there)
Ramesh Kumar, modified 5 Years ago.

RE: Unable to connect custom MySQL database with Liferay

New Member Posts: 10 Join Date: 4/24/18 Recent Posts
Your portal-ext.properties should rather be in ${liferay.home}, e.g. the directory where the setup wizard also creates portal-setup-wizard.properties (and that file explicitly contains a definition of ${liferay.home}


I have defined portal-ext.properties in ${liferay.home}, but when I start the server I get error: Server Liferay v6.2 CE Server (Tomcat 7) at localhost failed to start.

Furthermore, Since I am trying to setup the Liferay for the first time after adding portal-ext.properties, Liferay cannot create portal-setup-wizard.properties file.
thumbnail
Armin Cyrus Dahncke, modified 3 Years ago.

RE: Unable to connect custom MySQL database with Liferay

Junior Member Posts: 81 Join Date: 8/12/08 Recent Posts
I installed DXP on MySQL 8 today, it was not working initially. Found some help here:
https://help.liferay.com/hc/en-us/articles/360028712332-Database-Templates
Basically I needed a new connector jar in tomcat/lib/ext and also the database template from the liferay helpcenter link.