Unknown table 'olat.o_stat_temptable' while runing the OLAT Application

33 views
Skip to first unread message

abdulkh...@gmail.com

unread,
Sep 17, 2014, 3:52:19 AM9/17/14
to open...@googlegroups.com
When we run the olat application, after the server is on non-activity mode i.e. when users are not acessing the application .
It always shows the below error.
 
Related to Unknown table 'olat.o_stat_temptable'
 
I had seen the code and database folder there were noscripts related to  table o_stat_temptable.
Please let me know how to fix this...
 
 
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [drop table o_stat_temptable;]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'olat.o_stat_temptable'
 at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:95)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
 at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:428)
 at org.olat.course.statistic.MySQLTempStatTableDropper.updateStatistic(MySQLTempStatTableDropper.java:62)
 at org.olat.course.statistic.StatisticUpdateManagerImpl$1.run(StatisticUpdateManagerImpl.java:161)
 at org.olat.core.commons.services.taskexecutor.model.DBSecureRunnable.run(DBSecureRunnable.java:42)
 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
 

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'olat.o_stat_temptable'
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
 at com.mysql.jdbc.Util.getInstance(Util.java:386)
 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2812)
 at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2761)
 at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894)
 at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732)
 at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
 at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
 at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)
 at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
 ... 10 more

Stéphane Rossé

unread,
Sep 24, 2014, 2:54:44 AM9/24/14
to open...@googlegroups.com, abdulkh...@gmail.com
Hi

You can safely ignore the error. You must only check that OpenOLAT can create the o_stat_temptable table on your database.

The course statistics will try drop this table, than create it, use it to generate the statistics and drop it. If it can drop it (which it's generally the case as it is drop at the end of the process), it will print the stack trace ( for an unknown reason on System.out and not in the log files).

Best regards
Stéphane Rossé

---------------------------------------------------------------
professional services for the open source eLearning system OLAT
hosting - operating - support - java development - consulting
---------------------------------------------------------------
http://www.frentix.com | http://www.olat.com | http://openolat.org

frentix  GmbH
Stéphane Rossé
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

tel://+41-43-544-9000
skype://s_rosse
---------------------------------------------------------------

bellammal...@gmail.com

unread,
Oct 31, 2014, 10:59:11 AM10/31/14
to open...@googlegroups.com, abdulkh...@gmail.com
Hi,

Can we comment this MySQLTempStatTableCreator.java from openolat application. Please let us know whether there was any impact if we do this comment.

while doing replication of database i found the error.



Error 'Table 'test.o_stat_temptable' doesn't exist' on query. Default database: 'test'. Query: 'insert into o_stat_hourofday (businesspath,resid,hour,value)
select
delta.businesspath, delta.resid, delta.hour, delta.cnt
from
(select
businesspath,
substr(businesspath,locate(':',businesspath)+1,locate(']',businesspath)-locate(':',businesspath)-1) resid,
hour(creationdate) hour,
count(*) cnt
from o_stat_temptable group by businesspath,hour) delta
left join o_stat_hourofday old on delta.businesspath=old.businesspath and delta.hour=old.hour
where old.businesspath is null'


Florian Gnägi

unread,
Nov 3, 2014, 1:45:41 AM11/3/14
to open...@googlegroups.com
Hi

The problem is most likely caused by wrong MySQL settings. Make sure your default settings for language and collation is set correctly on every single table and in the default settings. When collation does not match you get this kind of error. 

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOLAT".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOLAT - infinite learning - http://www.openolat.org

---
You received this message because you are subscribed to the Google Groups "OpenOLAT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------
professional services for the e-learning system OpenOLAT and OLATpro
 hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------

frentix  GmbH
Florian Gnägi, Geschäftsführer
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

skype:gnaegi  twitter:gnaegi  xing:Florian_Gnaegi 
--------------------------------------------------------------------















abdulkh...@gmail.com

unread,
Nov 3, 2014, 1:53:51 AM11/3/14
to open...@googlegroups.com
Hi,
 
if i comment the Java file then there is any impact? .. Please let us know.
 
Regards
Abdul Khaleem
...

Florian Gnägi

unread,
Nov 3, 2014, 2:10:36 AM11/3/14
to open...@googlegroups.com
Of course, the statistics won’t work properly when you just disable code. Generally we don’t write code that does nothing, so disabling code always has an impact. If you need the said statistics - well this is entirely up to you. 

Use the debugger and step through the code to learn more about how things work there. 

Cheers
Florian

--------------------------------------------------------------------
Hardturmstrasse 76
CH-8005 Zürich, Switzerland

abdulkh...@gmail.com

unread,
Nov 3, 2014, 2:21:31 AM11/3/14
to open...@googlegroups.com
This statistics link where it comes ion openolat. Let me know . so that we will see whether it is needed or not.
Florian

--------------------------------------------------------------------
<span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0p
...
Reply all
Reply to author
Forward
0 new messages