Navigation
Academic Area Reservations
Academic Areas
Academic Classifications
Academic Sessions
Add Academic Session
Add Application Setting
Add Building
Add Course Credit Type
Add Course Credit Unit
Add Course Offering
Add Course Type
Add Curriculum
Add Date Pattern
Add Default Manager Setting
Add Department
Add Designator
Add Distribution Preference
Add Event
Add Event Date Mapping
Add Event Info
Add Event Meetings
Add Examination
Add Examination Distribution Preference
Add Examination Period
Add Examination Type
Add Instructional Type
Add Instructor
Add Instructor Attribute
Add Instructor Attribute Type
Add Instructor Role
Add Logging Level
Add Non-University Location
Add Position Type
Add Reservation
Add Role
Add Room
Add Room Feature
Add Room Feature Type
Add Room Group
Add Room Type
Add Solver Configuration
Add Solver Group
Add Solver Parameter
Add Solver Parameter Group
Add Special Use Room
Add Sponsoring Organization
Add Standard Event Note
Add Status Type
Add Student Accommodation
Add Student Group
Add Student Group Type
Add Student Scheduling Status Type
Add Subject Area
Add Teaching Responsibility
Add Time Pattern
Add Timetable Manager
Add User
Additional Distribution Constraints
Administration Reports
Advisor Course Recommendations
Alternatives for Class
Application Configuration
Application Of Preferences
Application.properties
Assign Instructors
Assigned Classes
Assigned Examinations
Assigned Teaching Requests
Assignment History
Attachment Types
Banner Academic Sessions
Banner Message Responses
Banner Offering Detail
Banner Offering Edit
Banner Offerings
Banner Term CRN Properties
Batch Student Solver Dashboard
Bugs
Building UniTime
Buildings
CAS Authentication
CPSolver
Chameleon
Change Log for Student
Change Message for Student
Changes
Class Assignment
Class Assignment Properties
Class Assignments
Class Detail
Class Duration Types
Class Schedule
Class Timetable
Classes
Classes for Student
Conflict-Based Statistics
Constraint Solver Howto
Contact Us
Course Credit
Course Credit Formats
Course Credit Types
Course Credit Units
Course Finder
Course Reports
Course Reservations
Course Timetabling Solver
Course Timetabling Solver Log
Course Types
Credits
Current User
Curricula
Curriculum Detail
Curriculum Projection Rules
Curriculum Requested Enrollments
Curriculum Schedule
Curriculum Timetable
Custom Room Availability
Customizations
Data Exchange
Date Patterns
Default Academic Session
Default Manager Settings
Departmental Schedule
Departmental Timetable
Departments
Designator List
Distribution Preferences
Distribution Types
Eclipse
Edit Academic Session
Edit Application Setting
Edit Building
Edit Class
Edit Course Credit Format
Edit Course Credit Formats
Edit Course Credit Type
Edit Course Credit Types
Edit Course Credit Unit
Edit Course Credit Units
Edit Course Offering
Edit Course Type
Edit Course Types
Edit Curriculum
Edit Date Pattern
Edit Default Manager Setting
Edit Department
Edit Designator
Edit Distribution Preference
Edit Distribution Type
Edit Event
Edit Event Date Mapping
Edit Event Date Mappings
Edit Event Status
Edit Event Statuses
Edit Examination
Edit Examination Distribution Preference
Edit Examination Period
Edit Examination Type
Edit Examination Types
Edit Instructional Type
Edit Instructor
Edit Instructor Attribute
Edit Instructor Attribute Type
Edit Instructor Attribute Types
Edit Instructor Role
Edit Instructor Roles
Edit Logging Level
Edit Logging Levels
Edit Manager Setting
Edit Offering Consent Type
Edit Offering Consent Types
Edit Permission
Edit Permissions
Edit Point In Time Data Snapshot
Edit Point In Time Data Snapshots
Edit Position Type
Edit Position Types
Edit Reservation
Edit Role
Edit Roles
Edit Room
Edit Room Availability
Edit Room Departments
Edit Room Event Availability
Edit Room Feature
Edit Room Feature Type
Edit Room Feature Types
Edit Room Features
Edit Room Group
Edit Room Groups
Edit Room Preference
Edit Room Type
Edit Scheduling Subpart
Edit Solver Configuration
Edit Solver Group
Edit Solver Parameter
Edit Solver Parameter Group
Edit Sponsoring Organization
Edit Standard Event Note
Edit Status Type
Edit Student Accommodation
Edit Student Accommodations
Edit Student Group
Edit Student Group Type
Edit Student Group Types
Edit Student Groups
Edit Student Scheduling Status Type
Edit Student Scheduling Status Types
Edit Subject Area
Edit Teaching Responsibilities
Edit Teaching Responsibility
Edit Time Pattern
Edit Timetable Manager
Edit User
Email
Enrollment Audit PDF Reports
Enrollments of Class or Course
Event Date Mappings
Event Detail
Event Reports
Event Room Availability
Event Room Selection
Event Schedule
Event Service Providers
Event Statuses
Event Timetable
Events
Exact Time Pattern
Exam Naming Convention
Exam Timetable
Examination Assignment
Examination Assignment Changes
Examination Conflict-Based Statistics
Examination Detail
Examination Distribution Preferences
Examination PDF Reports
Examination Periods
Examination Reports
Examination Schedule
Examination Solution Properties
Examination Solver
Examination Solver Log
Examination Solver Status
Examination Statuses
Examination Timetable
Examination Timetabling
Examination Types
Examinations
Exporting Solver XML
Frequently Asked Questions
Hibernate Statistics
Instructional Methods
Instructional Offering Configuration
Instructional Offering Cross Lists
Instructional Offering Detail
Instructional Offerings
Instructional Types
Instructor Assignment Preferences
Instructor Attribute Types
Instructor Attributes
Instructor Detail
Instructor Preferences
Instructor Roles
Instructor Scheduling
Instructor Scheduling Solver
Instructor Scheduling Solver Log
Instructors
LDAP Authentication / Lookup
Last Changes
Limit and Projection Snapshot
Localization
Logging Levels
Lookup Classes
Lookup Examinations
Main Page
Majors
Manage Instructor List
Manage Solvers
Manager Settings
Mass cancel...
Meetings
Minors
Multiple Class Setup
Not-Assigned Classes
Not-Assigned Examinations
Not-Assigned Teaching Requests
Offering Consent Types
Online Student Scheduling Dashboard
OpenStreetMap
Page Statistics
People
People Lookup
Permissions
Personal Examination Schedule
Personal Schedule
Personal Timetable
Point In Time Data Reports
Point In Time Data Snapshots
Position Types
PostgreSQL
Published Schedule Runs
Reservations
Roles
Roll Forward Banner Session
Roll Forward Session
Room Availability
Room Detail
Room Feature Types
Room Features
Room Groups
Room Schedule
Room Timetable
Room Types
Rooms
SVN
Saved Timetables
Scheduling Dashboard Filter
Scheduling Subpart Detail
Scripts
Select Academic Session
Select User Role
Send email...
Setup Examination Periods
Setup Teaching Requests
Solution Properties
Solution Reports
Solver
Solver Configurations
Solver Groups
Solver Load Balancing
Solver Log
Solver Parameter Groups
Solver Parameters
Solver Status
Solver Warnings
Sponsoring Organizations
Standard Event Notes
Status Types
Structure of Distribution Preferences
Student Accommodations
Student Advisors
Student Conflicts
Student Course Requests
Student Group Types
Student Groups
Student Luch Break
Student Scheduling Assistant
Student Scheduling Status Types
Student Sectioning Dashboard
Student Sectioning Reports
Student Sectioning Solution Properties
Student Sectioning Solver
Student Sectioning Solver Log
Subject Areas
Subject Schedule
Subject Timetable
Suggestions
Task Details
Task Scheduler
Teaching Assignment Changes
Teaching Assignment Detail
Teaching Assignments
Teaching Request Detail
Teaching Responsibilities
Test HQL
Time Patterns
Timetable
Timetable Managers
Timetables
Timetabling
Timetabling Benchmarks
Timetabling CVS Access
Timetabling Development using MyEclipse
Timetabling Development using NetBeans
Timetabling Installation FAQ
Tips and Tricks
Types of Distribution Preferences
UniTime 4.5 Online Documentation
UniTime Installation
Update Meetings
Users (Database Authentication)
 

