« Back to Introduction to...

7Cogs Sample Data

Introduction #

Liferay versions 5.2 and 6.0 include some sample data in the bundles to showcase Liferay Portal's capabilities. You will find several users, organization and web pages already created belonging to a fictitious company called 7Cogs.

If you play around with the default installation, you shouldn't delete the administrative user bruno, as his existence is used by the 7cogs plugin to check if it was already installed. If - on a new start of the browser - this plugin can't find bruno, it will happily recreate the initial demonstrative database and delete all your work.

This article helps getting rid of this behaviour and enables you to keep your data without the need for Bruno to stick around forever.

Starting in Liferay 6.0.5 and forward, Bruno is no longer used as the logic for deleting everything. Still, do remember to delete the 7Cogs hook before using any production installation environment.

Remove the sample data #

To remove the sample data that is included in the bundle follow these steps:

1. Go to the Control Panel > Plugin Installation, search for sevencogs-hook and remove it.

In case you can't find it there, remove the application from the server. (For example, if you are using tomcat, remove the folder 7cogs in webapps).

Important Note: some application servers may not support hot undeploy using this method. In those cases follow the instructions of your application server to undeploy sevencogs-hook.war

For example for Tomcat, if the above doesn't work, go to your file manager and navigate to liferay-portal-5.2.2\tomcat-5.5.27\webapps

2. Stop the Liferay Portal server

3. Delete the data in your database or point to a new database. The exact steps will depend on the database you are using. Here are the exact instructions for some common ones:

3.1 If you're using Hypersonic, which is the default db, this should work.

  1. Shut down the application server (For example, in Tomcat for windows double-click shutdown.bat.)
  2. Go to your file manager
  3. Navigate to liferay-portal-5.2.2\data\hsql
  4. Delete lportal.properties and lportal.script.
  5. Start up Liferay again using the startup.bat.

3.2 If you're using mysql it's console and delete the database and create it again executing the following SQL:

drop database lportal;
create database lportal character set utf8;

3.3 For other server based databases follow the same instructions as for MySQL but adapt the create SQL sentence to the specific db. Look the SQL script provided with Liferay for your specific database for further details.

4. Start the Liferay Portal server

5. Use a browser to access the server and login using the following credentials:

  • E-mail: test@liferay.com
  • Password: test

Install the sample data #

In order to install the sample data again, just access the Control Panel > Plugin Installation and install the plugin called 7 Cogs. (Only for versions above 5.2)

(Re-)Initialization of a(n existing) database#

Note: Be careful, as installing the 7cogs plugin will remove all data existing in your database
Careful: As said above: When this plugin is installed (as is the case in the default bundle download), deleting the user bruno will cause the plugin to re-initialize the database upon next start of the server. This applies to startups with the plugin being already installed, not just upon the act of installing it! You have been warned.

Liferay 5.2 Documentation Center

0 Attachments
117991 Views
Average (4 Votes)
The average rating is 3.25 stars out of 5.
Comments
Threaded Replies Author Date
I can't seem to get this to work, when I click... Steven Mileham 04 February 2009 08:47
Yep, Even I couldn't find 7cogs-hook plugin...?? Shreekanth Vankamamidi 05 February 2009 02:25
I'm not an expert, but I believe this really... Ken Ebert 06 February 2009 12:11
Ken, your method worked. The bundled,... Keith Woods 10 February 2009 11:49
I am having a problem where I deleted the db... paul a adams 06 March 2009 00:17
Hi Paul, you might want to start with an empty... Olaf Kock 11 March 2009 14:49
Maybe it's not the app server but the liferay... Henning Sprang 28 April 2010 14:01
I am currently not able to edit the page,... Olaf Kock 12 March 2009 04:21
Hello, I'm fighting to get this 7 cogs thing... Witold Tomasz Petriczek 08 June 2009 05:26
Complete instruction how to remove 7cogs -... Michał Stefanów 25 June 2009 13:36
Thanks guys, I've added more detailed... Jorge Ferrer 13 July 2009 01:42
Sorry guys, I have followed this guide and now... Federico Pires 31 July 2009 13:43
Can this wiki be updated to include delete... Ryan Terwedo 09 August 2009 20:44
Im an idiot it says to do that, and I just... Ryan Terwedo 09 August 2009 20:45
Oops I have copied fresh intstallation files to... Rob Bill Sedge 05 November 2009 03:49
yep looks like it has deleted all my previous... Rob Bill Sedge 05 November 2009 03:51
in 6.0.1 it' defintely not possible anymore to... Henning Sprang 28 April 2010 13:57
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 03 December 2010 06:05
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 03 December 2010 06:36
Anyone manage to succefully remove the sample... Patrice Laramee 25 January 2011 10:47
Best way to install liferay without the sample... Patrice Laramee 25 January 2011 11:35
Hi guys, Im on Liferay 6.0.6. Manage to remove... Achmed Tyrannus Albab 14 November 2011 09:08

I can't seem to get this to work, when I click on the "Hooks" plugin page, I don't see a 7cogs-hook entry.
Posted on 04/02/09 08:47.
Shreekanth Vankamamidi
Yep, Even I couldn't find 7cogs-hook plugin...??
Posted on 05/02/09 02:25.
I'm not an expert, but I believe this really depends on the application server you're using.

Basically, according to note in the WIKI above: "Note: some application servers may not support hot undeploy using this method. In those cases follow the instructions of your application server to undeploy 7cogs-hook.war"

This forum thread may help guide you in getting
http://www.liferay.com/web/guest/community/forums/-/message_boards/message/52265­7

