AnsweredAssumed Answered

MSSQL to Oracle migration

Question asked by moralesalex on Apr 10, 2014
Latest reply on Apr 10, 2014 by mrogers
Currently we are engaged with Alfresco migration from MSSQL to Oracle, and faced with the problem,
and I would be very grateful if somebody can help me or tell where we can find an answer.

### Error querying database.  Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
### The error may involve alfresco.node.select_NodeProperties-Inline
### The error occurred while setting parameters
### Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException

1) Create an oracle-user (schema) for Alfresco.
2) Configure Alfresco to work with this scheme.
3) Create a structure identical to the structure created by Alfresco.
4) Using Oracle SQLDeveloper to generate a data migration project from base backup.
5) Transferring the data.
6) Updating the sequence.
7) Copy backups of indexes and content storedzh.
*images and docs that was migrate to blob format are looked correct.

Soft:
- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0;
- jdbc driver: ojdbc6;
- SQL SERVER 2008;
- Alfresco 4.0.2.44 Enterprise;
- Windows 7;

global.properties base config:

### database connection properties ###
db.driver=oracle.jdbc.OracleDriver
db.username=user
db.password=pass
db.name=alfresco
db.url=jdbc:oracle:thin:@10.2.2.206:1521:alfresco
db.pool.validate.query=SELECT 1 FROM DUAL
db.pool.max=40
db.pool.initial=40
hibernate.dialect=org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect

Thanks a lot.


00:35:52,609 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'OOoJodconverter' subsystem, ID: [OOoJodconverter, default] complete
00:35:52,906 ERROR [org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl] getDescriptor:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
### The error may involve alfresco.node.select_NodeProperties-Inline
### The error occurred while setting parameters
### Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
   at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
   at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
   at $Proxy5.selectList(Unknown Source)
   at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:189)
   at org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.selectNodeProperties(NodeDAOImpl.java:536)
   at org.alfresco.repo.domain.node.ibatis.NodeDAOImpl.selectNodeProperties(NodeDAOImpl.java:513)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl$PropertiesCallbackDAO.findByKey(AbstractNodeDAOImpl.java:2326)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl$PropertiesCallbackDAO.findByKey(AbstractNodeDAOImpl.java:2316)
   at org.alfresco.repo.cache.lookup.EntityLookupCache.getByKey(EntityLookupCache.java:321)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getNodePropertiesCached(AbstractNodeDAOImpl.java:2275)
   at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getNodeProperties(AbstractNodeDAOImpl.java:1826)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getPropertiesImpl(DbNodeServiceImpl.java:1418)
   at org.alfresco.repo.node.db.DbNodeServiceImpl.getProperties(DbNodeServiceImpl.java:1409)
   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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:104)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.getProperties(Unknown Source)
   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 org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:215)
   at $Proxy9.getProperties(Unknown Source)
   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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:115)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:175)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:115)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.tagging.TagScopePropertyMethodInterceptor.invoke(TagScopePropertyMethodInterceptor.java:115)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:175)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:212)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:175)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:212)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:212)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy8.getProperties(Unknown Source)
   at org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl.getDescriptor(RepositoryDescriptorDAOImpl.java:158)
   at org.alfresco.repo.descriptor.DescriptorServiceImpl.bootstrap(DescriptorServiceImpl.java:212)
   at org.alfresco.repo.descriptor.DescriptorServiceImpl.access$100(DescriptorServiceImpl.java:52)
   at org.alfresco.repo.descriptor.DescriptorServiceImpl$3.doWork(DescriptorServiceImpl.java:194)
   at org.alfresco.repo.descriptor.DescriptorServiceImpl$3.doWork(DescriptorServiceImpl.java:190)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:516)
   at org.alfresco.repo.descriptor.DescriptorServiceImpl.onBootstrap(DescriptorServiceImpl.java:198)
   at org.springframework.extensions.surf.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:56)
   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:4206)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
   at org.apache.catalina.core.StandardService.start(StandardService.java:525)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
   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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
### The error may involve alfresco.node.select_NodeProperties-Inline
### The error occurred while setting parameters
### Cause: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:77)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
   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 org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
   … 96 more
Caused by: org.alfresco.ibatis.SerializableTypeHandler$DeserializationException: java.io.EOFException
   at org.alfresco.ibatis.SerializableTypeHandler.getResult(SerializableTypeHandler.java:84)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.getPropertyMappingValue(FastResultSetHandler.java:238)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.applyPropertyMappings(FastResultSetHandler.java:221)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:196)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:145)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:121)
   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:98)
   at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
   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)
   … 102 more
Caused by: java.io.EOFException
   at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
   at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
   at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
   at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
   at org.alfresco.ibatis.SerializableTypeHandler.getResult(SerializableTypeHandler.java:77)
   … 114 more
00:35:52,906 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed

Outcomes