Timetabling Installation FAQ


Q1: How to enable debug logging

To enable debug logging from UniTime, add the following lines to Tomcat/conf/catalina.properties

log4j.appender.unitimeLogFile=org.apache.log4j.DailyRollingFileAppender
log4j.appender.unitimeLogFile.File=${catalina.base}/logs/unitime-debug.log
log4j.appender.unitimeLogFile.DatePattern='.'yyyy-MM-dd
log4j.appender.unitimeLogFile.Append=true
log4j.appender.unitimeLogFile.layout=org.apache.log4j.PatternLayout
log4j.appender.unitimeLogFile.layout.ConversionPattern=[%-d{MM/dd/yy HH:mm:ss}] %-6p %c{1} -> %m%n
log4j.logger.org.unitime=DEBUG, unitimeLogFile
log4j.logger.net.sf.cpsolver=DEBUG, unitimeLogFile

After Tomcat is restarted, all UniTime related log messages will be written to Tomcat/logs/unitime-debug.log.

Q2: The session factory has not been initialized (or an error occurred during initialization).

The reason why session factory failed to initialize is usually listed in the tomcat log. It is located at Tomcat/logs/catalina.out, Tomcat/logs/stdout.log, or in Tomcat/logs/unitime-debug.log (if debug logging is enabled, see Q0 above).

