Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا
Showing posts with label Error handling techniques. Show all posts
Showing posts with label Error handling techniques. Show all posts

Sunday, August 29, 2021

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index [table Name.Index] because it does not exist or you do not have permission.

 Hi,

Error: 

SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot drop the index 'WORKFLOWTRACKINGTABLE.IX_WORKFLOWTRACKINGTABLE_WORKFLOWTRACKINGSTATUSTABLE_PARTITION_TRACKINGCONTEXT_TRACKINGT', because it does not exist or you do not have permission.

Impact:

Results in synhronization failure.

Resolution :

1. Table a backup of the DB.

2. Delete the particular index from SQL side and synchronize the respective table in application.


Regards,

Sunday, February 9, 2014

Unable to construct an object from the class in the batch framework

Hi,

when we want to run a custom class in the server as a batch job we need to extend the RunBaseBatch class and schedule a job for it.

When the test was successful, We scheduled the job and waited for the batch job status to go from Waiting to Ended, and to surprise to get an error.

"Unable to construct an object from the class Sample Class in the batch framework. Make sure that the X++ code has been compiled to Microsoft .NET Framework CIL, and that the constructor does not require any parameters"

Steps on how to do this:

1.Open a new development environment and click Build and then choose Generate Incremental CIL.




Then, to double check if the job run well, go to System Administration > Inquiries > Batch Jobs and look for your job. It status should now be Ended.

Regards

The CIL generator found errors and could not save the new assembly

Hi,

Solution to solve this error,

So, how do we fix this problem?

Step 1: Stop the AOS

Atep 2: Delete all of the source in the C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory

When you do this, just delete all the files within the XppIL folder that are outside of other folders. Make a backup just in case, and the files would be generated while the full compilation is taking place



Step 3: Start the AOS




Step 3: Perform a full compile (it will not work without doing this)



Step 4: Perform a full CIL generation



 The drawback of this fix is that it takes a long time to complete. However, this fixes the issue, which is the desired outcome, and the services deployment and incremental CIL compilations moving forward would be error free.

As you can see, the service was deployed correctly and if I opened my inbound port I'll see it there.
  


UPDATE:

After a FULL CIL compilation some time you will get the following errors:



AOT > Class> ReleaseUpdateDB41_Basic




I just went to the object in question and compiled them separately.





The outcome would correctly compiled all the artifacts, including my new service gorup. 




Regards,



Wednesday, February 5, 2014

Clear password history in windows server

Hi,

In server OS it can be either 2008 or 2012 or may be 2013 its impossible to clear the history of password which are stored in ADDS.

regards,

Tuesday, February 4, 2014

SysDictClass object not initialized-while running SSRS report

