OLAT : defaultcharset=UTF-8

186 views
Skip to first unread message

Vivek Loke

unread,
Jun 17, 2014, 12:10:58 PM6/17/14
to open...@googlegroups.com
Hi,
 
Please suggest.
 
We found some below changes inside 9.4 version.
 
# abort system startup when no UTF-8 capable file system is detected. In production this should be set to
# true to prevent accidental startup with another encoding which leads to a big data mess
enforce.utf8.filesystem=true
 
we got the below error once I run the setup please need suggest your inputs on same.
 
 
 
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.olat.core.util.WebappHelper' defined in class path resource [org/olat/core/util/_spring/utilCorecontext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanInitializationException: System startup aborted to to file system missconfiguration. See previous warnings in logfile and fix your Java environment. This check can be disabled by setting enforce.utf8.filesystem=false, but be aware that the decision to use a certain encoding on the filesystem is a one-time decision. You can not cange to UTF-8 later!
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:286)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:922)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
 at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
 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: org.springframework.beans.factory.BeanInitializationException: System startup aborted to to file system missconfiguration. See previous warnings in logfile and fix your Java environment. This check can be disabled by setting enforce.utf8.filesystem=false, but be aware that the decision to use a certain encoding on the filesystem is a one-time decision. You can not cange to UTF-8 later!
 at org.olat.core.util.WebappHelper.testUtf8FileSystem(WebappHelper.java:454)
 at org.olat.core.util.WebappHelper.init(WebappHelper.java:138)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1638)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1579)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
 ... 26 more
Jun 17, 2014 9:37:04 PM org.apache.catalina.core.ApplicationContext log
 
 
 
Regards,
Vivek.
 
 
 

Florian Gnägi

unread,
Jun 18, 2014, 2:22:49 PM6/18/14
to open...@googlegroups.com
Hi Vivek

The configuration makes sure that the system only boots when the filesystem is properly configured and runs in an UTF-8 environment. In case you don't want this, you have to set this flag to false. 

In your case you are starting tomcat in a way that the java environment is not set to UTF-8. This is not necessarily a problem, however if you want to support all kind of languages (e.g. non-ASCII and non-ISO-Latin characters, you really should run OpenOLAT with a UTF-8 file system. Setting the encoding can be tricky and depends on your operating system. Look up your operating system manual how to do this and which variable you have to set to correctly set the environment for the java virtual machine. It is not possible to set the encoding from within Java, you have to set it in your operating system environment.

Note that you can not change the encoding if you already have data. In that case all the filenames in olatdata need to be converted from the old to the new encoding. On Linux you could use the program iconv to do this. 

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 
--------------------------------------------------------------------



Reply all
Reply to author
Forward
0 new messages