If everything goes right, you should be able to see the following messages in the log:

[11/06/07 17:03:45] INFO logMessage -> ******* Initializing Timetabling Application : START *******
[11/06/07 17:03:45] INFO logMessage -> - Initializing Debugger ...
[11/06/07 17:03:45] INFO load -> Reading file:/Library/Tomcat/webapps/UniTime/WEB-INF/lib/timetable.jar!/application.properties ...
[11/06/07 17:03:45] INFO logMessage -> - Initializing Hibernate ...
[11/06/07 17:03:47] INFO ConnectionProviderFactory -> Initializing connection provider: org.unitime.commons.hibernate.connection.DBCPConnectionProvider
[11/06/07 17:03:47] INFO Dialect -> Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
[11/06/07 17:03:47] INFO TransactionFactoryFactory -> Using default transaction strategy (direct JDBC transactions)
[11/06/07 17:03:47] INFO TransactionManagerLookupFactory -> No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[11/06/07 17:03:47] INFO ASTQueryTranslatorFactory -> Using ASTQueryTranslatorFactory
[11/06/07 17:03:47] INFO SessionFactoryImpl -> building session factory
[11/06/07 17:03:48] INFO run -> InfoCache cleanup thread started.
[11/06/07 17:03:51] INFO SessionFactoryObjectFactory -> Not binding factory to JNDI, no JNDI name configured
[11/06/07 17:03:51] INFO UpdateTimestampsCache -> starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache
[11/06/07 17:03:51] INFO StandardQueryCache -> starting query cache at region: org.hibernate.cache.StandardQueryCache
[11/06/07 17:03:51] INFO logMessage -> - Initializing Solver Register ...
[11/06/07 17:03:51] INFO SolverRegisterService -> service started
[11/06/07 17:03:51] INFO logMessage -> ******* Timetabling Application : Initializing DONE *******

If not, please refer to the following FAQs and/or write us an email to support@unitime.org. Please, do not forget to attach the tomcat log.

Q3: Untrusted apps are not allowed to connect to or launch Window Server before login.

