cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't I store content properties in local languages?

erangaj
Champ in-the-making
Champ in-the-making
Hi,

I am using alfresco with tomcat & MySQL.

I tried to enter some Sinhala Unicode characters as content properties. (eg. Author). But alfresco stored ??????? instead of the Unicode characters. I observed the same issue for Tamil and Hindi Unicode characters. Why can't I store content properties in local languages? Please help me.

Thanks & Regards,
Eranga
8 REPLIES 8

bgl
Champ on-the-rise
Champ on-the-rise
Hi,

I think it is rather a java problem than an Alfresco one. Did you convert your property file using the native2ascii binary supplied with jdk ?

I use this for converting french characters: first I write a resource-fr_FR.properties.src that contains my messages with french characters. Then I run the native2ascii on this file to produce the final file resource-fr_FR.properties which is then used by the application.

Hope this helps.

erangaj
Champ in-the-making
Champ in-the-making
Hi bgl

Thanks for the reply.

I just entered Unicode characters to text box of "edit properties" form. I haven't localized any labels. Labels are in English. But I couldn't enter text in local languages.

It can be a Alfresco issue or MySQL issue or Tomcat issue or Java issue or Ubuntu issue. :-(. No idea.

-eranga

bgl
Champ on-the-rise
Champ on-the-rise
I misunderstood your question I think. I thought you were supplying resources for label or something like this but I didn't understand it was related to stuff stored in database.

Did you check the encoding of your database ? may be it is not relevant. Usually it is running for storing UTF-8 characters. If you want to store characters that cannot be encoded with UTF-8, then you will get in trouble. I'm running on a postgres db with no problem. I use french characters.

It can be a track…

duxtinto
Champ in-the-making
Champ in-the-making
Hi,

I'm evaluating Alfresco software for our offices in China.
I have the same problem as erangaj, but in my case is when I try to upload a file with the name in 'unicode Simplified Chinese'.

I'm trying to explain it as clear as possible.

My testing configuration: Open Suse 10.2 + Alfresco Community 2.1 + Tomcat + MySql.   All of them in default configuration.

When I try to 'add Content' with a file with the tittle in chinese:

At the 1st window, when i need to select the file, all is ok.

[img]http://farm2.static.flickr.com/1070/1440022597_2e729fbfb8.jpg?v=0[/img]

After I clicked the 'Upload' button, the proccess seems to be ok, as you can see en the next picture:

[img]http://farm2.static.flickr.com/1328/1440022751_085ebd8515.jpg?v=0[/img]

I think the problem happens when the system store the properties of the file. In the next window ('Modify Content Properties') you can see that the name of the file is not the correct chinese name:

[img]http://farm2.static.flickr.com/1406/1440022831_60541ce846.jpg?v=0[/img]

and there is a new error in the alfresco.log:

05:17:01,414 ERROR [org.alfresco.repo.node.integrity.IntegrityChecker] Found 1 integrity violations:
Invalid property value:
   Node: archive://SpacesStore/400e9634-4919-11dc-af06-5b13947b97f2
   Type: {http://www.alfresco.org/model/content/1.0}content
   Property: {http://www.alfresco.org/model/content/1.0}name
   Constraint: Value 'ni ??.TXT' matches regular expression: (.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)

If I open the folder which contains the new file, I can see the new content, with its wrong name:

[img]http://farm2.static.flickr.com/1428/1440884000_6ddc6a1df0.jpg?v=0[/img]

Aggravating the situation, if i try to delete the problematic file, I get an error screen with the text 'Unable to delete File due to system error:',

[img]http://farm2.static.flickr.com/1204/1440884118_f953524178.jpg?v=0[/img]

and in the log appears a new error.

05:17:01,510 ERROR [org.alfresco.web.ui.common.Utils] Unable to delete File due to system error:
org.alfresco.error.AlfrescoRuntimeException: Unknown Exception in Transaction.
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:292)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:124)
   at org.alfresco.web.bean.dialog.DialogManager.finish(DialogManager.java:347)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.transaction.RollbackException: Transaction didn't commit: Integrity failure
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:430)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:239)
   … 33 more
Caused by: org.alfresco.repo.node.integrity.IntegrityException: Integrity failure
   at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:626)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.flush(AlfrescoTransactionSupport.java:559)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:630)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:48)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:821)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:637)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:624)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:307)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:420)
   … 34 more

Could anybody help me?
have anybody ever lived any similar situation?
erangaj, how did you solve your problem?

Thanks.

steve
Champ in-the-making
Champ in-the-making
Hi,

Have you set up your databases to allow storage of Unicode chars - if you use MySQL this is not the default!
Modify your my.ini or my.cnf like:

[mysql]

default-character-set=utf8


[mysqld]

default-character-set=utf8


Then restart MySQL.
(Note, you may have to drop and recreate the Alfresco catalog for MySQL to apply these changes to the Alfresco tables)

Steve

duxtinto
Champ in-the-making
Champ in-the-making
thant you very much, Steve.

That solved my problem.

yahoon
Champ in-the-making
Champ in-the-making
HI Steve

I am a chinese , has a similar problem with duxtinto .
I installed alfresco-community-tomcat-2.1.0.tar.gz on my linux box.
when installing alfresco ,I modified db_setup.sql for creating the db with utf-8.here is :
create database alfresco DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;

the problem is :
when I create a conten ,making a chinese string as the name of the content, encoding I choose utf-8 ,when I complete,the chinese name of the content shows  "??",but the chinese content of it keeps well.
also I cannot delete it ,the log shows
16:22:00,420 ERROR [node.integrity.IntegrityChecker] Found 1 integrity violations:
Invalid property value:
   Node: archive://SpacesStore/cf057f83-a241-11dc-933c-3df0bbd782f2
   Type: {http://www.alfresco.org/model/content/1.0}content
   Property: {http://www.alfresco.org/model/content/1.0}name
   Constraint: Value '???' matches regular expression: (.*[\"\*\\\>\<\?\/\:\|]+.*)|(.*[\.]?.*[\.]+$)|(.*[ ]+$)
16:22:00,473 ERROR [ui.common.Utils] Unable to delete File due to system error:

I can't modified the my.cnf to change mysql globally which you indicated in this topic ,because there are serveral applications running on it.I am afraid it will broke them.
so is there any thing I can do with the alfresco database or alfresco program without affecting my other application's database?

andy
Champ on-the-rise
Champ on-the-rise
Hi

There is a constraint on the values that can be used for cm:name defined in the model. You need to modify this constraint.

Andy