AnsweredAssumed Answered

'Synchronization aborted due to error'?

Question asked by sscbrian on Jul 10, 2015
Latest reply on Jul 10, 2015 by sscbrian
I've got an LDAP (Active Directory actually) integration that seems to work, but yet logs scary sounding errors.

15:43:28,117 ERROR [org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer] [localhost-startStop-1] Synchronization aborted due to error
org.springframework.dao.DataIntegrityViolationException:
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
### The error may involve alfresco.propval.select_PropertyValueByStringValue-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
; SQL []; ERROR: invalid byte sequence for encoding "UTF8": 0x00; nested exception is org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
   at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
   at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
   at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:71)
   at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
   at com.sun.proxy.$Proxy7.selectOne(Unknown Source)
   at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:154)
   at org.alfresco.repo.domain.propval.ibatis.PropertyValueDAOImpl.findPropertyValueByValue(PropertyValueDAOImpl.java:400)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl$PropertyValueCallbackDAO.findByValue(AbstractPropertyValueDAOImpl.java:795)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl$PropertyValueCallbackDAO.findByValue(AbstractPropertyValueDAOImpl.java:732)
   at org.alfresco.repo.cache.lookup.EntityLookupCache.getOrCreateByValue(EntityLookupCache.java:465)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl.getOrCreatePropertyValue(AbstractPropertyValueDAOImpl.java:725)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl.createPropertyImpl(AbstractPropertyValueDAOImpl.java:1021)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl.access$700(AbstractPropertyValueDAOImpl.java:58)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl$PropertyCallbackDAO.createValue(AbstractPropertyValueDAOImpl.java:869)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl$PropertyCallbackDAO.createValue(AbstractPropertyValueDAOImpl.java:863)
   at org.alfresco.repo.cache.lookup.EntityLookupCache.getOrCreateByValue(EntityLookupCache.java:447)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl.createProperty(AbstractPropertyValueDAOImpl.java:846)
   at org.alfresco.repo.domain.propval.AbstractPropertyValueDAOImpl.updatePropertyUniqueContext(AbstractPropertyValueDAOImpl.java:1400)
   at org.alfresco.repo.attributes.AttributeServiceImpl.setAttribute(AttributeServiceImpl.java:183)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer$14.execute(ChainingUserRegistrySynchronizer.java:2291)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer$14.execute(ChainingUserRegistrySynchronizer.java:2282)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:454)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.notifySyncDirectoryEnd(ChainingUserRegistrySynchronizer.java:2281)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.synchronizeInternal(ChainingUserRegistrySynchronizer.java:719)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.synchronize(ChainingUserRegistrySynchronizer.java:436)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer$7.doWork(ChainingUserRegistrySynchronizer.java:2052)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.onBootstrap(ChainingUserRegistrySynchronizer.java:2046)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   at org.alfresco.repo.security.sync.ChainingUserRegistrySynchronizer.onApplicationEvent(ChainingUserRegistrySynchronizer.java:2409)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
   at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ChildApplicationContext.publishEvent(ChildApplicationContextFactory.java:554)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.alfresco.repo.management.subsystems.ChildApplicationContextFactory$ApplicationContextState.start(ChildApplicationContextFactory.java:809)
   at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.start(AbstractPropertyBackedBean.java:991)
   at org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean.onApplicationEvent(AbstractPropertyBackedBean.java:530)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEventInternal(SafeApplicationEventMulticaster.java:209)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:180)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
   at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
   at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
   at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
   at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
   at java.util.concurrent.FutureTask.run(FutureTask.java:262)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
   at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:39)
   at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
   at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
   at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:120)
   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:75)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:75)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:40)
   at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
   … 55 more

The odd part is that it seems to happen on a database access rather than the LDAP query?  I also noted the 'invalid byte sequence for encoding "UTF8"'.  Based on other forum posts I understand that whatever is going on, it should be latin-1 rather than UTF-8.  However, I'm not finding any help in the stacktrace locating whatever it is that's wrong.  Is my AD server returning UTF-8, is it the database?  Perhaps even some obscure properties file?

Any help would be appreciated!

**edit** Sorry, had to remove code tags as it caused chunks of the trace to just not show up.

Outcomes