If you see the above message (or similar) in the tomcat log, the problem can be easily fixed by setting Java system property java.awt.headless to true. You can do this by adding the following line in Tomcat/conf/catalina.properties

java.awt.headless=true

prior to starting Tomcat.

Q4: Table APPLICATION_CONFIG or USERS not found.

On Lynux based systems, MySQL is case sensitive on table names by default. To change this, add the following line to the /etc/my.cnf file. This forces MySQL to translate all table names to lowercase before executing the statement.

lower_case_table_names=1


Q5: Access denied for user 'timetable'@'localhost'

Was the user timetable created? Was there any error/message printed during the creation of the timetable database (execution of file schema.sql)? Are you using the default password (unitime)?

You can verify some of that by checking the content of table mysql.user (there should be a line withuser=timetable). You can also try to connect to the database as timetable user using mysql tool with the following options (also trying to use the same port and protocol as the UniTime application):
 
mysql --user=timetable --password=unitime --port=3306 --host=localhost --protocol=TCP timetable

If the localhost as the host for the timetable user does not work, try 127.0.0.1 or without it (which usually creates % as host -- that should work as any host, but usually does not). Also, you should post "flush privileges" after any change to make sure MySQL authentication knows about it.

create user timetable@`127.0.0.1` identified by 'unitime';
grant all on timetable.* to timetable@`127.0.0.1`;
create user timetable dentified by 'unitime';
grant all on timetable.* to timetable;
flush privileges;

So, you would have the following three timetable users in the user table.

mysql> select user,host,password from mysql.user where user = 'timetable';
+-----------+-----------+-------------------------------------------+
user      | host      | password                                  |
+-----------+-----------+-------------------------------------------+
timetable | %         | *2E46E61A1C47ADC309CADC6DF8D89654F013D3DD |
timetable | localhost | *2E46E61A1C47ADC309CADC6DF8D89654F013D3DD |
timetable | 127.0.0.1 | *2E46E61A1C47ADC309CADC6DF8D89654F013D3DD |
+-----------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)

The host matching / restrictions is sometimes a pain with MySQL. The localhost usually works, however not 100%.

You may also need to check that MySQL allows for TCP/IP connections. TCP/IP connections are disabled when MySQL demon runs with skip-networking option.

Q6: Authentacation Failed

Is the table timetable.users populated? If there are no row, it is likely because you have not run blank-data.sql or woebegon-data.sql after running schema.sql during the installation.

Besides of this, there should be a line in timetable_manager table with external_uid column set to 1 (i.e., there is a timetabling manager associated with the user admin). There should be also a line in tmtbl_mgr_to_roles table linking the timetabling manager with an administrator role (roles table). Also, there should be a line in the sessions table.

Is there any error in the tomcat's log? If not, please enable JAAS debug logging by adding the following line in Tomcat/conf/catalina.properties

log4j.logger.org.unitime.timetable.authenticate.jaas=DEBUG

Now, when you try to login (after restarting tomcat), there should be some messages in the log showing that the correct authentication module is used (message " Performing db authentication ...") and explaining why the login failed.

There is a possibility that a password hash is computed differently due to a use of a different Java or operation system (we are using MD5 encoding provided by Java class java.security.MessageDigest). If the password is incorrect, there should be the following messages in the log (when JAAS debugging is enabled):

Performing db authentication ...
Db authentication failed ...
ERROR execute -> Login Failure: all modules ignored

In such a case, please generate a new password hash using solver/timetable.jar that is a part of the UniTime distribution (solver folder), i.e., execute:

java -cp solver/timetable.jar org.unitime.timetable.authenticate.jaas.DbAuthenticateModule admin

It just prints one string which is the hash of the given argument admin, in my case, it is "ISMvKXpXpadDiUoOSoAfww==". This string needs to be set as password in the users table, i.e.,

update timetable.users set password='ISMvKXpXpadDiUoOSoAfww==' where username='admin';
commit;

Q7: Not enough resources to create a solver instance, please try again later.

