Persistence Engine not found: Default Engine

Jun 2, 2009 at 5:04 AM

Hi All,

Not sure what I am doing wrong here, have read all the doco, tries everything...

I can get the 3.5 sample to work (QuickStart.Application) with SQL Server but cannot get it to work with  Evaluant.Uss.Xml.XmlProvider. Anyone got any ideas ?

#1 OUT OF THE BOX:

I am using the code and app.config exactly as it comes out of the zip file.  I am stepping through it with debugger in VS2008

 

System.Data.SqlClient.SqlException was unhandled

  Message="A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

  Source=".Net SqlClient Data Provider"

  ErrorCode=-2146232060

  Class=20

  LineNumber=0

  Number=2

  Server=""

  State=0

  StackTrace:

       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

       at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)

       at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)

       at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)

       at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

       at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

       at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

       at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

       at System.Data.SqlClient.SqlConnection.Open()

       at Evaluant.Uss.SqlMapper.SqlMapperPersistenceEngine.InitializeRepository()

       at Evaluant.Uss.ObjectContext.ObjectContext.InitializeRepository()

       at QuickStart.Application.Program.Main(String[] args) in C:\test\QuickStart.Console\Program.cs:line 15

       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

  InnerException: 

 

#2 OUT OF THE BOX WITH ONE MODIFICATION

THE MODIFICATION:   ObjectService os = new ObjectService(@"C:\test\QuickStart.Console\App.config");

 

I am using the code and app.config exactly as it comes out of the zip file.  I am stepping through it with debugger in VS2008

I get the following error :

Evaluant.Uss.UniversalStorageException was unhandled

  Message="Persistence Engine not found: Default Engine"

  Source="Evaluant.Uss"

  StackTrace:

       at Evaluant.Uss.XmlConfigLoader.LoadXmlConfig(Stream stream, String engineName, String basePath)

       at Evaluant.Uss.XmlConfigLoader.LoadXmlConfig(String filename, String engineName)

       at Evaluant.Uss.XmlConfigLoader.LoadXmlConfig(String filename)

       at Evaluant.Uss.ObjectContext.ObjectService..ctor(String filename)

       at QuickStart.Application.Program.Main(String[] args) in C:\test\QuickStart\QuickStart.Console\Program.cs:line 14

       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

  InnerException: 

 

Coordinator
Jun 2, 2009 at 7:55 AM

Hello Steve,

 

Its not working because you are specifying a file path to an app.config file where as the file expected when you specify a file path is an engines.config file (the way we use to specify engines before the namespace Evaluant.Uss.Configuration came). If you use the current application configuration file, you do not need to specify the file path.

 

Regards,

Nicolas Penin