I have repeatedly experienced problems with the Dynamics Ax-dll in my project.
The exception is:
There is already an object named 'AXUserSelections' in the database.
Anyone know have to solve this??
Best regards, Anders
I have repeatedly experienced problems with the Dynamics Ax-dll in my project.
The exception is:
There is already an object named 'AXUserSelections' in the database.
Anyone know have to solve this??
Best regards, Anders
Hi Anders,
I just checked in the source file for the AX dll, and it looks like it will try to create that table if it cannot find it - it sounds strange that you get this message, since it checks for the table before it tries to create it.
Does the table exist in your Dynamicweb database? if it does, it might be worth a shot simply to remove it and try again (assuming of course that you are working on a test site).
Regards, Jonas Dam
Hi Jonas,
I have been reflecting the Dw code and the problem seems to be in the class: DMConnection as you have this property:
/// <summary> /// Metainformation for this connection. /// /// </summary> /// /// <returns> /// DMConnectionMeta class /// </returns> public DMConnectionMeta Meta { get { if (this._meta == null) this._meta = this.GetMeta(); return this._meta; } }
In the property the _meta variable is only fetched from the connection if it is null and it seems not to be refreshed after creation of the new table for AXUserSelections.
Best regards, Anders
You are right, I will get this fixed.
/Jonas
Hi Jonas
There seems to be more problems with the registration af the AxUserSelection even though it should have been registered long ago.
This from the indexing log:
Error message: There is already an object named 'AXUserSelections' in the database.
Call stack: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Dynamicweb.Database.ExecuteNonQuery(String sql, Int32 commandTimeout, Boolean useTransaction, String database, IDbConnection connection)
at Dynamicweb.Database.ExecuteNonQuery(String sql)
at Dynamicweb.eCommerce.AX.Configuration.UserSelections.CreateTable()
at Dynamicweb.eCommerce.AX.Configuration.UserSelections.VerifySelectionTableSetup(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.VerifySetup.VerifyAssortmentTable(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.VerifySetup.BeginVerification(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.Global.get_IsIntegrationActive()
at Dynamicweb.eCommerce.AX.PriceProvider.FindPrice(Product Product, Double Quantity, String VariantID, Currency Currency, String UnitID, Extranet User)
at Dynamicweb.eCommerce.Prices.PriceManager.FindPrice(Product Product, Double Quantity, String VariantID, Currency Currency, String UnitID)
at Dynamicweb.eCommerce.Prices.PriceManager.FindPrice(Product Product)
at Dynamicweb.eCommerce.Prices.PriceCalculated.set_Product(Product Value)
at Dynamicweb.eCommerce.Products.Product.get_Price()
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry.Initialize(Product p)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry..ctor(Product p)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry.Create(IDataReader reader)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexer.Index(IndexerDataRequest request)
at Dynamicweb.Searching.Indexer.PerformIndexModifications(IEnumerable`1 fromEntries, IndexUpdateParameters parameters)
at Dynamicweb.Searching.Indexer.PerformUpdate(IEnumerable`1 data, IndexerQueueContentType expectedContentType, IndexUpdateParameters parameters)
at Dynamicweb.Searching.IndexManager.UpdateIndexInternal(Indexer i, Boolean isFullUpdate, Boolean updateSpell, IDictionary`2 flags)
Best regards, Anders
And more from the indexing:
Error message: Object reference not set to an instance of an object.
Call stack: at System.Web.HttpServerVarsCollection.Get(String name)
at Dynamicweb.Backend.Translate.GetWord(String Key, Int32 intAlternative, Boolean blnJs)
at Dynamicweb.Modules.DataManagement.ConnectionManager.LoadMsSqlConnection()
at Dynamicweb.Modules.DataManagement.ConnectionManager.GetConnections()
at Dynamicweb.Modules.DataManagement.DMConnection.GetConnectionsBySql(String sql)
at Dynamicweb.Modules.DataManagement.DMConnection.GetConnections()
at Dynamicweb.eCommerce.AX.Configuration.UserSelections.GetDatabaseConnection()
at Dynamicweb.eCommerce.AX.Configuration.UserSelections.TableExists()
at Dynamicweb.eCommerce.AX.Configuration.UserSelections.VerifySelectionTableSetup(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.VerifySetup.VerifyAssortmentTable(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.VerifySetup.BeginVerification(Boolean createIfMissing)
at Dynamicweb.eCommerce.AX.Configuration.Global.get_IsIntegrationActive()
at Dynamicweb.eCommerce.AX.PriceProvider.FindPrice(Product Product, Double Quantity, String VariantID, Currency Currency, String UnitID, Extranet User)
at Dynamicweb.eCommerce.Prices.PriceManager.FindPrice(Product Product, Double Quantity, String VariantID, Currency Currency, String UnitID)
at Dynamicweb.eCommerce.Prices.PriceManager.FindPrice(Product Product)
at Dynamicweb.eCommerce.Prices.PriceCalculated.set_Product(Product Value)
at Dynamicweb.eCommerce.Products.Product.get_Price()
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry.Initialize(Product p)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry..ctor(Product p)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexEntry.Create(IDataReader reader)
at Dynamicweb.eCommerce.Searching.Index.ProductIndexer.Index(IndexerDataRequest request)
at Dynamicweb.Searching.Indexer.PerformIndexModifications(IEnumerable`1 fromEntries, IndexUpdateParameters parameters)
at Dynamicweb.Searching.Indexer.PerformUpdate(IEnumerable`1 data, IndexerQueueContentType expectedContentType, IndexUpdateParameters parameters)
at Dynamicweb.Searching.IndexManager.UpdateIndexInternal(Indexer i, Boolean isFullUpdate, Boolean updateSpell, IDictionary`2 flags)
Best regards, Anders
Hi Anders,
That looks to be closely related to the original problem.
I have added this information to the bug I created then.
Best regards, Jonas
You must be logged in to post in the forum