You need to increase the memory limit for the tomcat (in order to prevent OutOfMemory exceptions, solver refuses to start unless there are 200MB available, which is an estimated size for solving of a problem with about 1000 classes). To increase the memory limit, you can for instance add -Xmx512m to JAVA_OPTS environmental variable before starting tomcat (this will allow tomcat to allocate up to 512MB of memory, default is 64MB):

On Unix/Linux/MacOS:

export JAVA_OPTS="${JAVA_OPTS} -Xmx512m"

On windows:

set JAVA_OPTS=%JAVA_OPTS% -Xmx512m

Alternatively, the limit on variable memory can be changed by setting the application property tmtbl.solver.mem_limit. This can be done using JAVA_OPTS environment variable before starting tomcat:

On Unix/Linix/MacOS:

export JAVA_OPTS="${JAVA_OPTS} -Dtmtbl.solver.mem_limit=50"

On Windows:

set JAVA_OPTS=%JAVA_OPTS% -Dtmtbl.solver.mem_limit=50

Or by adding the line in Tomcat/conf/catalina.properties

tmtbl.solver.mem_limit=50

This limit is megabytes, it is applicable only on the tomcat side, the same limit is used for all solver servers.

Q8: Error during query: Unexpected Exception: java.io.CharConversionException message given: null

This problem is discussed in this MySQL forum thread http://forums.mysql.com/read.php?39,142452,142452 where some potential solutions are listed as well.

In most cases the problem seemed to be resolved by using a newer version of Java (e.g., java 1.5 instead of some 1.4.x).

Other solution seems to be to set default-character-set variable to utf8 in mysql configuration (usually located at /etc/my.cnf, both mysqld and client sections):

[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8

The mysql will use utf8 after it is restarted.

Q9: Unable to configure hibernate, reason: Connection refused: connect OR No route to host

Such an exception is thrown when Hibernate (the tool we us for communicating with the database) is not able to validate the configuration XML files, with the DTD that is available online at http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd. Basically, it was unable to download this hibernate-configuration-3.0.dtd file.

Do you have an internet connection and can you access this url (i.e., http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd)?

If so, try to restart tomcat again. Occasionally it fails to get this file because of some timeout etc.

If not, there are the following two workarounds:

1. Disconnect all your networks, then start tomcat, then you can connect them back. If there is no connection, hibernate does not try to validate the given configuration (but it will still load it). Your need to have your database installed on the same machine as the tomcat though.

2. Remove the following lines from hibernate.cfg.xml (2nd – 4th line)

<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >

This file is located in the file timetable.jar, that is located in UniTime.war (in folder WEB-INF/lib). Both files (UniTime.war, timetable.jar) can unzipped/zipped using ZIP (e.g., WinZip).

Alternatively, you can go to Tomcat/webapps and:
    • Delete UniTime.war (it should be already unzipped into Tomcat/webapps/UniTime)
    • Create folder classes under Tomcat/webapps/UniTime/WEB-INF
    • Unzip all content of Tomcat/webapps/UniTime/WEB-INF/lib/timetable.jar into the new classes folder (Tomcat/webapps/UniTime/WEB-INF/classes)
    • Delete timetable.jar (files from the folder classes will be used instead)
    • Edit file classes/hibernate.cfg.xml, delete the above three lines
    • Start tomcat

Q10: ClassNotFoundException: com.mysql.jdbc.Driver

The "ClassNotFoundException: com.mysql.jdbc.Driver" indicates that the MySQL JDBC driver was not found. You can download the driver from http://dev.mysql.com/downloads/connector/j/. It needs to be unzipped and placed in the Tomcat's lib folder (something like C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib\ on Windows or /var/lib/tomcat7/lib on Linux). The driver file is named something like mysql-connector-java-5.1.36.jar.

If putting the driver in Tomcat/lib does not work, you can try to put it in Tomcat/webapps/UniTime/WEB-INF/lib folder instead.

You will need to restart the Tomcat afterward.

Updated on Srp 12, 2016 by Tomáš Müller (Version 1)