Developer need to keep in mind that settings have been changing for every version in lower version till 5.1X DB setting were done in Root.xml , 5.2.X onwards all the setting entries are made in portal-ext.properties file
lets discuss the different version setting first.
Version 6.X and 5.2X have same config
put JDBC setting in portal-ext.properties
location :
< 6.X or 5.X>
copy your JDBC settings from portal.properties ---> ## JDBC section
get file from the downloaded source or tomcat setup or directly from SVN
SVN location : http://svn.liferay.com/repos/public/portal/trunk/portal-impl/src/portal.properties
username is : guest and password is :
e.g.
# MySQL
#
#jdbc.default.driverClassName=com.mysql.jdbc.Driver
#jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
#jdbc.default.username=
#jdbc.default.password=
Liferay 5.1.X and lower versions
Make JDBC changes in Root.xml
ROOT.xml can be found in tomcat\conf\Catalina\localhost\ROOT.xml
e.g. Sample setting get exact setting from portal.properties file
MySQL
Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8"
username=""
password=""
maxActive="20"
Set properties for schema
## Schema
##
#
# Set this to true to automatically create tables and populate with default
# data if the database is empty.
#
schema.run.enabled=true
#
# 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
Checklist:
1> Make sure you have copied your database driver support
e.g. for oracle copy ojdbc14.jar to
2> Test your DB availability and creation of schema
Schema name should match the schema name mentioned in jdbc.default.url
3>Check that you have correct version of driver support jar and is compatible with your your installation I have seen number of user facing problem due to incompatible version.
4> Check for proper character set settings for your database
Detailed Learning resource official documentation
1 comment:
Post a Comment