67.4k views
by (600 points)

Steps to install open source kaldin examination software

1. Installation using Yum repository
2. Installation using rpm installable
3. Windows Installation
4. Tomcat application installation and configuration

1. Installation using Yum repository

1. yum repository: http://www.kaldin.com/rpm/noarch/
2. Edit or create new file in /etc/yum.repos.d/ with name "kaldin.repo"
3. Add following lines to kaldin.repo.
 

[Kaldin]
 name=Kaldin | online examination software repository
 baseurl=http://downloads.kaldin.com/rpm
 enabled=1
 gpcheck=0

4. Install kaldin with yum repository
 

#yum install kaldin
 

2. Installation using rpm installable
 

1) Download latest RPM from  http://www.kaldin.com/rpm/noarch/ & install it with RPM command.

  # rpm -ivh path-to-kaldinrpm
 

3. Windows Installation

Please refer windows installation to use Kaldin on windows box.

4. Tomcat application installation and configuration

Please refer Tomcat war installation for advance installation

        

12 Answers

0 votes
by (600 points)
Please follow below instructions to install kaldin.

Download latest war/zip from http://sourceforge.net/projects/kaldin/

Copy downloaded war in tomcat's webapp directory and then start tomcat.

Once tomcat starts sucessfully. Open below link in your browser.
http://localhost:tomcat_port/kaldin/

If everything is gone smoothly it will show you installation page.

Fill the details of your database name, host, user & password. Please make sure database details are valid.

If given database is not exists it will create new database with the same and if database with same name exists in mysql it will override database.

Once installation finished. It will redirect you to kaldin home page.
by (440 points)

I was struggling to get it pass through the installation step. Spent around three days to get it but no way.

(1) I gave full permission (777),

(2) created context.xml

(3) Created the MySQL DB and imported two sql files without any issue

(4) Tried RPM installation method (Note that rpm installs without any issue), but cant pass through kaldin install via http://127.0.0.1-8080/kaldin/

(5) It simply creates a DB and  inserts all the content and then fails

(6) Same thing with full included pack

(7) Same thing with war file as well

================================This was the error

HTTP Status 500 -
type Exception report
message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: java.io.IOException: Permission denied
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:418)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.kaldin.common.util.UserSessionFilter.doFilter(UserSessionFilter.java:128)
    com.kaldin.company.filter.CompanyFilter.doFilter(CompanyFilter.java:49) root cause


    java.io.IOException: Permission denied
    java.io.UnixFileSystem.createFileExclusively(Native Method)
    java.io.File.createNewFile(File.java:900)
    org.apache.jsp.install.insert_jsp._jspService(insert_jsp.java:196)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    com.kaldin.common.util.UserSessionFilter.doFilter(UserSessionFilter.java:128)
    com.kaldin.company.filter.CompanyFilter.doFilter(CompanyFilter.java:49)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.35 logs.

Apache Tomcat/6.0.35
======================================


Yooo!!!

I solved it for myself after three days(Bundle installation did not work though).

(1) Ubuntu 12.04.2 (32bit): Selected LAMP, TOMCATServer during the installation
Note: I tried it on CentOS-6.3_x64 and Ubuntu-12.04.2_x64 without luck. it seems there are compatibility issues with "glibc" and throws an error related to/as java file not found
(2) apt-get update && apt-get install -y tomcat6
(3) chown -R tomcat6:tomcat6 /usr/share/tomcat6
(4) chown -R tomcat6:tomcat6 /var/lib/tomcat6
(5) service tomcat6 restart
and it allowed me to pass through installation steps. It also has created its own DB, a "kaldin.properties" file under "/usr/share/tomcat6/" (but still no "context.xml" under "/var/lib/tomcat6/webapps/kaldin/META-INF/"). Well good going.
Here is the format of "kaldin.properties" if anyone need it. Please modify its DB, User & Password.


Copy and save it under "/usr/share/tomcat6/" and restart tomcat

===========================Copy the below content,
mdburl=jdbc\:mysql\://localhost\:3306/
mdbpassword=mBR3nZxAwdJRTV2a
mdbuser=kaldin
mdbname=kaldin
===========================
Thanks for the great project.
        

0 votes
by (440 points)
I am preparing a shell script to automate the installation. Give me a week, will share the same. Thanks.
0 votes
by (600 points)
Thanks for pointing out installation issues.
Please post the script to automate the installation and we'll try to bundle the same with standard download on sourceforge.
Thank you.
        
0 votes
by (440 points)
I am ready with the automated Kaldin Installer shell script for Debian7.0.0_x64 but I can't post it here due to markup issues. So is there a way to attach the file?
        
