[Building Sakai] Can't create course sites !??

Hai Vo Thanh v0thanhhai at yahoo.com
Sat May 5 11:08:26 PDT 2012


Hi Tarik,

Session data is stored in cm_academic_session_t table of Sakai database.
You have to insert some data into it in order to have session drop down list
when create course sites. Make sure that the IS_CURRENT must be set
to "1" to enable the session.

Regards,
Hai


________________________________
 From: "tarik_hp at yahoo.com" <tarik_hp at yahoo.com>
To: "sakai-dev at collab.sakaiproject.org" <sakai-dev at collab.sakaiproject.org> 
Sent: Saturday, May 5, 2012 5:18 PM
Subject: Re: [Building Sakai] Can't create course sites !??
 


>
>Hello Developpers Team,
>>
>>
>>I hope that you can help a new adopter fix an issue with Sakai CLE 2.8 + Mysql 5.5 on a windows system.
>>
>>
>>I can create project and Portfolio sites, but NOT the course sites since the academic term is empty!!
>>
>>
>>I also have an empty database which indicates that I'm probably using the default HSQLDB even if I did my best to have correctly modify my sakai.properties file!!
>>
>>
>>Can you please look at the output below and tell me what might prevents my sakai to use Mysql database as it should??
>>
>>
>>Kind regards,
>>Tarik.
>
>
>
>
>
>
>
>>>
>>>
>>>
>>>----- Forwarded Message -----
>>>>From: "tarik_hp at yahoo.com" <tarik_hp at yahoo.com>
>>>>To: "mike_jennings at unc.edu" <mike_jennings at unc.edu> 
>>>>Sent: Wednesday, May 2, 2012 7:41 PM
>>>>Subject: Re: can't create course sites !??
>>>> 
>>>>
>>>>Thank you Mr. Jennings for your willingness to share your experience,
>>>>
>>>>
>>>>Me too, I think that  my system is using the default HSLDB base even if my sakai.properties file points to my installed Mysql 5.5.21 "sakai" database!
>>>> (I'm puzzled by the switch that prevents the build from using mysql ???)
>>>>
>>>>
>>>>Below is my sakai.properties file with mysql connection settings:
>>>>---------------------------------------------------------------------------------------------------------
>>>># ########################################################################
>>>># DATABASE
>>>># ########################################################################
>>>>
>>>>
>>>># Let Sakai generate database objects on startup.
>>>># Default = true.
>>>>auto.ddl=true
>>>>
>>>>
>>>># set the Hibernate dialect (for shared datasource), 
>>>># HSQLDB by default, MySQL and Oracle examples
>>>>#hibernate.dialect=org.hibernate.dialect.HSQLDialect
>>>>hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
>>>>#hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
>>>>#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
>>>>
>>>>
>>>># Enable hibernate SQL debugging output.
>>>># Default=false.
>>>>hibernate.show_sql=false
>>>>
>>>>
>>>># The database username and password. The defaults are for the out-of-the-box HSQLDB.  
>>>># Change to match your setup. Do NOT enable access to your database without a password.
>>>>username at javax.sql.BaseDataSource=root
>>>>password at javax.sql.BaseDataSource=admin
>>>>
>>>>
>>>># HSQLDB settings (DEFAULT)
>>>>#vendor at org.sakaiproject.db.api.SqlService=hsqldb
>>>>#driverClassName at javax.sql.BaseDataSource=org.hsqldb.jdbcDriver
>>>>#hibernate.dialect=org.hibernate.dialect.HSQLDialect
>>>>#validationQuery at javax.sql.BaseDataSource=select 1 from INFORMATION_SCHEMA.SYSTEM_USERS
>>>># Two hsqldb storage options: first for in-memory (no persistence between runs), second for disk based.
>>>>#url at javax.sql.BaseDataSource=jdbc:hsqldb:mem:sakai
>>>>#url at javax.sql.BaseDataSource=jdbc:hsqldb:file:${sakai.home}db/sakai.db
>>>>
>>>>
>>>># MySQL settings
>>>>vendor at org.sakaiproject.db.api.SqlService=mysql
>>>>driverClassName at javax.sql.BaseDataSource=com.mysql.jdbc.Driver
>>>>hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
>>>>url at javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8 &useServerPrepStmts=false&cachePrepStmts=true&prepStmtCacheSize=4096&prepStmtCacheSqlLimit=4096
>>>>validationQuery at javax.sql.BaseDataSource=select 1 from DUAL
>>>>defaultTransactionIsolationString at javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
>>>>
>>>>
>>>>#establish aut.ddl
>>>>auto.ddl=true
>>>>#auto.ddl=false
>>>>
>>>>
>>>># To get accurate MySQL query throughput statistics (e.g. for graphing) from the mysql command
>>>># show status like 'Com_select'
>>>># This alternate validation query should be used so as not to increment the query counter unnecessarily when validating the connection:
>>>>validationQuery at javax.sql.BaseDataSource=show variables like 'version'
>>>>
>>>>
>>>># Oracle settings - make sure to alter as appropriate
>>>>#vendor at org.sakaiproject.db.api.SqlService=oracle
>>>>#driverClassName at javax.sql.BaseDataSource=oracle.jdbc.driver.OracleDriver
>>>>#hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
>>>>#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
>>>>#url at javax.sql.BaseDataSource=jdbc:oracle:thin:@your.oracle.dns:1521:SID
>>>>#validationQuery at javax.sql.BaseDataSource=select 1 from DUAL
>>>>#defaultTransactionIsolationString at javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
>>>>
>>>>
>>>># For improved Oracle performance, implementers using Oracle should strongly consider
>>>># enabling all the following settings just as they appear (suggestion from the University of Michigan).
>>>>#validationQuery at javax.sql.BaseDataSource=
>>>>#defaultTransactionIsolationString at javax.sql.BaseDataSource=
>>>>#testOnBorrow at javax.sql.BaseDataSource=false
>>>>
>>>>
>>>># ########################################################################
>>>>
>>>>
>>>>Any ideas on how to troubleshoot this issue??
>>>>
>>>>
>>>>Kind regards,
>>>>Tarik.
>>>>
>>>>
>>>>
>>>>>________________________________
>>>>> 
>>>>> Sent: Tuesday, May 1, 2012 4:04 PM
>>>>>Subject: Re: can't create course sites !??
>>>>> 
>>>>>Hi,
>>>>>
>>>>>What we found out is that a few tables are
                              not created, associated with 
>>>>>profile2 I think, when you use a mysql 5.5
                              database with Sakai.  Our 
>>>>>instance seems to work since we exported
                              our database schema from a 
>>>>>MySQL 5.1 database to a MySQL 5.5
                              database.  You should use the 
>>>>>MysQL5INNODB dialect for sure, as that is
                              correct.
>>>>>
>>>>>I do think that most of the issues with
                              the 5.5 database have been 
>>>>>fixed, but I am not sure about that.
>>>>>
>>>>>http://collab.sakaiproject.org/pipermail/sakai-dev/2011-August/013587.html
>>>>>
>>>>>Also I am not sure why you can't see all
                              of the tables in the sakai 
>>>>>database.  You would have to have some
                              tables there to be able to create 
>>>>>the project and portfolio sites but in
                              your show tables query it 
>>>>>returned 0.  I think that you might still
                              be using the HSQL db that is 
>>>>>setup by default.
>>>>>
>>>>>Where are you putting the mysql connection
                              information at, in your 
>>>>>sakai.properties or local.properties. 
                              Also where are these files stored 
>>>>>on your computer.
>>>>>
>>>>>Mike
>>>>>
>>>>>
>>>>>
>>>>>==============================================================================
>>>>>Mike Jennings
>>>>>Teaching and Learning Developer
>>>>>University of North Carolina at Chapel
                              Hill
>>>>>
>>>>>Office: (919) 843-5013
>>>>>Cell: (919) 698-3746
>>>>>E-mail: mike_jennings at unc.edu
>>>>>
>>>>>On 5/1/2012 10:52 AM, tarik_hp at yahoo.com wrote:
>>>>>> Hello Mr. Mike,
>>>>>>
>>>>>> I found your details on question you
                              posted to the Sakai community:
>>>>>> http://collab.sakaiproject.org/pipermail/sakai-dev/2011-August/013661.html
>>>>>>
>>>>>> Since there' no answer on the post,
                              can you please tell me how did you
>>>>>> fix the issue??
>>>>>> should hibernate.dialect=
                              ...MySQLINNODB or MySQL5INNODB?
>>>>>>
>>>>>> any help on the issue I have at hand
                              here below is very much appreciated!
>>>>>>
>>>>>> Have a nice day!
>>>>>>
>>>>>> KR,
>>>>>> Tarik.
>>>>>>
>>>>>>   
                              ------------------------------------------------------------------------
>>>>>>    *From:* "tarik_hp at yahoo.com" <tarik_hp at yahoo.com>
>>>>>>    *To:* "production at collab.sakaiproject.org"
>>>>>>    <production at collab.sakaiproject.org>
>>>>>>    *Sent:* Friday, April 27, 2012
                              7:44 PM
>>>>>>    *Subject:* can't create course
                              sites !??
>>>>>>
>>>>>>    Hello,
>>>>>>
>>>>>>    I recently installed a source
                              version of Sakai CLE 2.8 which is up
>>>>>>    and running.
>>>>>>
>>>>>>    I can create project &
                              portfolio sites, but I can't do course
                              sites
>>>>>>    since I have an empty "academic
                              session term" drop box?
>>>>>>
>>>>>>    I found out that I have to create
                              them manually on my sakai db:
>>>>>>    -----------------------------
>>>>>>
>>>>>>    INSERT INTO CM_ACADEMIC_SESSION_T
>>>>>>   
                              (ENTERPRISE_ID,TITLE,START_DATE,END_DATE)
                              VALUES(200950,'Spring
>>>>>>    2009',2009-05-10,2009-05-25);
>>>>>>
>>>>>>   
                              -----------------------------------
>>>>>>
>>>>>>    However, when I go to my mysql 5.5
                              server (see below), I have the
>>>>>>    impression that sakai scripts
                              didn't do its job in creating the
>>>>>>    tables of the Database!!
>>>>>>
>>>>>>
>>>>>>    mysql> CONNECT sakai ;
>>>>>>    Connection id: 10
>>>>>>    Current database: sakai
>>>>>>    mysql> SHOW TABLES;
>>>>>>    Empty set (0.00 sec)
>>>>>>    mysql> SHOW TABLES FROM sakai ;
>>>>>>    Empty set (0.03 sec)
>>>>>>    mysql> SHOW FULL TABLES;
>>>>>>    Empty set (0.00 sec)
>>>>>>    mysql> SHOW GRANTS FOR
                              CURRENT_USER;
>>>>>>   
+-------------------------------------------------------------------------------
>>>>>>   
                              ---------------------------------------------------------+
>>>>>>    | Grants for root at localhost
>>>>>>    |
>>>>>>   
+-------------------------------------------------------------------------------
>>>>>>   
                              ---------------------------------------------------------+
>>>>>>    | GRANT ALL PRIVILEGES ON *.* TO
                              'root'@'localhost' IDENTIFIED BY
>>>>>>    PASSWORD '*4AC
>>>>>>    FE3xxxxxxxxxxxxxxxxxxxxxxxxxx’'
                              WITH GRANT OPTION |
>>>>>>    | GRANT PROXY ON ''@'' TO
                              'root'@'localhost' WITH GRANT OPTION
>>>>>>    |
>>>>>>   
+-------------------------------------------------------------------------------
>>>>>>   
                              ---------------------------------------------------------+
>>>>>>    2 rows in set (0.00 sec)
>>>>>>    mysql>
>>>>>>    _DB excerpt from
                              “sakai.properties” file:_
>>>>>>   
#########################################################################
>>>>>>    # DATABASE
>>>>>>    #
>>>>>>   
                              ########################################################################
>>>>>>    # Let Sakai generate database
                              objects on startup.
>>>>>>    # Default = true.
>>>>>>    auto.ddl=true
>>>>>>    # set the Hibernate dialect (for
                              shared datasource),
>>>>>>    # HSQLDB by default, MySQL and
                              Oracle examples
>>>>>>   
                              #hibernate.dialect=org.hibernate.dialect.HSQLDialect
>>>>>>   
                              hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
>>>>>>   
                              #hibernate.dialect=org.hibernate.dialect.Oracle9iDialect
>>>>>>   
                              #hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
>>>>>>    # Enable hibernate SQL debugging
                              output.
>>>>>>    # Default=false.
>>>>>>    hibernate.show_sql=false
>>>>>>    # The database username and
                              password. The defaults are for the
>>>>>>    out-of-the-box HSQLDB.
>>>>>>    # Change to match your setup. Do
                              NOT enable access to your database
>>>>>>    without a password.
>>>>>>    username at javax.sql.BaseDataSource=root
>>>>>>    password at javax.sql.BaseDataSource=admin
>>>>>>    # HSQLDB settings (DEFAULT)
>>>>>>    #vendor at org.sakaiproject.db.api.SqlService=hsqldb
>>>>>>    #driverClassName at javax.sql.BaseDataSource=org.hsqldb.jdbcDriver
>>>>>>   
                              #hibernate.dialect=org.hibernate.dialect.HSQLDialect
>>>>>>    #validationQuery at javax.sql.BaseDataSource=select 1 from
>>>>>>    INFORMATION_SCHEMA.SYSTEM_USERS
>>>>>>    # Two hsqldb storage options:
                              first for in-memory (no persistence
>>>>>>    between runs), second for disk
                              based.
>>>>>>    #url at javax.sql.BaseDataSource=jdbc:hsqldb:mem:sakai
>>>>>>    #url at javax.sql.BaseDataSource=jdbc:hsqldb:file:${sakai.home}db/sakai.db
>>>>>>    # MySQL settings
>>>>>>    vendor at org.sakaiproject.db.api.SqlService=mysql
>>>>>>    driverClassName at javax.sql.BaseDataSource=com.mysql.jdbc.Driver
>>>>>>   
                              hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
>>>>>>    url at javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8
>>>>>>   
&useServerPrepStmts=false&cachePrepStmts=true&prepStmtCacheSize=4096&prepStmtCacheSqlLimit=4096
>>>>>>    validationQuery at javax.sql.BaseDataSource=select 1 from DUAL
>>>>>>    defaultTransactionIsolationString at javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
>>>>>>    #establish aut.ddl
>>>>>>    auto.ddl=true
>>>>>>    #auto.ddl=false
>>>>>>    # To get accurate MySQL query
                              throughput statistics (e.g. for
>>>>>>    graphing) from the mysql command
>>>>>>    # show status like 'Com_select'
>>>>>>    # This alternate validation query
                              should be used so as not to
>>>>>>    increment the query counter
                              unnecessarily when validating the
>>>>>>    connection:
>>>>>>    validationQuery at javax.sql.BaseDataSource=show variables like 'version'
>>>>>>   
-------------------------------------------------------------------------
>>>>>>    Is there a problem with my sakai
                              database/ sakai properties file?
>>>>>>    How can I get the session academic
                              terms and create course sites?
>>>>>>
>>>>>>    Thank you for your feedback.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>
>>
>>
>>
>>
>>
>>
>
>
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120505/af59964f/attachment.html 


More information about the sakai-dev mailing list