For me (running the tomcat6 bundle), deleting the webapps/sevencogs-hook/ directory worked.
Posted on 06/02/09 12:11 in reply to Shreekanth Vankamamidi.
Ken, your method worked. The bundled, all-in-one download does not come with a 7cogs-hook.war file (that I could find anyway), nor a 7cogs-hook plugin.

Deleting those two directories you mentioned seems to do the trick.

Thanks!
Posted on 10/02/09 11:49 in reply to Ken Ebert.
I am having a problem where I deleted the db files for 7cogs in two places, webapp and in catalina. The problem I get is that I cannot login with the test@liferay.com. The only way I can login is by creating a new account (non admin level) or by using the existing admin bruno and he cannot create new users. Any help would greatly be appreciated.
Posted on 06/03/09 00:17 in reply to Keith Woods.
Hi Paul,
you might want to start with an empty database and portal-ext.properties as this one: http://www.liferay.com/web/guest/community/forums/-/message_boards/message/21275­77#_19_message_2451843 - this will create a new "minimal content" database with test@liferay.com as standard user.
Posted on 11/03/09 14:49 in reply to paul a adams.
I am currently not able to edit the page, therefor I'll add an additional paragraph here, that was intended to be incorporated in the page (next to the bottom "Note: Be careful..."):

**Careful:** When this plugin is installed (as is the case in the default bundle download), [[http://www.liferay.com/web/guest/community/forums/-/message_boards/message/242­9268#_19_message_2460955|deleting the user bruno will cause the plugin to re-initialize the database]]
Posted on 12/03/09 04:21.
Hello, I'm fighting to get this 7 cogs thing removed and after following those 5 points my browser redirects me here:
someadress.something:8080/c/portal/layout

and the webpage is a null one... cannot login or do anything... are those 7cogs a need to have ;/
Posted on 08/06/09 05:26 in reply to Olaf Kock.
Complete instruction how to remove 7cogs - http://www.liferay.com/web/guest/community/forums/-/message_boards/message/28084­01
Posted on 25/06/09 13:36 in reply to Witold Tomasz Petriczek.
Thanks guys,

I've added more detailed instructions to the wiki article based on the comments from those forum posts.
Posted on 13/07/09 01:42 in reply to Michał Stefanów.
Sorry guys, I have followed this guide and now I cannot access with the "test" admin user... I did this on the first start, would that be the problem? How can I fix this or add a new user admin ? Thanks
Posted on 31/07/09 13:43 in reply to Jorge Ferrer.
Can this wiki be updated to include delete EVERYTHING under the data/hsql folder, not just the .script file? I spent about an hour figuring this out until I saw another post =)

They also suggested deleting the them, and wol and I am not sure if this needs to be done, I just did it along with everything else
Posted on 09/08/09 20:44 in reply to Jorge Ferrer.
Im an idiot it says to do that, and I just wasnt... man o man
Posted on 09/08/09 20:45 in reply to Ryan Terwedo.
Oops I have copied fresh intstallation files to point to my existing database but then forgot about the 7 cogs examples ! .. it installed them !

Did I lose my previous data, Ive undeployed but of course all pages are still there !
Easy but costly mistake ?

emoticon ? or emoticon ??emoticon
Posted on 05/11/09 03:49.
yep looks like it has deleted all my previous pages and setup ! Knightmare 7 cogs data lol:S
Posted on 05/11/09 03:51 in reply to Rob Bill Sedge.
in 6.0.1 it' defintely not possible anymore to remove the sample data via the web control panel "plugins installation" interface - you must delete the database and the sevencogs web apps in the file system!
Posted on 28/04/10 13:57.
Maybe it's not the app server but the liferay version where it does not work anymore via web interface?

for which appserver does it work from the web console?

If nobody seems to be able to remove the sevencogs stuff via the web, confusion should be avoided by removing this part of the text as many people seem to waste time trying to do this...
Posted on 28/04/10 14:01 in reply to Ken Ebert.
Using Liferay 6.0.5, I deleted webapps/sevencogs-hook/ directory as well as the lportal.properties and lportal.script files under data/hsql. The webserver (tomcat6) starts fine, however, I cannot access liferay, which is failing with an exception that a company does not exist:
ERROR [CompanyThreadLocal:54] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1

So, I rolled back the old lportal.* files. Any ideas of how to delete only the 7cogs entries from the db?
Posted on 03/12/10 06:05.
Using Liferay 6.0.5, I deleted webapps/sevencogs-hook/ directory as well as the lportal.properties and lportal.script files under data/hsql. The webserver (tomcat6) starts fine, however, I cannot access liferay, which is failing with an exception that a company does not exist:
ERROR [CompanyThreadLocal:54] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1

So, I rolled back the old lportal.* files. Any ideas of how to delete only the 7cogs entries from the db?
Posted on 03/12/10 06:36.
Anyone manage to succefully remove the sample data from liferay version 6.0.X+ ?

This procedure does not work. After removing hsql data files. The server will do infinite loops.
Posted on 25/01/11 10:47 in reply to Andrea Matsunaga.
Best way to install liferay without the sample data, here's the procedure:

1- Start from scratch, unzip the zip file.
2- Remove tomcat-X.X.X/webapps/sevencogs-hook
3- Start tomcat and voila!

If you start tomcat without deleting tomcat-X.X.X/webapps/sevencogs-hook, this webapp will fill your database with the sample data.

Now to login with the admin account you will need to use: test@liferay.com / test

Have fun!
Posted on 25/01/11 11:35 in reply to Patrice Laramee.
Hi guys,

Im on Liferay 6.0.6.
Manage to remove the 7cogs as usual.
But just wondering how do i delete the default (required) liferay.com community?
Or if not delete, edit the name to lets say LRRocks.com. i couldn't seem to find where can i do this.

Thanks.
Posted on 14/11/11 09:08.