Author: vjrj_ Date: 2012-03-05 22:10:38 +0100 (Mon, 05 Mar 2012) New Revision: 1738 Modified: trunk/INSTALL trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java trunk/src/main/resources/META-INF/persistence.xml Log: updated INSTALL Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2012-03-05 20:19:55 UTC (rev 1737) +++ trunk/INSTALL 2012-03-05 21:10:38 UTC (rev 1738) @@ -142,30 +142,26 @@ Not verified: in Windows you need to do something similar (copy the jmagick .dll of the same version in the Windows directory) -===Run the server for the first time=== +===Initialize the kune database=== -Run the server for the first time and initialize the db: +mysql -p -u kune < script/kune_initialize.sql -I you are installing kuen for development: +And if all goes ok, migrate the database: - bin/server.sh # or mvn exec:java +script/liquibase-migrate.sh -or for production +Windows users should do this by hand or adapt this (simple) script to Windows. - bin/server.sh -j kune.jar # -h for more options +===Run the server=== -Once started for the first time the db is initialized. Then you should stop (Ctrl-C) and start the db migration process: +Run the server for the first time and initialize the db: - ./script/liquibase-migrate.sh +I you are installing kune for development: -=== Normal kune server start (after initialization) === + bin/server.sh # or mvn exec:java -After that, you can start the server using the script: +or for production - bin/server.sh - -or (again) running in production: - bin/server.sh -j kune.jar # -h for more options ===Connecting to the server=== Modified: trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java =================================================================== --- trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java 2012-03-05 20:19:55 UTC (rev 1737) +++ trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java 2012-03-05 21:10:38 UTC (rev 1738) @@ -176,12 +176,9 @@ } public void initConditional() throws Exception { - final Group dummyGroup = new Group("dummygr", "dummygr"); - groupManager.persist(dummyGroup); if (groupManager.count() == 0) { initialize(); } - groupManager.remove(dummyGroup); translationService.init(); } Modified: trunk/src/main/resources/META-INF/persistence.xml =================================================================== --- trunk/src/main/resources/META-INF/persistence.xml 2012-03-05 20:19:55 UTC (rev 1737) +++ trunk/src/main/resources/META-INF/persistence.xml 2012-03-05 21:10:38 UTC (rev 1738) @@ -50,7 +50,7 @@ <!-- http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-p... (NO!, use liquibase, for instance) --> <!-- http://stackoverflow.com/questions/438146/hibernate-question-hbm2ddl-auto-po... --> - <property name="hibernate.hbm2ddl.auto" value="update"/> + <property name="hibernate.hbm2ddl.auto" value="validate"/> <!-- https://www.hibernate.org/214.html --> <property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider"/>