Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Nagaraj Desingurajan
WebServices Portlets - not connecting to Mysql DB ?
March 31, 2011 12:25 AM
Answer

Nagaraj Desingurajan

Rank: Junior Member

Posts: 37

Join Date: February 20, 2011

Recent Posts

Hi,

I'am trying to create some sample portlets making call to Liferay Web Services

like, Portal_CountryService, Portal_ClassNameService, etc.

When I use Liferay Default HSQL DB I can see the response in my portlets.
But when I try to use Mysql DB I'am not able to see my portlets only(It says portlets are undeployed)

FYI, I change the database properties of my Portlets just my modifying the portal.properties

#
# Hypersonic
#
#jdbc.default.driverClassName=org.hsqldb.jdbcDriver
#jdbc.default.url=jdbc:hsqldb:${liferay.home}/data/hsql/lportal
#jdbc.default.username=sa
#jdbc.default.password=

#
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost:3306/lportal605_db?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=User1234


So, when I want to use HSQL I uncomment HSQL Properties and vice versa.
This change is getting reflected in the Liferay/Tomcat Server Logs also.

And my Mysql Database is not empty FYI, because the database tables is created by Liferay SDK when I first Change the portal.properties.


Am I Missing any configuration here?

Need Help.


Thanks,
Nagaraj.
Nagaraj Desingurajan
RE: WebServices Portlets - not connecting to Mysql DB ?
April 1, 2011 5:28 AM
Answer

Nagaraj Desingurajan

Rank: Junior Member

Posts: 37

Join Date: February 20, 2011

Recent Posts

Hi all,

I resolved the HSQL-Mysql database switching issue.

After placing the portal-ext.properties(which has my MySql database properties) inside liferay-portal-6.0.5\tomcat-6.0.26\webapps\ROOT\WEB-INF\classes, There is one more property in portal-impl.jar/portal.properties,

#
# Set this to to true to populate with the minimal amount of data. Set this
# to false to populate with a larger amount of sample data.
#
schema.run.minimal=true

I Override this property also in my portal-ext.properties setting the value to false.

#
# Set this to to true to populate with the minimal amount of data. Set this
# to false to populate with a larger amount of sample data.
#
schema.run.minimal=false

And got it working. Now My sample web service portlets are displaying the response from the web services using my MySql Database.

Thanks,
Nagaraj.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!