Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ay Kay
Deploying (Copying) from WIN to LINUX: Database mess
February 27, 2013 2:51 AM
Answer

Ay Kay

Rank: Junior Member

Posts: 52

Join Date: November 17, 2011

Recent Posts

Hey there.

I deployed my local Liferay project which I developed on a WIN machine to a LINUX (Ubuntu 12) driven server. I (naively) planned to finish this within 30 minutes. Now 1 solid day later I present you the mess Liferay created. I am totally lost in this.

My steps. I kind of did it the same way it was discussed here ... and described in the wiki.

That is, I zipped my Liferay home folder (which happens to have the name liferay-portal-6.1.1-ce-ga2) which includes tomcat (tomcat-7.0.27) and copied and unzipped it to /usr/local/MY_PROJECT_NAME.

I do everything as root on the Linux server. I use MySQL 5.5.29 on the server and MySQL 5.5.16 on my local dev machine.

I created a Liferay database dump file from within MyPHPAdmin using the export function based on tables. That gave me a dump file on CREATE TABLE level (not CREATE DATABASE level). The Liferay database name on my local DEV machine is not lportal but myprojectname.

I created a DB user and database (named myprojectname) on the server with the exact same settings (names, password) as on my DEV machine. (Using my known user and password I can successfully log in that database with a mysql shell.) I imported the dump file again via MyPHPAdmin on that particular database myprojectname. I see all the tables just in place, fine!

I changed two setting in Liferay root folder in the files
  • portal-ide.properties
  • portal-setup-wizard.properties
which still had folder references to my local WIN7 environment. To be precise, set them to:
auto.deploy.tomcat.conf.dir=/usr/local/myprojectname/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/conf/Catalina/localhost
and
liferay.home=/usr/local/myprojectname/liferay-portal-6.1.1-ce-ga2

Started tomcat. Liferay can be found on http://server-IP:8080. Fine. Alas, what I see is not the project but a vanilla Liferay view. But the log file tells me MySQL 5 has been found and connected to.

