Sonar error Fail to purge data with Sonar 3.7 and MS SQL - sql-server

I call from Jenkins the Sonar runner and then the following error occurs:
Fail to purge data [id=1]
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers.
### SQL: delete from dependencies where from_snapshot_id in
...
### Cause: java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers.
Does any one knows a workaround of this error (Sonar bug).

Indeed this is known issue which should be quickly fixed but for the time being there is no workaround : http://jira.codehaus.org/browse/SONAR-4586 expect to downgrade to SonarQube 3.6.

Related

Flink sql client throws ERROR when executing sql statment

env:
intel chip macbook air 2017 with macOS Monterey 12.5
flink 1.15
mysql 5.7
I'm trying to set up a demo to sync one table to another table in mysql. However, i encountered some issue when executing sql statement in FLINK SQL CLIENT.
Let's say there's a table named product in mysql. Then I start flink and sql client, "CREATE TABLE" and execute "select * from products". Terminal returned ERROR message which says [ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: io.debezium.relational.history.AbstractSchemaHistory
I downloaded debezium-core jar of most recent version and put it under lib path. Then it raised another error
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: io.debezium.relational.history.DatabaseHistory
I checked version 2.0.0 alpha and 2.0.0 beta, DatabaseHistory only appear in version alpha and AbstractSchemaHistory only appear in version beta.
If I put those two jar files into the lib path. I get [ERROR] Could not execute SQL statement. Reason:
java.lang.NoSuchFieldError: TOPIC_PREFIX
enter image description here
Is there anyone who could give me some advice, thanks in advance.

Error communicating between BxlServer and client

I have been trying to upgrade SQL server 2017 to run Python 3.7. We have installed CU28 and the product version is 14.0.3430.2 which includes the C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\PYTHON_SERVICES.3.7.
I have made sure all permissions are granted to the INSTANCENAME directory and pythonlauncher.config working directory is pointing to C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\MSSQL\ExtensibilityData and launchpad service account has permissions to this directory.
I have done all this as an upgrade twice and got various errors, and a clean install. The error I am getting is
Msg 39004, Level 16, State 20, Line 0
A 'Python' script error occurred during execution of 'sp_execute_external_script' with HRESULT 0x80004004.
Msg 39019, Level 16, State 2, Line 0
An external script error occurred:
Invalid BXL stream
error while running BxlServer: caught exception: Error communicating between BxlServer and client: 0x000000e8
HRESULT 0x000000e8 looks like INVALID_CANCEL_OF_FILE_OPEN
HRESULT 0x80004004 looks like E_ABORT
So no real clues what is wrong here. pythonlauncher.log does show the error;
[Error] Process::TryTerminate failed with error code: 5
Session 0E93E9D1-07A7-448A-8B1A-FCA5263A5F53 TryTerminate(1067) failed with 5
Error code 5 is ERROR_ACCESS_DENIED
Also got this warning
[Warning] StaleDirectoryCleaner() failed to delete C:\Program Files\Microsoft SQL Server\MSSQL14.INSTANCENAME\MSSQL\ExtensibilityData\FAMSQL17UAT01\8B97815A-E9EA-4FA0-98F3-0440D4180522 after 5 retries
So all up this looks there are still permission issues. Extremely frustrating as there is next to no help on this. Any help would be greatly appreciated.
UPDATE:
After another clean install - first checked Python 3.5.2 worked and it did. Upgraded to 3.7, and again got the same issue. A bit more digging around I find this...
The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/SERVERNAME.domain_name.com:INSTANCENAME ]
Login failed for user 'DOMAIN\SERVERNAME$'. Reason: Could not find a login matching the name provided.
We have a service account that is not part of the domain which is NT Service\MSSQL$INSTANCENAME. Why on this implementation expecting a windows authenticated user the same name as the server??? How can I go about remedy this?
I think what has happened is that MS have left debug code in their production release.
FURTHER UPDATE:
In the event log we are seeing
Faulting application:Python.exe: 3.7.1150.1013 Faulting module name:
pylink.pyd Faulting module path:c:\Program Files\Microsoft SQL
Server\MSSQL14.INSTANCENAME\PYTHON_SERVICES.3.7\lib\site-packages\revoscalepy\rxLibs\pylink.pyd
Microsoft have confirmed that this is a bug. Their work around is below.
It's CU27 and CU28 that 3.7 is broken in - so you could use CU26 and still use Python 3.7. That version started at CU22... so CU22-26 work fine.
Or - it's only the pylink.pyd that is broken - you can simply grab the pylink.pyd from a CU22-26 installation for Python 3.7, and swap it into your CU27/CU28 files. This workaround will work now, and will also not cause any issues going forward once the fix does come. That is, on your next update, it shouldn't interfere and it should all go smoothly.

Failed to create collection 'techproducts' due to: Underlying core creation failed while creating collection: techproducts