0 votes
by (440 points)
Ok,
Got an alternative.
Please README for automated installer on to debian
        
by (440 points)

Kaldin is failing to communicate to DB after sometime from last restart. There is no problem with the MySQL as I am able to login through terminal and also I have webmin, phpmyadmin which are working very well connecting to the MySQL. The problem with Kaldin. I have the tomcat7 logs as shown below.
This issue can not be resolved by restarting MySQL server, please don't waste time restarting it.
But this issue can temporarily be resolved by restarting Tomcat server.

This exception is something that needs to be corrected in the Kaldin code as mentioned

(1) here.

(2) Here: JDBC Driver incompatibility
----------------------------------------------------------------------------------------------------------------

I have used Kaldin-1.8, Tomcat7,
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

libtomcat7-java                               
tomcat7                                       
tomcat7-common                                

libdbd-mysql-perl                             
libmysqlclient18:amd64                        
mysql-client-5.5                              
mysql-common                                 
mysql-server                                  
mysql-server-5.5                              
mysql-server-core-5.5                        
php5-mysql                                    

Exception:
----------------------------------------------------------------------------------------------------------------
 BEGIN NESTED EXCEPTION  
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
MESSAGE: The last packet successfully received from the server was66818 milliseconds ago.The last packet sent successfully to the server was 66818 milliseconds ago, which  is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

STACKTRACE:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was66818 milliseconds ago.The last packet sent successfully to the server was 66818 milliseconds ago, which  is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3270)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1932)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
    at org.hibernate.loader.Loader.doQuery(Loader.java:697)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    at org.hibernate.loader.Loader.doList(Loader.java:2228)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
    at org.hibernate.loader.Loader.list(Loader.java:2120)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    at com.kaldin.user.login.hibernate.LoginHibernate.login(LoginHibernate.java:75)
    at com.kaldin.user.login.dao.impl.LoginImplementor.login(LoginImplementor.java:14)
    at com.kaldin.user.login.action.LoginAction.execute(LoginAction.java:117)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio

0 votes
by (140 points)
@ Girish, I need help with the installing Kaldin, I tried all the steps in your post  12 Jun, 10:05

Created a separate mysql user for kaldin
Copied mysql connection xxx .jar to /usr/share/tomcat6/lib
Deployed the war file with context.xml and Web.xml updated as per how-to-configure-tomcat-6-0-with-mysql
Did chown -R on both folders
Rendered the first form filling page of Kaldin
But after filling and submitting the form it is getting redirected to the login page and says Invalid login
Now if I copy the kaldin.properties file to /usr/share/tomcat6 the same problem is occurring

If I try without context.xml file it gets directed to dashboard but no value is fetched from the database.
Please do help Cyril
0 votes
by (600 points)

Hi Cyril,

Please provide a full stracktrace here, It will help us to identify this issue.

3. Deployed the war file with context.xml and Web.xml updated as per how-to-configure-tomcat-6-0-with-mysql

Kaldin installation doesn't need any changes in context.xml & web.xml. Please revert the changes from these files. Please refer the below steps to clean & reinstall kaldin

  • Stop the tomcat & Delete all kaldin files from webapps.
  • Delete kaldin.properties file from /usr/share/tomcat6. Also remove the compiled kaldin's jsp's from /usr/share/tomcat6/work/Catalina.
  • You need to copy mysql-connector-.X.X.jar to /usr/lib/tomcat6/lib/.
  • copy kaldin.war file to the webapps again & start tomcat. (keep web.xml & context.xml as it is)
  • Open http://your-ip-address:8080/kaldin in browser.
  • After form filling it will generate kaldin.properties in home folder & redirect you to dashboard.

Please send us stacktrace if you are still persisting this issue.

Thanks & regards
        

0 votes
by (440 points)
I am working on the updated installer script which installs and configures kaldin automatically. Please give me few days. Thanks.
-Girish KG
        
0 votes
by (440 points)
For all Kaldin users,
I have updated the installer script to the latest version. Please visit **Kaldin On GitHub **
Some Improvements:
-Complete unattended installation
-Added prompt for Server FQDN
-Girish KG
        
0 votes
by (800 points)

Kaldin New Version 2.2 is released.

Click here to download the latest version

Database Upgrade Script For 2.2
http://help.kaldin.com/faq/content/14/177/en/upgrade-database-version-form-kaldin-21-to-kaldin-22.html


Whats new in 2.2?
http://help.kaldin.com/faq/content/28/178/en/what_s-new-with-kaldin-22.html

asked May 31, 2014 by (140 points) com.mysql.jdbc.exceptions

Categories

...