« Volver a 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 archivos adjuntos
125735 Accesos
Promedio (4 Votos)
La valoración media es de 3.25 estrellas de 5.
Comentarios
Respuestas anidadas Autor Fecha
I can't seem to get this to work, when I click... Steven Mileham 4 de febrero de 2009 8:47
Yep, Even I couldn't find 7cogs-hook plugin...?? Shreekanth Vankamamidi 5 de febrero de 2009 2:25
I'm not an expert, but I believe this really... Ken Ebert 6 de febrero de 2009 12:11
Ken, your method worked. The bundled,... Keith Woods 10 de febrero de 2009 11:49
I am having a problem where I deleted the db... paul a adams 6 de marzo de 2009 0:17
Hi Paul, you might want to start with an empty... Olaf Kock 11 de marzo de 2009 14:49
Maybe it's not the app server but the liferay... Henning Sprang 28 de abril de 2010 14:01
I am currently not able to edit the page,... Olaf Kock 12 de marzo de 2009 4:21
Hello, I'm fighting to get this 7 cogs thing... Witold Tomasz Petriczek 8 de junio de 2009 5:26
Complete instruction how to remove 7cogs -... Michał Stefanów 25 de junio de 2009 13:36
Thanks guys, I've added more detailed... Jorge Ferrer 13 de julio de 2009 1:42
Sorry guys, I have followed this guide and now... Federico Pires 31 de julio de 2009 13:43
Can this wiki be updated to include delete... Ryan Terwedo 9 de agosto de 2009 20:44
Im an idiot it says to do that, and I just... Ryan Terwedo 9 de agosto de 2009 20:45
Oops I have copied fresh intstallation files to... Rob Bill Sedge 5 de noviembre de 2009 3:49
yep looks like it has deleted all my previous... Rob Bill Sedge 5 de noviembre de 2009 3:51
in 6.0.1 it' defintely not possible anymore to... Henning Sprang 28 de abril de 2010 13:57
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 3 de diciembre de 2010 6:05
Using Liferay 6.0.5, I deleted... Andrea Matsunaga 3 de diciembre de 2010 6:36
Anyone manage to succefully remove the sample... Patrice Laramee 25 de enero de 2011 10:47
Best way to install liferay without the sample... Patrice Laramee 25 de enero de 2011 11:35
Hi guys, Im on Liferay 6.0.6. Manage to remove... Achmed Tyrannus Albab 14 de noviembre de 2011 9: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.
Publicado el día 4/02/09 8:47.
Shreekanth Vankamamidi
Yep, Even I couldn't find 7cogs-hook plugin...??
Publicado el día 5/02/09 2: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.
Publicado el día 6/02/09 12:11 en respuesta a 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!
Publicado el día 10/02/09 11:49 en respuesta a 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.
Publicado el día 6/03/09 0:17 en respuesta a 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.
Publicado el día 11/03/09 14:49 en respuesta a 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]]
Publicado el día 12/03/09 4: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 ;/
Publicado el día 8/06/09 5:26 en respuesta a Olaf Kock.
Complete instruction how to remove 7cogs - http://www.liferay.com/web/guest/community/forums/-/message_boards/message/28084­01
Publicado el día 25/06/09 13:36 en respuesta a Witold Tomasz Petriczek.
Thanks guys,

I've added more detailed instructions to the wiki article based on the comments from those forum posts.
Publicado el día 13/07/09 1:42 en respuesta a 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
Publicado el día 31/07/09 13:43 en respuesta a 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
Publicado el día 9/08/09 20:44 en respuesta a Jorge Ferrer.
Im an idiot it says to do that, and I just wasnt... man o man
Publicado el día 9/08/09 20:45 en respuesta a 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
Publicado el día 5/11/09 3:49.
yep looks like it has deleted all my previous pages and setup ! Knightmare 7 cogs data lol:S
Publicado el día 5/11/09 3:51 en respuesta a 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!
Publicado el día 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...
Publicado el día 28/04/10 14:01 en respuesta a 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?
Publicado el día 3/12/10 6: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?
Publicado el día 3/12/10 6: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.
Publicado el día 25/01/11 10:47 en respuesta a 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!
Publicado el día 25/01/11 11:35 en respuesta a 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.
Publicado el día 14/11/11 9:08.