Error upgrading from 5.6 to 5.8 with SQL Server
Hello,
I'm trying to upgrade my Nuxeo 5.6 to 5.8 with SQL Server, but when configure Nuxeo 5.8 and run nuxeoctl, give the following errors.
2014-05-16 14:20:43,399 ERROR [localhost-startStop-1] [org.apache.geronimo.connector.outbound.MCFConnectionInterceptor] Error occurred creating ManagedConnection for handle: nullManagedConnectionInfo: org.apache.geronimo.connector.outbound.ManagedConnectionInfo@674586ed. mc: null] org.nuxeo.ecm.core.storage.StorageException: java.sql.SQLException: Error post creating table: ALTER TABLE [bas_principalnames] ADD CONSTRAINT [bas_principalnames_id_hierarchy_fk] FOREIGN KEY ([id]) REFERENCES [hierarchy] ON DELETE CASCADE : Column 'hierarchy.id' is not the same data type as referencing column 'bas_principalnames.id' in foreign key 'bas_principalnames_id_hierarchy_fk'.
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createDatabase(JDBCMapper.java:160)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCBackend.newMapper(JDBCBackend.java:199)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.initRepository(RepositoryImpl.java:478)
at org.nuxeo.ecm.core.storage.sql.RepositoryImpl.getConnection(RepositoryImpl.java:453)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.getConnection(ManagedConnectionFactoryImpl.java:336)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:104)
at org.nuxeo.ecm.core.storage.sql.ra.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:192)
at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:49)
at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)
at org.apache.geronimo.connector.outbound.SinglePoolMatchAllConnectionInterceptor.internalGetConnection(SinglePoolMatchAllConnectionInterceptor.java:88)
at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
at org.apache.geronimo.connector.outbound.MultiPoolConnectionInterceptor.getConnection(MultiPoolConnectionInterceptor.java:81)
at org.apache.geronimo.connector.outbound.ThreadLocalCachingConnectionInterceptor.getConnection(ThreadLocalCachingConnectionInterceptor.java:70)
at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:49)
at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:101)
at org.apache.geronimo.connector.outbound.SubjectInterceptor.getConnection(SubjectInterceptor.java:58)
at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43)
at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66)
at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:77)
at org.nuxeo.runtime.jtajca.NuxeoContainer$ConnectionManagerWrapper.allocateConnection(NuxeoContainer.java:801)
at org.nuxeo.ecm.core.storage.sql.ra.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:129)
at org.nuxeo.ecm.core.storage.sql.ra.ConnectionFactoryImpl.getSession(ConnectionFactoryImpl.java:196)
at org.nuxeo.ecm.core.api.local.LocalSession.createSession(LocalSession.java:103)
at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:170)
at org.nuxeo.ecm.core.api.AbstractSession.connect(AbstractSession.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:136)
at com.sun.proxy.$Proxy101.connect(Unknown Source)
at org.nuxeo.ecm.core.api.repository.Repository.open(Repository.java:155)
at org.nuxeo.ecm.core.api.repository.Repository.open(Repository.java:113)
at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:140)
at org.nuxeo.ecm.core.repository.RepositoryService.initializeRepository(RepositoryService.java:166)
at org.nuxeo.ecm.core.repository.RepositoryService.applicationStarted(RepositoryService.java:147)
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:332)
at org.nuxeo.runtime.osgi.OSGiRuntimeService.notifyComponentsOnStarted(OSGiRuntimeService.java:494)
at org.nuxeo.runtime.osgi.OSGiRuntimeService.fireApplicationStarted(OSGiRuntimeService.java:533)
at org.nuxeo.runtime.osgi.OSGiRuntimeService.frameworkEvent(OSGiRuntimeService.java:543)
at org.nuxeo.osgi.OSGiAdapter.fireFrameworkEvent(OSGiAdapter.java:238)
at org.nuxeo.osgi.application.loader.FrameworkLoader.doStart(FrameworkLoader.java:232)
at org.nuxeo.osgi.application.loader.FrameworkLoader.start(FrameworkLoader.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.nuxeo.osgi.application.FrameworkBootstrap.start(FrameworkBootstrap.java:132)
at org.nuxeo.runtime.tomcat.NuxeoLauncher.handleEvent(NuxeoLauncher.java:118)
at org.nuxeo.runtime.tomcat.NuxeoLauncher.lifecycleEvent(NuxeoLauncher.java:89)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:347)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5498)
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:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Error post creating table: ALTER TABLE [bas_principalnames] ADD CONSTRAINT [bas_principalnames_id_hierarchy_fk] FOREIGN KEY ([id]) REFERENCES [hierarchy] ON DELETE CASCADE : Column 'hierarchy.id' is not the same data type as referencing column 'bas_principalnames.id' in foreign key 'bas_principalnames_id_hierarchy_fk'.
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createTables(JDBCMapper.java:247)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createDatabase(JDBCMapper.java:157)
... 66 more
Caused by: java.sql.SQLException: Column 'hierarchy.id' is not the same data type as referencing column 'bas_principalnames.id' in foreign key 'bas_principalnames_id_hierarchy_fk'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2893)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2335)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:638)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:809)
at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1282)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.createTables(JDBCMapper.java:244)
... 67 more
How can we solved it?
Thanks in advance regards.
I wonder if your issue comes from not running the sqlserver-upgrade-script.sql.txt as noted in the upgrade notes .