Enterprise Manager

Enterprise Manager

  
Dear all,

I'm currently trying to run the absences manager solution, but i keep getting an exception like: Your enterprise manager reference is broken, please update it."

My enterprise manager has no errors when verifying.
However when i try to publish it, i get a publishing error as follows:

Publishing error: Publishing Error
Unable to upgrade database schema. Error trying to create index on database table 'osusr_a7l_ICON' over fields '"ID"'. The object 'OSPRK_OSUSR_A7L_LOCALE' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_USER_MAS_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_PREFEREN_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
ALTER TABLE ALTER COLUMN ID failed because one or more objects access this column.
SQL:
-- ON_UPGERR_MSG: Error trying to change database field 'osusr_a7l_LOCALE.ID' type (New Def: NVARCHAR(10) Mandatory in DB; DB Def: NVARCHAR(2) Mandatory in DB).
alter table dbo."OSUSR_A7L_LOCALE" alter column "ID" NVARCHAR(10);
Exception Details:
[1] Publishing Error: Unable to upgrade database schema. Error trying to create index on database table 'osusr_a7l_ICON' over fields '"ID"'. The object 'OSPRK_OSUSR_A7L_LOCALE' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_USER_MAS_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_PREFEREN_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
ALTER TABLE ALTER COLUMN ID failed because one or more objects access this column.
SQL:
-- ON_UPGERR_MSG: Error trying to change database field 'osusr_a7l_LOCALE.ID' type (New Def: NVARCHAR(10) Mandatory in DB; DB Def: NVARCHAR(2) Mandatory in DB).
alter table dbo."OSUSR_A7L_LOCALE" alter column "ID" NVARCHAR(10);

at #Ug.#0g.PrepareDeployEspace(String espaceName, Boolean debugMode, String testAreaName, Boolean partial, ICompilerReference[] deployPack)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
at System.Runtime.Remoting.Channels.DispatchChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at #Ug.#0g.#c.#3g.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.Tcp.TcpServerTransportSink.ServiceRequest(Object state)
at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()
at System.Runtime.Remoting.Channels.RequestQueue.ProcessNextRequest(SocketHandler sh)
at System.Runtime.Remoting.Channels.SocketHandler.BeginReadMessageCallback(IAsyncResult ar)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
[2] System.Data.SqlClient.SqlException: The object 'OSPRK_OSUSR_A7L_LOCALE' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_USER_MAS_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
The object 'OSFRK_osusr_a7l_PREFEREN_OSUSR_A7L_LOCALE_LOCALEID' is dependent on column 'ID'.
ALTER TABLE ALTER COLUMN ID failed because one or more objects access this column.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQuery(IDbCommand cmd, String description, Boolean isApplication, Boolean skipLog)
at OutSystems.HubEdition.RuntimePlatform.DBHelper.ExecuteNonQuery(IDbCommand cmd)
at OutSystems.HubEdition.DeploymentController.DBCompilerService.ExecuteInlineStatement(IDbTransaction tran, String statement)
at #Ug.#0g.#8h(String espaceTemporaryPath, Boolean debugMode)

Should i change directly this kind of relations in the database?
But i'm guessing that would have some undesired effects.

Any thoughts on how to deal with this?

--------------------------------------------------------------------------------------------------

Not being able to fix the enterprise manager, instead i tried to run the Absence Manager without references to the Enterprise Manager, but it was also somehow difficult.
Is this possible? Running the Absence Manager without the Enterprise Manager?


Best Regards,
Rui
Hi Pedro,

To workaround your upgrade error, please try the following steps:
1. Connect to your SQL Server database using SQLServer Management Studio
2. Drop the constraints 'OSFRK_osusr_a7l_USER_MAS_OSUSR_A7L_LOCALE_LOCALEID' and 'OSFRK_osusr_a7l_PREFEREN_OSUSR_A7L_LOCALE_LOCALEID' (don't worry, they will be recreated later by OutSystems compiler);
3. Manually alter the column 'OSUSR_A7L_LOCALE.ID' from NVARCHAR(2) to NVARCHAR(10);
4. Manually alter the column 'OSUSR_A7L_USER_MAS.LOCALEID' from NVARCHAR(2) to NVARCHAR(10);
5. Manually alter the column 'OSUSR_A7L_PREFEREN.LOCALEID' from NVARCHAR(2) to NVARCHAR(10);
6. Publish Enterprise Manager.

That should do it.

I've also forwarded your message to OutSystems maintenance team in order to fix this in a later version.
Regards,
Lúcio
Hi

Thanks for answering.

However i had previously worked around the problem.
What i did, for people o who might have the same problem was:

Deleting all espaces from service center, and then republish them.

After getting through this problem and my Enterprise Manager was fixed, i had a new one.

When logging in, on the Enterprise Manager i get the error: "This page is not redirecting correctly..."
I have a recent version of Enterprise Manager and i already had the "/" on the SetCookie action parameter.

Any ideas?

Best Regards,
Rui
Hi Rui,

Are you using EnterpriseManager 4.1? If so, this might be an upgrade failure that was not noticed. You check if that was the case by verifying if the eSpaces integrated with EnterpriseManager have the 'User Provider' eSpace property set to EnterpriseManager.
Cheers,
Lúcio
Hi,

Could you please provide us the Enterprise Manager that you are trying to publish as well as the previous published version?
If we have both versions we could try to locate the problem and see if it's a platform problem when trying to upgrade the Enterprise Manager eSpace.
Thanks,
Rui Eugénio
Well, thank you very much.
It worked out just fine.

The problem, it seams, was that my Absences Manager had the User Provider property set to current instead of Enterprise Manager.

Didn't even see it..My bad..

Best Regards,
Rui