Uploaded image for project: 'PUBLIC - Liferay Sync'
  1. PUBLIC - Liferay Sync
  2. SYNC-961

Quotes in site name breaks synchronization

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.10 GA4
    • Fix Version/s: 1.1.0 B1
    • Component/s: General
    • Labels:
    • Environment:
      Liferay 6.1.1 CE GA2 bundled with Tomcat 7.0.27, CentOS 2.6.32-358.6.2.el6.x86_64, Liferay Sync 1.0.10-beta (4/18/13)

      Description

      Renaming of the file or folder under the site with an apostrophe in the name throws exceptions to Liferay Sync log and in some cases to application server log and partly breaks synchronization for the given directory. Upload of file from local computer file system is not being uploaded to Liferay file repository.

      Steps to reproduce:
      1) Set up clean Liferay portal (with default file repository) and create new site with an apostrophe in the name (e.g.: profiq's portal).
      2) Create directory called "testcase1" via Liferay web interface Documents and Media portlet.
      3) Set up Liferay Sync tool.
      4) Rename synchronized directory "testcase1" to "testcase1x". Check that it's correctly renamed on Liferay server
      5) Folder is correctly renamed in both location, local computer and liferay server.
      6) Check application logs of Liferay Sync tool at ~/.liferay-sync/logs/liferay-sync.log and application server log for errors.
      Logs are pasted below

      From this moment synchronization isn't working correctly when I try to create file in the local computer file system. Upload to Liferay fails.
      1) Create file in Liferay's web interface in folder "testcase1x" --> file is correctly synchronized and downloaded to local computer file system
      2) Create file in local computer file system in folder "testcase1x" --> file isn't uploaded to Liferay (until I restart liferay sync tool)

      Restart of Liferay Sync tool fixes this issue. So whenever user changes folder name and tries to upload file, he needs to restart Liferay Sync tool.

      Number and type of exceptions depends on content of the renamed folder. Different scenarios are described below.

      -------------------------
      First test scenario: Below exception is for case (described above) when user tries to create file in local file system in empty folder and upload of the file fails:
      liferay sync log:
      01 Jul 2013 13:04:02,209 DEBUG [LocalFileEventProcessor:640] Done processing events
      01 Jul 2013 13:04:02,218 DEBUG [FileEventHandler:75] RENAME /home/janhaj/liferay-sync/profiq's portal/testcase1 -> /home/janhaj/liferay-sync/profiq's portal/testcase1a
      01 Jul 2013 13:04:02,232 ERROR [FileModelManager:470] Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE1', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase1a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase1', '/home/janhaj/liferay-sync/profiq's portal/testcase1a') WHERE `filePath` LIKE ? [42001-170]
      org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE1', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase1a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase1', '/home/janhaj/liferay-sync/profiq's portal/testcase1a') WHERE `filePath` LIKE ? [42001-170]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.getSyntaxError(DbException.java:194)
      at org.h2.command.Parser.getSyntaxError(Parser.java:490)
      at org.h2.command.Parser.read(Parser.java:2797)
      at org.h2.command.Parser.readFunction(Parser.java:2300)
      at org.h2.command.Parser.readTerm(Parser.java:2475)
      at org.h2.command.Parser.readFactor(Parser.java:2045)
      at org.h2.command.Parser.readSum(Parser.java:2032)
      at org.h2.command.Parser.readConcat(Parser.java:2005)
      at org.h2.command.Parser.readCondition(Parser.java:1870)
      at org.h2.command.Parser.readAnd(Parser.java:1851)
      at org.h2.command.Parser.readExpression(Parser.java:1843)
      at org.h2.command.Parser.parseUpdate(Parser.java:694)
      at org.h2.command.Parser.parsePrepared(Parser.java:426)
      at org.h2.command.Parser.parse(Parser.java:278)
      at org.h2.command.Parser.parse(Parser.java:254)
      at org.h2.command.Parser.prepareCommand(Parser.java:217)
      at org.h2.engine.Session.prepareLocal(Session.java:414)
      at org.h2.engine.Session.prepareCommand(Session.java:363)
      at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
      at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
      at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:629)
      at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:129)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:50)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:40)
      at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:422)
      at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:376)
      at com.j256.ormlite.stmt.UpdateBuilder.update(UpdateBuilder.java:117)
      at com.liferay.sync.modules.documentlibrary.server.manager.database.dao.FileModelDao.updateFilePath(FileModelDao.java:309)
      at com.liferay.sync.modules.documentlibrary.server.manager.FileModelManager.handleLocalFileRename(FileModelManager.java:466)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler._handleEvent(FileEventHandler.java:101)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler.fileRenamed(FileEventHandler.java:77)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor._fireEvents(LocalFileEventProcessor.java:239)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor.run(LocalFileEventProcessor.java:139)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)

      application server log:
      no message

      ================================================================================
      ================================================================================
      ================================================================================
      Second test scenario: When user changes folder name with existing files already present in the folder.
      1) Create folder "testcase2" and upload "test document" via web interface into this folder.
      2) Rename "testcase2" to "testcase2a" via Liferay Sync directory.

      From this moment synchronization isn't working correctly.
      1) Create file in web interface in folder "testcase2a" --> file is correctly synchronized
      2) Create file in local computer in folder "testcase2a" --> file isn't uploaded

      Restart of Liferay Sync tool fix this issue until next rename folder in this scenario. Unfortunately exceptions about missing parent folder occurs every 5 seconds (shown bellow).

      liferay sync log:
      01 Jul 2013 13:08:16,020 DEBUG [LocalFileEventProcessor:640] Done processing events
      01 Jul 2013 13:08:16,083 DEBUG [FileEventHandler:75] RENAME /home/janhaj/liferay-sync/profiq's portal/testcase2 -> /home/janhaj/liferay-sync/profiq's portal/testcase2a
      01 Jul 2013 13:08:16,138 ERROR [FileModelManager:470] Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE2', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase2a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase2', '/home/janhaj/liferay-sync/profiq's portal/testcase2a') WHERE `filePath` LIKE ? [42001-170]
      org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE2', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase2a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase2', '/home/janhaj/liferay-sync/profiq's portal/testcase2a') WHERE `filePath` LIKE ? [42001-170]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.getSyntaxError(DbException.java:194)
      at org.h2.command.Parser.getSyntaxError(Parser.java:490)
      at org.h2.command.Parser.read(Parser.java:2797)
      at org.h2.command.Parser.readFunction(Parser.java:2300)
      at org.h2.command.Parser.readTerm(Parser.java:2475)
      at org.h2.command.Parser.readFactor(Parser.java:2045)
      at org.h2.command.Parser.readSum(Parser.java:2032)
      at org.h2.command.Parser.readConcat(Parser.java:2005)
      at org.h2.command.Parser.readCondition(Parser.java:1870)
      at org.h2.command.Parser.readAnd(Parser.java:1851)
      at org.h2.command.Parser.readExpression(Parser.java:1843)
      at org.h2.command.Parser.parseUpdate(Parser.java:694)
      at org.h2.command.Parser.parsePrepared(Parser.java:426)
      at org.h2.command.Parser.parse(Parser.java:278)
      at org.h2.command.Parser.parse(Parser.java:254)
      at org.h2.command.Parser.prepareCommand(Parser.java:217)
      at org.h2.engine.Session.prepareLocal(Session.java:414)
      at org.h2.engine.Session.prepareCommand(Session.java:363)
      at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
      at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
      at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:629)
      at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:129)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:50)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:40)
      at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:422)
      at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:376)
      at com.j256.ormlite.stmt.UpdateBuilder.update(UpdateBuilder.java:117)
      at com.liferay.sync.modules.documentlibrary.server.manager.database.dao.FileModelDao.updateFilePath(FileModelDao.java:309)
      at com.liferay.sync.modules.documentlibrary.server.manager.FileModelManager.handleLocalFileRename(FileModelManager.java:466)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler._handleEvent(FileEventHandler.java:101)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler.fileRenamed(FileEventHandler.java:77)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor._fireEvents(LocalFileEventProcessor.java:239)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor.run(LocalFileEventProcessor.java:139)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      01 Jul 2013 13:08:16,637 DEBUG [UploadFileEvent:249] Received exception response /home/janhaj/liferay-sync/profiq's portal/testcase2a/test document
      01 Jul 2013 13:08:19,046 DEBUG [GetDLSyncUpdateEvent:436] Renaming /home/janhaj/liferay-sync/profiq's portal/testcase2/test document -> /home/janhaj/liferay-sync/profiq's portal/testcase2a/test document
      01 Jul 2013 13:08:19,050 DEBUG [GetDLSyncUpdateEvent:445] Old Parent doesn't exist
      01 Jul 2013 13:08:19,050 ERROR [GetDLSyncUpdateEvent:182] Repeating dlSync Parent folder missing.
      01 Jul 2013 13:08:19,052 ERROR [GetDLSyncUpdateEvent:184] Parent folder missing.
      com.liferay.sync.modules.documentlibrary.server.remote.event.DLSyncUpdateException: Parent folder missing.
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent._handleRename(GetDLSyncUpdateEvent.java:452)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent._handleFile(GetDLSyncUpdateEvent.java:276)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent.handleResponse(GetDLSyncUpdateEvent.java:164)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.BaseEvent.executeRequest(BaseEvent.java:238)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.BaseEvent.run(BaseEvent.java:95)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      01 Jul 2013 13:08:23,963 DEBUG [GetDLSyncUpdateEvent:436] Renaming /home/janhaj/liferay-sync/profiq's portal/testcase2/test document -> /home/janhaj/liferay-sync/profiq's portal/testcase2a/test document
      01 Jul 2013 13:08:23,968 DEBUG [GetDLSyncUpdateEvent:445] Old Parent doesn't exist
      01 Jul 2013 13:08:23,974 ERROR [GetDLSyncUpdateEvent:182] Repeating dlSync Parent folder missing.
      01 Jul 2013 13:08:23,976 ERROR [GetDLSyncUpdateEvent:184] Parent folder missing.
      com.liferay.sync.modules.documentlibrary.server.remote.event.DLSyncUpdateException: Parent folder missing.
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent._handleRename(GetDLSyncUpdateEvent.java:452)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent._handleFile(GetDLSyncUpdateEvent.java:276)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.GetDLSyncUpdateEvent.handleResponse(GetDLSyncUpdateEvent.java:164)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.BaseEvent.executeRequest(BaseEvent.java:238)
      at com.liferay.sync.modules.documentlibrary.server.remote.event.BaseEvent.run(BaseEvent.java:95)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)

      ... and same exceptions every 5 seconds

      application server log:
      11:08:16,625 ERROR [http-bio-8080-exec-7][JSONWebServiceServiceAction:114] java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
      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:597)
      at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl._invokeActionMethod(JSONWebServiceActionImpl.java:191)
      at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl.invoke(JSONWebServiceActionImpl.java:66)
      at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.getJSON(JSONWebServiceServiceAction.java:104)
      at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:75)
      at com.liferay.portal.servlet.JSONServlet.service(JSONServlet.java:65)
      at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portlet.documentlibrary.DuplicateFileException: test document
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.validateFile(DLFileEntryLocalServiceImpl.java:1895)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.validateFile(DLFileEntryLocalServiceImpl.java:1934)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.addFileEntry(DLFileEntryLocalServiceImpl.java:142)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy184.addFileEntry(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl.addFileEntry(DLFileEntryServiceImpl.java:62)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy185.addFileEntry(Unknown Source)
      at com.liferay.portal.repository.liferayrepository.LiferayRepository.addFileEntry(LiferayRepository.java:124)
      at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.addFileEntry(DLAppServiceImpl.java:196)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy181.addFileEntry(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.DLAppServiceUtil.addFileEntry(DLAppServiceUtil.java:145)
      ... 68 more

      ================================================================================
      ================================================================================
      ================================================================================
      Third test scenario: When user renames folder name of parrent folder when subfolder with files exist
      1) Create folder "testcase3", create subfolder "testfolder" and upload "test document" into "testfolder" via web interface.
      2) Rename "testcase3" to "testcase3a" via Liferay Sync directory.

      From this moment synchronization isn't working correctly.
      1) Create file in web interface in folder "testcase3a" --> file is correctly synchronized
      2) Create file in local computer in folder "testcase3a" --> file isn't uploaded

      Restart of Liferay Sync tool fix this issue until next rename folder in this scenario.

      liferay sync log:
      01 Jul 2013 13:18:17,984 DEBUG [LocalFileEventProcessor:640] Done processing events
      01 Jul 2013 13:18:18,005 DEBUG [FileEventHandler:75] RENAME /home/janhaj/liferay-sync/profiq's portal/testcase3 -> /home/janhaj/liferay-sync/profiq's portal/testcase3a
      01 Jul 2013 13:18:18,039 ERROR [FileModelManager:470] Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE3', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase3a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase3', '/home/janhaj/liferay-sync/profiq's portal/testcase3a') WHERE `filePath` LIKE ? [42001-170]
      org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TESTCASE3', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/testcase3a') WHERE ""FILEPATH"" LIKE ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/testcase3', '/home/janhaj/liferay-sync/profiq's portal/testcase3a') WHERE `filePath` LIKE ? [42001-170]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.getSyntaxError(DbException.java:194)
      at org.h2.command.Parser.getSyntaxError(Parser.java:490)
      at org.h2.command.Parser.read(Parser.java:2797)
      at org.h2.command.Parser.readFunction(Parser.java:2300)
      at org.h2.command.Parser.readTerm(Parser.java:2475)
      at org.h2.command.Parser.readFactor(Parser.java:2045)
      at org.h2.command.Parser.readSum(Parser.java:2032)
      at org.h2.command.Parser.readConcat(Parser.java:2005)
      at org.h2.command.Parser.readCondition(Parser.java:1870)
      at org.h2.command.Parser.readAnd(Parser.java:1851)
      at org.h2.command.Parser.readExpression(Parser.java:1843)
      at org.h2.command.Parser.parseUpdate(Parser.java:694)
      at org.h2.command.Parser.parsePrepared(Parser.java:426)
      at org.h2.command.Parser.parse(Parser.java:278)
      at org.h2.command.Parser.parse(Parser.java:254)
      at org.h2.command.Parser.prepareCommand(Parser.java:217)
      at org.h2.engine.Session.prepareLocal(Session.java:414)
      at org.h2.engine.Session.prepareCommand(Session.java:363)
      at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
      at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
      at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:629)
      at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:129)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:50)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:40)
      at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:422)
      at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:376)
      at com.j256.ormlite.stmt.UpdateBuilder.update(UpdateBuilder.java:117)
      at com.liferay.sync.modules.documentlibrary.server.manager.database.dao.FileModelDao.updateFilePath(FileModelDao.java:309)
      at com.liferay.sync.modules.documentlibrary.server.manager.FileModelManager.handleLocalFileRename(FileModelManager.java:466)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler._handleEvent(FileEventHandler.java:101)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler.fileRenamed(FileEventHandler.java:77)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor._fireEvents(LocalFileEventProcessor.java:239)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor.run(LocalFileEventProcessor.java:139)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      01 Jul 2013 13:18:18,292 DEBUG [UpdateFolderEvent:90] Received exception response /home/janhaj/liferay-sync/profiq's portal/testcase3a/testfolder
      01 Jul 2013 13:18:18,348 ERROR [UploadFileEvent:92] Parent folder is error /home/janhaj/liferay-sync/profiq's portal/testcase3a/testfolder/test document

      application server log:
      11:18:18,270 ERROR [http-bio-8080-exec-1][JSONWebServiceServiceAction:114] java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
      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:597)
      at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl._invokeActionMethod(JSONWebServiceActionImpl.java:191)
      at com.liferay.portal.jsonwebservice.JSONWebServiceActionImpl.invoke(JSONWebServiceActionImpl.java:66)
      at com.liferay.portal.jsonwebservice.JSONWebServiceServiceAction.getJSON(JSONWebServiceServiceAction.java:104)
      at com.liferay.portal.struts.JSONAction.execute(JSONAction.java:75)
      at com.liferay.portal.servlet.JSONServlet.service(JSONServlet.java:65)
      at com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:79)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
      at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
      at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
      at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portlet.documentlibrary.DuplicateFolderNameException: testfolder
      at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.validateFolder(DLFolderLocalServiceImpl.java:701)
      at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.validateFolder(DLFolderLocalServiceImpl.java:711)
      at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.addFolder(DLFolderLocalServiceImpl.java:67)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy194.addFolder(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.impl.DLFolderServiceImpl.addFolder(DLFolderServiceImpl.java:55)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy195.addFolder(Unknown Source)
      at com.liferay.portal.repository.liferayrepository.LiferayRepository.addFolder(LiferayRepository.java:162)
      at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.addFolder(DLAppServiceImpl.java:312)
      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:597)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
      at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      at com.sun.proxy.$Proxy181.addFolder(Unknown Source)
      at com.liferay.portlet.documentlibrary.service.DLAppServiceUtil.addFolder(DLAppServiceUtil.java:243)
      ... 68 more

      ================================================================================
      ================================================================================
      ================================================================================
      Fourth test scenario: Renaming of the file
      1) Create document "test document".
      2) Rename "test document" to "test document2" and then to "test document3" via Liferay Sync directory.

      Changes of this file after rename synchronize correctly in this scenario, but exceptions in liferay sync log have shown.

      liferay sync log:
      01 Jul 2013 13:43:47,131 DEBUG [LocalFileEventProcessor:640] Done processing events
      01 Jul 2013 13:43:47,141 DEBUG [FileEventHandler:75] RENAME /home/janhaj/liferay-sync/profiq's portal/test document -> /home/janhaj/liferay-sync/profiq's portal/test document2
      01 Jul 2013 13:43:47,151 ERROR [FileModelManager:470] Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TEST DOCUMENT', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/test document2') WHERE ""FILEPATH"" = ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/test document', '/home/janhaj/liferay-sync/profiq's portal/test document2') WHERE `filePath` = ? [42001-170]
      org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TEST DOCUMENT', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/test document2') WHERE ""FILEPATH"" = ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/test document', '/home/janhaj/liferay-sync/profiq's portal/test document2') WHERE `filePath` = ? [42001-170]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.getSyntaxError(DbException.java:194)
      at org.h2.command.Parser.getSyntaxError(Parser.java:490)
      at org.h2.command.Parser.read(Parser.java:2797)
      at org.h2.command.Parser.readFunction(Parser.java:2300)
      at org.h2.command.Parser.readTerm(Parser.java:2475)
      at org.h2.command.Parser.readFactor(Parser.java:2045)
      at org.h2.command.Parser.readSum(Parser.java:2032)
      at org.h2.command.Parser.readConcat(Parser.java:2005)
      at org.h2.command.Parser.readCondition(Parser.java:1870)
      at org.h2.command.Parser.readAnd(Parser.java:1851)
      at org.h2.command.Parser.readExpression(Parser.java:1843)
      at org.h2.command.Parser.parseUpdate(Parser.java:694)
      at org.h2.command.Parser.parsePrepared(Parser.java:426)
      at org.h2.command.Parser.parse(Parser.java:278)
      at org.h2.command.Parser.parse(Parser.java:254)
      at org.h2.command.Parser.prepareCommand(Parser.java:217)
      at org.h2.engine.Session.prepareLocal(Session.java:414)
      at org.h2.engine.Session.prepareCommand(Session.java:363)
      at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
      at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
      at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:629)
      at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:129)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:50)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:40)
      at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:422)
      at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:376)
      at com.j256.ormlite.stmt.UpdateBuilder.update(UpdateBuilder.java:117)
      at com.liferay.sync.modules.documentlibrary.server.manager.database.dao.FileModelDao.updateFilePath(FileModelDao.java:309)
      at com.liferay.sync.modules.documentlibrary.server.manager.FileModelManager.handleLocalFileRename(FileModelManager.java:466)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler._handleEvent(FileEventHandler.java:101)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler.fileRenamed(FileEventHandler.java:77)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor._fireEvents(LocalFileEventProcessor.java:239)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor.run(LocalFileEventProcessor.java:139)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)

      01 Jul 2013 13:44:03,583 DEBUG [LocalFileEventProcessor:640] Done processing events
      01 Jul 2013 13:44:03,591 DEBUG [FileEventHandler:75] RENAME /home/janhaj/liferay-sync/profiq's portal/test document2 -> /home/janhaj/liferay-sync/profiq's portal/test document3
      01 Jul 2013 13:44:03,599 ERROR [FileModelManager:470] Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TEST DOCUMENT2', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/test document3') WHERE ""FILEPATH"" = ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/test document2', '/home/janhaj/liferay-sync/profiq's portal/test document3') WHERE `filePath` = ? [42001-170]
      org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "UPDATE ""FILEMODEL"" SET ""FILEPATH"" = REPLACE(""FILEPATH"", '/home/janhaj/liferay-sync/profiq'S[*] PORTAL/TEST DOCUMENT2', '/HOME/JANHAJ/LIFERAY-SYNC/PROFIQ's portal/test document3') WHERE ""FILEPATH"" = ? "; expected "[, ::, *, /, %, +, -, ||, , !, NOT, LIKE, REGEXP, IS, IN, BETWEEN, AND, OR, ,, )"; SQL statement:
      UPDATE `FileModel` SET `filePath` = REPLACE(`filePath`, '/home/janhaj/liferay-sync/profiq's portal/test document2', '/home/janhaj/liferay-sync/profiq's portal/test document3') WHERE `filePath` = ? [42001-170]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
      at org.h2.message.DbException.get(DbException.java:169)
      at org.h2.message.DbException.getSyntaxError(DbException.java:194)
      at org.h2.command.Parser.getSyntaxError(Parser.java:490)
      at org.h2.command.Parser.read(Parser.java:2797)
      at org.h2.command.Parser.readFunction(Parser.java:2300)
      at org.h2.command.Parser.readTerm(Parser.java:2475)
      at org.h2.command.Parser.readFactor(Parser.java:2045)
      at org.h2.command.Parser.readSum(Parser.java:2032)
      at org.h2.command.Parser.readConcat(Parser.java:2005)
      at org.h2.command.Parser.readCondition(Parser.java:1870)
      at org.h2.command.Parser.readAnd(Parser.java:1851)
      at org.h2.command.Parser.readExpression(Parser.java:1843)
      at org.h2.command.Parser.parseUpdate(Parser.java:694)
      at org.h2.command.Parser.parsePrepared(Parser.java:426)
      at org.h2.command.Parser.parse(Parser.java:278)
      at org.h2.command.Parser.parse(Parser.java:254)
      at org.h2.command.Parser.prepareCommand(Parser.java:217)
      at org.h2.engine.Session.prepareLocal(Session.java:414)
      at org.h2.engine.Session.prepareCommand(Session.java:363)
      at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
      at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:74)
      at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:629)
      at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:129)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:50)
      at com.j256.ormlite.stmt.mapped.MappedPreparedStmt.compile(MappedPreparedStmt.java:40)
      at com.j256.ormlite.stmt.StatementExecutor.update(StatementExecutor.java:422)
      at com.j256.ormlite.dao.BaseDaoImpl.update(BaseDaoImpl.java:376)
      at com.j256.ormlite.stmt.UpdateBuilder.update(UpdateBuilder.java:117)
      at com.liferay.sync.modules.documentlibrary.server.manager.database.dao.FileModelDao.updateFilePath(FileModelDao.java:309)
      at com.liferay.sync.modules.documentlibrary.server.manager.FileModelManager.handleLocalFileRename(FileModelManager.java:466)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler._handleEvent(FileEventHandler.java:101)
      at com.liferay.sync.modules.documentlibrary.server.local.handler.FileEventHandler.fileRenamed(FileEventHandler.java:77)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor._fireEvents(LocalFileEventProcessor.java:239)
      at com.liferay.sync.modules.documentlibrary.server.local.LocalFileEventProcessor.run(LocalFileEventProcessor.java:139)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:662)

      application server log:
      no message

        Attachments

          Activity

            People

            Assignee:
            kevin.cho Kevin Cho (Inactive)
            Reporter:
            jan.profiq Jan Hájovský (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 48 weeks, 6 days ago

                Packages

                Version Package
                1.1.0 B1