USQL Unit testing with ADL tools for VS 2017 - Error after upgrading to 2.3.4000.x - testing

One of the team member after upgrading the ADL tools for VS to version 2.3.4000.x, getting the below error..
Error : (-1,-1) 'E_CSC_SYSTEM_INTERNAL: Internal error!
The ObjectManager found an invalid number of fixups.
This usually indicates a problem in the Formatter.'
Compile failed!
Tried to downgrade back to version ( 2.3.3000.2 ), it didn't help much.
If encountered similar issue, found the reason and resolved it, please share it.

After trying out few unsuccessful options, decided to clean up the files in USQLDataRoot including localrunmetadata and catalog folder. Still, when I submit a job to create a database, there was no error, but it didn’t create the database.
We had some powershell scripts to setup the database and other objects. Ran the powershell script, which created the database and procedures. Then we were able to run the tests successfully. One more thing to double check, make sure build platform is set to “x64”.

Related

I'm having trouble with extended entities

This question is related to I need help upgrading OroCommerce to 4.1.1.
I'm getting several errors related to extended entities... I believe there must be something wrong with cache building but I can't find the root cause (nor a solution :( ).
I checked the db structure in my production server against the VM where everything is working just fine and I can't see any significant difference (meaning the new fields such as digitalAsset_id for oro_attachment_file table or wysiwyg for oro_fallback_localization_val are there).
I just run an extra php bin/console oro:migration:load --force -e prod it didn't make a difference...
Edit:
Just checked the differences in the var/cache directory of both installations and in fact I see that the VM version has the methods that are missing from the prod one.
I uploaded the working code into the production server and re run the platform upgrade but I'm still running into issues.
In case oro:migration:load command (or oro:platform:update that actually triggers migration load) failed for the first time, you have to:
fix errors,
restore from the database dump
and run the command again.
Otherwise, there could be migrations that end up with errors,
but on the second run, they are not executed again, which could lead to the mess with the database schema, entity metadata, or entity config.
Also oro:migration:load command is not self-sufficient. There could be a need to warm up some entity configuration after the schema change. Please, try to run oro:platform:update, even if all the migrations are already executed, it would try to warm up all the caches and could fix an error.

Exception when starting Snapshot Agent when setting up database replication

I am trying to set up replication between databases. I followed this tutorials:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-preparing-the-server-for-replication?view=sql-server-ver15
and after:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-ver15
I went through first without any problems. Almost completed the second, but I stuck on step View the status of snapshot generation
When I try to strat snapshot agent, I get error:
Exception Message: An unspecified error had occurred in the native SQL Server connection component.
I tried to search on the internet MSSQL_REPL55012 (that's error code I get), but didn't succeed.
I tried to look in SQL Profiler, Jobs history, Replication Monitor, even ran failing job step from PowerShell, but couldn't get any more info on that.
What might be the issue? Anybody else stumbled upon that?
I am using:
SSMS version 15.0.18206.0
SQL Server engine 15.0.2000.5
I finally got it resolved. The issue was missing OLE DB driver.
I just downloaded latest driver. Then I got msoledbsqlr.rll driver in directory C:\Windows\SysWOW64\1033. Then I copied to C:\Program Files\Microsoft SQL Server\150\COM directory, so it can be found by snapshot.exe, which is executable run by Snapshot Agent.
Alternatvely, one can define environmental variable to point to C:\Windows\SysWOW64\1033 direcotry, so it will be found there.
Another issue might be that 64-bit SQL tries to use 32-bit drivers (msoledbsql.dll, msoledbsqlr.rll), but it wasn't issue in my case.
I know this question was answered but for future reference ,updating SQL server 2019 to latest CU solved for me.

SonarQube 5.6 - MSBuild Fakes Generation failing (SonarQube.Integration.targets)

I posted a similar question here.
Unfortunately, this issue is coming up again after having upgraded our build machines to run on Visual Studio Online 2015's Build and Release Manager.
This is the error that I get from a solution that generates Fakes assemblies used in unit testing:
D:\builds\TFS2015agent_2_work\1\.sonarqube\bin\targets\SonarQube.Integration.targets(240,5):
error MSB3491: Could not write lines to file "D:\builds\TFS2015agent_2_work\1\.sonarqube\out\\f_AnyCPU_Release_9840\FilesToAnalyze.txt".
The process cannot access the file 'D:\builds\TFS2015agent_2_work\1\.sonarqube\out\f_AnyCPU_Release_9840\FilesToAnalyze.txt' because it is being used by another process. [D:\builds\TFS2015agent_2_work\1\s\FakesFilePath\f.csproj] [D:\builds\TFS2015agent_2_work\1\s\FakesFileProj]
2016-09-13T20:01:37.6477261Z GENERATEFAKES : error : project compilation failed with exit code 1 [D:\builds\TFS2015agent_2_work\1\s\FakesFilePath\]
Does anyone have an idea of why this is happening? What process is causing the error? Could it possibly be related to the fakes compiling while SonarQube tries to access it?

nHibernate not creating Oracle driver in MSTests run on command line

I've been working on this particular issue for a couple weeks now, and I'm exceedingly frustrated. As such, I'll give all the information I can and hope for the best.
My team is working on building a new application. Here's the alphabet soup:
.Net 4.5.1
nHibernate 4.0.0.4000 with FluentNHibernate 2.0.3.0
Oracle 11g (Oracle.DataAccess 2.112.1.0, which has Copy Local set to true)
Visual Studio 2013 is the IDE
Windows 7 Professional
I am compiling the application as a 32-bit app, and I have confirmed that I have the 32bit version of Oracle installed.
We've written some tests for the NHibernate mappings, which we run through MSTest. When we run these through Visual Studio's test explorer, they all run properly and pass. The application itself also properly compiles and deploys as it should. We've verified the tests are running properly by checking the database between steps, so we're fairly sure that the tests themselves aren't the problem.
When we run MSTest through the command line though, we receive the following error:
Initialization method MyTests.Setup threw exception. NHibernate.HibernateException: NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.OracleDataClientDriver. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed..
I've tried reinstalling Oracle to no effect. I've tried checking the machine.config file for errors (as suggested in other posts here on SO) and found none.
Our Fluent configuration is as follows:
OracleDataClientConfiguration.Oracle10
.ConnectionString(connectionString)
.Driver("NHibernate.Driver.OracleDataClientDriver")
.ShowSql()
.FormatSql();
The code I'm running on the command line is the following:
(cd to the directory where the test .dll is)
>"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MSTest.exe" /testcontainer:MyTests.dll /test:UnitTests
I feel like I'm missing something here. Any ideas?
Update: Solution Found
So here's a weird one. I followed Fran's solution below and installed the Oracle.ManagedDataAccess package and changed the NHibernate driver in our configuration above to NHibernate.Driver.OracleManagedDataClientDriver. As per our quick comment-discussion, this lead to a new error:
Initialization method MyTests.Setup threw exception. NHibernate.HibernateException: NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.OracleManagedDataClientDriver. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider
Fran then lead me to another SO question which encouraged me to check the Oracle configuration piece by piece. What better way to do this than create a test?
var x = new OracleConnection(connectionString);
x.Open();
Assert.IsTrue(x.State == System.Data.ConnectionState.Open);
x.Close();
Assert.IsFalse(x.State == System.Data.ConnectionState.Open);
In my quick attempt to run this test, I ran the whole collection of UnitTests with the script I'd mentioned above. Low and behold, every test passes!
Doing my due diligence, try the following
I comment out that test, clean, rebuild, and run the script again. Failures.
I return to the old Oracle driver and add that new test in. Clean, Rebuild, Run. Failures.
Add back the new Oracle driver, make sure the new test is still in. Run tests OTHER than the new test. Passes.
For some reason, the combination of the new driver and explicitly referencing it in a test seems to have resolved the issue. I'm open for any theories as to why, but I bet that qualifies as a new question.
I would stop using the bit specific version of the oracle drivers and move to the managed driver (https://www.nuget.org/packages/Oracle.ManagedDataAccess/). It is bit agnostic, and doesn't require you to install the Oracle client at all.
I actually found the solution to the problem, and it all has to do with how the Oracle.DataAccess.dll file gets loaded at runtime (Disclosure: I work with wadeb on the same project).
It seems that Oracle.DataAccess.dll was being searched for in every location on the server except the build output folder in the Jenkins workspace, and as such was pulling the DLL file from the GAC.
One of the file paths used to find the DLL file is the folder in which the "current executable" is located. In our case, the "current executable" was mstest.exe. Copying the Oracle.DataAccess.dll file to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE did the trick.
Did it work. Yes.
Was it a hack? Absolutely -- but now it works without having to upgrade to the managed Oracle drivers.
Our servers weren't using an Oracle client that worked with the managed driver, and it wasn't acceptable to have a broken continuous integration build until servers get upgraded.
I have got just the same error and I switched my tests to x64 and it works like a charm now:

TestComplete Error "0x80070057 The parameter is incorrect." when executing ClickCell

I'm experiencing a problem that I could not find a solution for yet.
I use Test Complete to automate some GUI related scenarios for an app. I developed some scripts that were working at some point in the past. After a few months I got back and tried to run one of the scripts. The script failed with the following error while it was executing a ClickCell operation on a grid object.
An error occurred.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.
Technical information:
379 0x80070057 (The parameter is incorrect.) .
Tested object:
...
I executed the same script on another machine with another Test Complete installation and it worked. So I guess it's not the target app that is the problem.
I checked solutions on the web for this issue, but nothing worked. I cleaned up the temp files in all the locations I could find in this answer. The behavior was the same.
So I guess it might be something related with the Test Complete installation. I tried reinstalling it a few times, but it didn't do the trick.
I then used Dependency Walker (as suggested somewhere on the web) on testcomplete.exe and found that there are some dlls that are missing from the Bin directory of Test Complete. Could they generate this error? If yes, how can I get them? As I said, I already re-installed the app a few times.
Did anyone bump into this while working with Test Complete? Is there any .net temp location that I should clean?