Hi,

 When you created a SSRS report using a Data provider class that uses a Stored procedure to fill a temp table and the display the fields, using two AX environments, it works in the test one, but when I move to a different environment (let's call it production) sometime you will get this error:
Check business connector and at most Solution is full CIL generation surly it will work.
Regards


Friday, January 17, 2014

error 105: Unable to resolve the server's DNS address

Hi,

Start > All Programs > Accessories > Command Prompt. Right click on it and 'Run as Administrator'. Type the following and hit enter: ipconfig /flushdns

Regards,

Thursday, January 16, 2014

Dynamics AX 2012 R2 CU7 Installation error

Importance of CU7:
Only  15 minutes to CU7 compiler
Data Import/Export Framework in AX2012 R2 CU7
----------
While install CU7 on a CU6 environment, an error appears when the new models are being imported.
Error results in:
Error updating model database: Microsoft.Dynamics.Setup.AxSetupException: AxUtil call returned errors:The model contains a customization of a configuration key. The model cannot be imported because you can overlayer a configuration key from the patching layer only.

Both CU6 and CU7 use the same model name "Update for Foundation" with a different display name.("Foundation ([KB#])" with KB# equals to their respective KB number.) And as suggested in the error message configuration key changes in CU6 blocked the installation.

Uninstall the existing CU6 model first will allow the installation to proceed. However, please do note that this work around does NOT guarantee element ID consistency and is not suitable for production system. 


Tuesday, January 14, 2014

"A call to the Microsoft Dynamics AX SRSFrameworkService service failed. There was no endpoint listening at net.tcp://############/DynamicsAx/Services/BIServices that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.."

 Hi,
Error is

"A call to the Microsoft Dynamics AX SRSFrameworkService service failed.
There was no endpoint listening at net.tcp://############/DynamicsAx/Services/BIServices that could accept the message.
This is often caused by an incorrect address or SOAP action.
See InnerException, if present, for more details.."


Go System administration > Setup > Services & Application Integration Framework > Inbound ports.

Select BIServices port, Activate same. 

//Some time you will get this below error for that.


For that please follow below.
Goto AOT >> Service Groups >> BI Services, double check it has two services
Also check both services has the underline service operations:

If everything is correct then U can right click on BIServices service group and say Deploy Element.  


Regards,


Monday, January 13, 2014

Binding operation failed to allocate buffer space - Dynamic AX 2012

Hi,

QueryRun and Query Objects - Binding operation failed to allocate buffer space
So if you ever work with the QueryRun and Query objects within X++, and I mean work with them a lot. You might come across an issue.

If for some reason, your start to see the following in thrown errors or in the event viewer, Application event log on the AOS, then you have an issue most likely with the QueryRun and Query Objects.:
Binding operation failed to allocate buffer space


The issue that your facing is the query that your creating. The query your creating, to make use with your QueryRun object is causing the AOS to hit a buffer limit. You can increase the buffer limit at the AOS. But most likely what you will need to do is force literals for the query your building in X++.

It's simple to do, after your create an instance of the Query object simply do a:
Query.literal(1); call.

This will 'force the hand' of the AOS to accept the buffer allocation requirement, and allow your advanced query to run. Therefore allowing your QueryRun operation to finish as desired.

Well that's all for now. Ran into this, and thought it would be worth putting out here. If anyone has ran into this before, and wants to share feel free to leave a comment. Also if you have more details about literals and the use as described above, feel free to share that as well.

Recently we were confronted with a case where we received the following SQL error:
[Microsoft][SQL Native Client][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
This error occurs if we are running into a SQL limitation which does not allow more than 2100 parameters in a SQL statement.
Usually it's a Select statement where AX produces OR clauses with too many parameters like
WHERE RecId = xxxxxx OR RecId = xxxxxy OR RecId = xxxxyx ...
or IN clauses like
WHERE ID IN (xxxxxx,xxxxxy,xxxxyx, ...)


How to find where this select statements are coming from?
In the SQL statement trace log (Administration -> Inquiries - Tab 'Use') you will find the stack trace that shows you which method caused the SQL error.
How to fix this problem?
We have to add a forceliterals to the select statement in the relevant method.
Adding a forceliterals should avoid running into the SQL limitation of the 2100 parameters, because the statement is handled differently then.
The related statement could either be an X++ select statement or a X++ Query
X++ Stament

Change code from
select from TableName

to

select forceliterals from TableName
X++ Query

Activate forceliterals on the Query object
query.literals(true);


Error Message (17:05:20) Stack trace: Binding operation failed to allocate buffer space.
(C)\Classes\QueryRun\next
(C)\Jobs\Job4 - line 29
This relates back to the maximum buffer size set in the database tuning tab of the server configuration utility. This buffer is used for binding of input and output parameters for SQL statements. So for example:
Select * from MyTable where field1= @p1 <- this is the input parameter
Ax declares input parameters based on size of the field, rather than on the size of the value being passed. The size of the value used is the total length of the field plus one. The default buffer is 24576 bytes. Each character is allocated 2 bytes. This equates to a maximum of roughly 12288 characters length of input parameters. It is also necessary to be mindful of the RPC upper limit of 2100 parameters, so it is not possible to have more than 2100 input parameters, or the error below will appear:
SQL error description: [Microsoft][SQL Native Client][SQL Server]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100.
This relationship between buffer size, field length and the number of input parameters can be expressed as below:
MaximumBufferSize / ((FieldLength + 1)*2) = NumberOfPossibleInputParameters
To avoid this limitation altogether it is possible to set the query to use literals, this will mean that input parameters are not used, and therefore the buffer limit does not apply.
More information on the RPC error is available here:
Note: please do not confuse the maximum buffer size in the AOS configuration utility (which applies here) with the maxBufferSize registry key, they are unrelated.



Regards,

Monday, December 30, 2013

An unbalanced X++ TTSBegin/TTSCommit pair has been detected .Cause of this include (a) too many/few TTSBegin or TTS Commit - Dynamic AX

Hi,

An unbalanced X++ TTSBegin/TTSCommit pair has been detected .Cause of this include (a) too many/few TTSBegin or TTS Commit . The current TTS level is '1'

Just run this job and go head with your work above error will not come.

static void AlfasithResetTTS(Args _args)
{
while (appl.ttsLevel() > 0)
ttsAbort;
}

Enjoy

Tuesday, October 22, 2013

HTTP Error 500.24 – Internal Server Error + HELP SERVER ERROR AFTER INSTALLING ON AX 2012 + ERROR – Unable to contact the server

Hi,

This error may arises at any of this name for same reason.

HTTP Error 500.24 – Internal Server Error,
The Location of the help server has not been specified.
ERROR – Unable to contact the server etc...
HTTP Error 500.24 – Internal Server Error
An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

Detailed Error Information
Module
ConfigurationValidationModule
Notification
BeginRequest
Handler
svc-Integrated
Error Code
0×80070032
Requested URL
Physical Path
C:\inetpub\wwwroot\DynamicsAX6HelpServer\HelpService.svc
Logon Method
Not yet determined
Logon User
Not yet determined
 Solution:
  1. Check that Directory browsing is enabled(IIS MANAGER>SITES>DIRECTORY BROWSING(DOUBLE CLICK AND ENABLE IT)
  2. Go to Ax 2012>System administration > setup>system>Help system parameters
(check the location should be as
  1. Also when you browse the site in IIS manager it will tell you ASP.NET 4.0 check for Integrated pipeline mode
    1. Check the below criteria it should be the same
    2. IIS>Application Pools>
    3. ASP.NET4.0                                  V4.0       CLASSIC
    4. ASP.NET4.0 CLASS                        V4.0       CLASSIC
    5. CLASSIC .NET APPLICATION           V2.0       CLASSIC
    6. DEFAULT APP POOL                       V2.0       INTEGRATED
    7. DYNAMICS AX HELP SERVER          V4.0       INTEGRATED(Version will be 2.0 change to 4.0 and check)  pls keep in mind DynamicAX  HelpSVC >ASP.NET IMPERSONATION SHOULD BE DISABLE(DON’T ENABLE)


Unable to find appropriate service endpoint information in the configuration object + An error occurred during setup of Reporting Services extensions.

Error:  "An occurred during setup of Reporting Services extensions. Reason: Unable to find appropriate service endpoint information in the configuration object"

Reason: BIServices port is not deployed.
Resolution:
ü  Activate inbound ports BIServices (System Administration > Setup > Services and AIF > Inbound ports)
ü  Delete the WCFCONFIG entry in registry under the Dynamics AX current user hive key (HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration\Orig)
ü  Restart the box
ü  Try installation again.  If fails then continue with
ü  Make the BC proxy user a local admin on the SRS box.
ü  Redeploy BIServices services: AOT > ServiceGroups > Right Click BIServices and deploy.
Environment Details - Dynamics AX 2012 R2

Explanation: Reporting services Extension is a service that occupies a port in Dynamics AX 2012. Whenever you use Reporting services extension you need to activate a port BIServices

Steps for Registry:

1.     Click Start, and then click Run.
2.     In the Open box, type cmd and then press ENTER.
3.     In the Open box, type regedit and then press ENTER.
4.  Locate the following subkey in the registry: 
         HKEY_CURRENT_USER\Software\Microsoft\Dynamics\6.0\Configuration\Orig
    5.  Delete the file "WCFCONFIG" file


Dimension Lookup for both standard and Custom dimension in D365

Hi,  /// <summary>     /// Provides the look-up interaction for the individual dimension value lookup controls.     /// </summary&g...