<Liferay>/logs/liferay.2013-02-26.log
 118:31:41,689 INFO  [pool-2-thread-1][DialectDetector:71] Determine dialect for MySQL 5
 218:31:41,729 INFO  [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
 318:32:17,096 INFO  [pool-2-thread-1][BaseDB:455] Database does not support case sensitive queries
 418:32:18,035 INFO  [pool-2-thread-1][ServerDetector:154] Server supports hot deploy
 518:32:18,046 INFO  [pool-2-thread-1][PluginPackageUtil:1030] Reading plugin package for the root context
 618:32:20,766 INFO  [pool-2-thread-1][AutoDeployDir:106] Auto deploy scanner started for /usr/local/myprojectname/liferay-portal-6.1.1-ce-ga2/deploy
 718:32:22,995 INFO  [pool-2-thread-1][HotDeployImpl:178] Deploying MyProjectName-CertainPortlet-portlet from queue
 818:32:22,998 INFO  [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for MyProjectName-CertainPortlet-portlet
 918:32:24,594 INFO  [liferay/scheduler_dispatch-1][PluginPackageUtil:1292] Reloading repositories
1018:32:29,495 INFO  [pool-2-thread-1][HotDeployImpl:178] Deploying marketplace-portlet from queue
1118:32:29,496 INFO  [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for marketplace-portlet
1218:32:30,055 INFO  [pool-2-thread-1][HookHotDeployListener:550] Registering hook for marketplace-portlet
1318:32:30,227 INFO  [pool-2-thread-1][HookHotDeployListener:690] Hook for marketplace-portlet is available for use
1418:32:30,501 INFO  [pool-2-thread-1][HotDeployEvent:109] Plugin welcome-theme requires resources-importer-web
1518:32:30,548 INFO  [pool-2-thread-1][HotDeployImpl:233] Queueing welcome-theme for deploy because it is missing resources-importer-web
1618:32:38,296 INFO  [pool-2-thread-1][HotDeployImpl:178] Deploying resources-importer-web from queue
1718:32:38,298 INFO  [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for resources-importer-web
1818:32:38,431 INFO  [pool-2-thread-1][HotDeployImpl:178] Deploying welcome-theme from queue
1918:32:38,435 INFO  [pool-2-thread-1][PluginPackageUtil:1033] Reading plugin package for welcome-theme
2018:32:38,593 INFO  [pool-2-thread-1][ThemeHotDeployListener:87] Registering themes for welcome-theme
2118:32:38,751 INFO  [pool-2-thread-1][ThemeHotDeployListener:100] 1 theme for welcome-theme is available for use
2218:32:38,835 INFO  [liferay/hot_deploy-1][HotDeployMessageListener:142] Group or layout set prototype already exists for company liferay.com
2319:00:15,635 INFO  [com.liferay.portal.plugin.PluginPackageUtil][PluginPackageUtil:1421] Checking for available updates
2419:00:15,637 INFO  [com.liferay.portal.plugin.PluginPackageUtil][PluginPackageUtil:1465] Finished checking for available updates in 1 ms

I could not log in with any of my Liferay user accounts (created back then on my local DEV environment). After a while of checking my settings I took the plunge and created a new user to see the control panel. Much to my surprise this triggered the creation of all Liferay tables yet again, but this time with camel case names. They reside besides the original tables. Have a look at the current content of my Liferay database:
 1table_name
 2Account_
 3account_
 4Address
 5address
 6AnnouncementsDelivery
 7announcementsdelivery
 8AnnouncementsEntry
 9announcementsentry
10AnnouncementsFlag
11announcementsflag
12AssetCategory
13assetcategory
14AssetCategoryProperty
15assetcategoryproperty
16AssetEntries_AssetCategories
17assetentries_assetcategories
18AssetEntries_AssetTags
19assetentries_assettags
20AssetEntry
21assetentry
22AssetLink
23assetlink
24AssetTag
25assettag
26AssetTagProperty
27assettagproperty
28AssetTagStats
29assettagstats
30assetvocabulary
31AssetVocabulary
32BlogsEntry
33blogsentry
34BlogsStatsUser
35blogsstatsuser
36BookmarksEntry
37bookmarksentry
38BookmarksFolder
39bookmarksfolder
40BrowserTracker
41browsertracker
42CalEvent
43calevent
44ClassName_
45classname_
46ClusterGroup
47clustergroup
48Company
49company
50Contact_


Is it a MySQL issue? Is it a WIN versus LINUX issue? Have I missed a Liferay setting? Has anyone ever encountered this too?

Would greatly appreciate any thoughts as I am totally lost in what's going on here.
Cheers
David H Nebinger
RE: Deploying (Copying) from WIN to LINUX: Database mess
February 27, 2013 9:51 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11073

Join Date: September 1, 2006

Recent Posts

This is a mysql issue.

Mysql on windows is, by default, case insensitive whereas on linux it is case sensitive (I might have those backwards). There are suggestions on the web about changing your my.cnf to handle the differences between the two environments, but basically you're kinda stuck.
Hitoshi Ozawa
RE: Deploying (Copying) from WIN to LINUX: Database mess
February 27, 2013 1:31 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Following thread may help you. This really isn't a liferay problem but just a problem setting up mysql.
http://www.liferay.com/community/forums/-/message_boards/message/18039119
Ay Kay
RE: Deploying (Copying) from WIN to LINUX: Database mess
February 28, 2013 6:32 AM
Answer

Ay Kay

Rank: Junior Member

Posts: 52

Join Date: November 17, 2011

Recent Posts

Thank you David and Hitoshi.

I also had the suspicion this is less a Liferay but a MySQL issue. And I totally missed that thread.

Would like to add that it eventually worked for me after setting
lower_case_table_names=1
in etc/local/mysql/my.cnf
Don't know what that "set-variable=" mentioned in the other thread means. Different MySQL version? Call parameter?

Second, it flew only after a couple of restarts and after I put that parameter in the [ mysqld ] section of my.cnf as mentioned here. But maybe that was a coincidence and the actual location witihin my.cnf is optional.

Again many thanks to you guys!!