I just started to learn solr with official documentation and during the first exercise "Index Techproducts Example Data" I failed due to following error: " Failed to create collection 'techproducts' due to: Underlying core creation failed while creating collection: techproducts".
I tried to change java version from 13 to 8 but it didn't helped.
Here is link to the documentation: https://lucene.apache.org/solr/guide/8_5/solr-tutorial.html#exercise-1
Stacktrace from solr Admin console
Collection: techproducts operation: create failed:org.apache.solr.common.SolrException: Underlying core creation failed while creating collection: techproducts
at org.apache.solr.cloud.api.collections.CreateCollectionCmd.call(CreateCollectionCmd.java:304)
at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:263)
at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:504)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:210)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I had run into similar situation while following Solr
's official tutorial as following
➜ solr-8.7.0 ERROR: Failed to create collection 'techproducts' due to: Underlying core creation failed while creating collection: techproducts
And problem solved my turning off my vpn. I guess the vpn routing probably messed up with solr's localhost setting somehow.
I had the same Underlying core creation failed... error too. Using Java 11, Windows 10.
The log file was ${solr-home}\example\cloud\node1\logs\solr.log. Inside it had:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://192.168.1.16:7574/solr: Error CREATEing SolrCore 'techproducts_shard1_replica_n1': Unable to create core [techproducts_shard1_replica_n1] Caused by: no segments* file found in LockValidatingDirectoryWrapper(NRTCachingDirectory(MMapDirectory#{solr_home}\example\cloud\node2\solr\techproducts_shard1_replica_n1\data\index lockFactory=org.apache.lucene.store.NativeFSLockFactory#16326253; maxCacheMB=48.0 maxMergeSizeMB=4.0)): files: [write.lock] at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:681) ~[?:?]
at (etc. etc.)e
But this was the second time I launched solr. The first time it timed out trying to contact one of the nodes and the tutorial script aborted. But the nodes were still running. I killed them off using the windows task manager and not by using solr stop. So I suspect I left an instable mess behind and the second time the tutorial ran it crashed into this mess.
I erased everything and started over from unzipping and this third time there were no timeouts and the tutorial completed without error.
File: /opt/solr/server/etc/jetty.xml
(1) Name="requestHeaderSize" set Property name "solr.jetty.request.header.size" default="81920"
(2) Name="responseHeaderSize"> set Property name="solr.jetty.response.header.size" default="81920"
(3) Restart Solr
Hm, tried this, still getting the exact same error.
After Change:
[Set name="requestHeaderSize"][Property name="solr.jetty.request.header.size" default="81920" /][/Set]
[Set name="responseHeaderSize"][Property name="solr.jetty.response.header.size" default="81920" /][/Set]
I stopped everything and retried, then I had Windows Firewall prompt me for 'SAP Machine' authorization for java 11 message, I accepted it, and retried. Then it worked. Seems Windows Firewall related.

Liquibase diff gives constraint error

I get this error when I try with both command line and Maven invocations:
Diff Results:
Unexpected error running Liquibase: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Unknown constraint type: 3
This is using a SQL Server DB. Created both the reference and target using liquibase:update.
Properties:
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:11433;databaseName=DB
username=user
password=pass
referenceUrl=jdbc:sqlserver://localhost:11433;databaseName=DBRef
referenceUsername=user
referencePassword=pass
We use a combination of Liquibase/MS-SQL database and had a similar issue when we recently upgraded our driver to Microsoft's latest release (6.4.0.jre8).
As #SteveDonie says in his comment, the issue is with "oldish" version of liquibase and "newish" version of MS-SQL driver. Details behind the reason for this problem can be found in this liquibase JIRA case:
https://liquibase.jira.com/browse/CORE-3141
To solve this, we tried upgrading the liquibase version to the latest as on date (3.6.1) and it works!! You may also try to downgrade the version of your MS-SQL driver, but I would say that isn't a good option - it's better to upgrade than downgrade unless you've some pressing needs to that.

Not able to trigger JiraTestResultReporter plugin on Post Build Action in Jenkins

I want to log defects automatic on jira whenever any test case gets fail.for that i have used JiraTesttResultReport plugin.i have successfully able to create my report.xml file.but i got below errors:
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
[JiraTestResultReporter] [INFO] Examining test results...
ERROR: Publisher JiraTestResultReporter.JiraReporter aborted due to exception
java.lang.NoSuchMethodError: hudson.model.AbstractBuild.getTestResultAction()Lhudson/tasks/test/AbstractTestResultAction;
at JiraTestResultReporter.JiraReporter.perform(JiraReporter.java:105)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
On what version of Jenkins are you working?
JiraTestResultReporter does not work on Jenkins 1.577+
It's a known bug
A workaround is to build and install a snapshot of the plugin.

Resources