Explore all TLS open source software, libraries, packages, source code, cloud functions and APIs.

Popular New Releases in TLS

mkcert

Cleaned up EKUs

v2rayN

acme.sh

bug fixes

cert-manager

v1.5.5

acme-companion

v2.2.1

Popular Libraries in TLS

mkcert

by FiloSottile doticongodoticon

star image 31612 doticonBSD-3-Clause

A simple zero-config tool to make locally trusted development certificates with any names you'd like.

v2rayN

by 2dust doticoncsharpdoticon

star image 27782 doticonGPL-3.0

A V2Ray client for Windows, support Xray core and v2fly core

acme.sh

by acmesh-official doticonshelldoticon

star image 25259 doticonGPL-3.0

A pure Unix shell script implementing ACME client protocol

nginxconfig.io

by digitalocean doticonjavascriptdoticon

star image 15473 doticonMIT

⚙️ NGINX config generator on steroids 💉

v2ray

by 233boy doticonshelldoticon

star image 14638 doticon

最好用的 V2Ray 一键安装脚本 & 管理脚本

cert-manager

by jetstack doticongodoticon

star image 8291 doticonApache-2.0

Automatically provision and manage TLS certificates in Kubernetes

Xray_onekey

by wulabing doticonshelldoticon

star image 6725 doticon

Xray 基于 Nginx 的 VLESS + XTLS 一键安装脚本

acme-companion

by nginx-proxy doticonshelldoticon

star image 6514 doticonMIT

Automated ACME SSL certificate generation for nginx-proxy

cfssl

by cloudflare doticongodoticon

star image 6138 doticonBSD-2-Clause

CFSSL: Cloudflare's PKI and TLS toolkit

Trending New libraries in TLS

hooker

by CreditTone doticonjavascriptdoticon

star image 1311 doticonApache-2.0

🔥🔥hooker是一个基于frida实现的逆向工具包。为逆向开发人员提供统一化的脚本包管理方式、通杀脚本、自动化生成hook脚本、内存漫游探测activity和service、firda版JustTrustMe、disable ssl pinning

one_click_script

by jinwyp doticonshelldoticon

star image 983 doticonMIT

一键安装 trojan v2ray xray. Install v2ray / xray (VLESS) and trojan (trojan-go) script

ssh-mitm

by ssh-mitm doticonpythondoticon

star image 827 doticonGPL-3.0

ssh mitm server for security audits supporting public key authentication, session hijacking and file manipulation

ligolo

by sysdream doticongodoticon

star image 643 doticonGPL-3.0

Reverse Tunneling made easy for pentesters, by pentesters https://sysdream.com/

fulcio

by sigstore doticongodoticon

star image 268 doticonNOASSERTION

Sigstore OIDC PKI

MEDUZA

by kov4l3nko doticonpythondoticon

star image 258 doticonGPL-3.0

A more or less universal SSL unpinning tool for iOS

snuffy

by alessandrod doticonrustdoticon

star image 238 doticon

Snuffy is a simple command line tool to inspect SSL/TLS data.

tls-shunt-proxy

by liberal-boy doticongodoticon

star image 229 doticon

分流 TLS 流量,支持按 sni 分流,分流 http 和无特征流量

Mitigating-Obsolete-TLS

by nsacyber doticonpowershelldoticon

star image 209 doticonNOASSERTION

Guidance for mitigating obsolete Transport Layer Security configurations. #nsacyber

Top Authors in TLS

1

PeculiarVentures

14 Libraries

star icon1487

2

google

12 Libraries

star icon5218

3

wolfSSL

9 Libraries

star icon1956

4

smallstep

8 Libraries

star icon7309

5

mozilla

8 Libraries

star icon3437

6

cloudflare

7 Libraries

star icon7226

7

sipcapture

6 Libraries

star icon158

8

tintinweb

6 Libraries

star icon545

9

rometools

6 Libraries

star icon43

10

SSLMate

6 Libraries

star icon701

1

14 Libraries

star icon1487

2

12 Libraries

star icon5218

3

9 Libraries

star icon1956

4

8 Libraries

star icon7309

5

8 Libraries

star icon3437

6

7 Libraries

star icon7226

7

6 Libraries

star icon158

8

6 Libraries

star icon545

9

6 Libraries

star icon43

10

6 Libraries

star icon701

Trending Kits in TLS

No Trending Kits are available at this moment for TLS

Trending Discussions on TLS

TLS v1.2 Cipher Suites in .NET 6 / GET Request Timeout

Azure Pipelines local agent failing to connect with SSL error

Fixing git HTTPS Error: "bad key length" on macOS 12

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher

nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing

Unable to log egress traffic HTTP requests with the istio-proxy

How to force TLS 1.2 usage for PhpMailer 5.2

Error Importing "mongodb" with typescript

Find the missing module

vvv.test not loading (nor any of my sites) when running vagrant up

QUESTION

TLS v1.2 Cipher Suites in .NET 6 / GET Request Timeout

Asked 2022-Mar-30 at 12:52

I am currently trying to connect to an AWS REST API which requires at least TLS v1.2. The documentation stats that clients must also support cipher suites with perfect forward secrecy (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE).

When sending a GET request using the HttpClient, the connection simply times out. I have set the TLS version explicitely to TLSv1.2 like this:

1httpClientHandler.SslProtocols = SslProtocols.Tls12;
2

This works, I can see in the Wireshark trace that the correct TLS version is used. I have also confirmed that there is no firewall issue or similar.

Working Example (CURL)

When using cURL, I can see that the cipher suite in the Sever Hello response is TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030), which is also what the server requires.

enter image description here

Broken Example (.NET 6 with HttpClient)

When using the HttpClient in .NET 6, the above mentioned cipher suite is offered in the Client Hello, but the server response uses all of a sudden TLS_RSA_WITH_AES_256_GCM_SHA384:

enter image description here

I can see that there are additional extensions in the cURL request, for example Extension: psk_key_exchange_modes. Are there any explanations for why the server does not except the first cipher suite? From my understanding, the first offered cipher suite should be the preferred one, is that correct?

Is there a way to force a certain cipher suite in .NET 6?

This is the example I use to reproduce the issue:

1httpClientHandler.SslProtocols = SslProtocols.Tls12;
2public async void PollUrl(string url)
3{
4    HttpResponseMessage msg = new HttpResponseMessage();
5
6    ServicePointManager.Expect100Continue = true;
7    ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
8
9    using HttpClientHandler httpClientHandler = new();
10
11    httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, sslPolicyErrors) => true;
12    httpClientHandler.SslProtocols = SslProtocols.Tls12;
13
14    using HttpClient client = new(httpClientHandler);
15
16    // This content type is required for the API call
17    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
18
19    try
20    {
21        client.Timeout = TimeSpan.FromSeconds(5);
22        msg = await client.GetAsync(url);
23    }
24    catch (Exception e)
25    {
26        Console.WriteLine(e);
27    }
28
29    string stringValue = await msg.Content.ReadAsStringAsync();
30    Console.WriteLine(stringValue);
31}
32

The application is running on Server 2016.

ANSWER

Answered 2022-Mar-30 at 12:52

We finally found the reason for this. Windows did not have the required cypher suites enabled. We have used IISCrypto to enable the corresponding cypher suites and all is ok now.

It looks like it's possible to force .NET to TLS 1.2, even though it was not enabled on the server itself.

Source https://stackoverflow.com/questions/70338951

QUESTION

Azure Pipelines local agent failing to connect with SSL error

Asked 2022-Mar-29 at 19:29

We have an on premise server (Windows Server 2012 R2) with an Azure Pipelines agent running on it. Today (31st Jan 2022) this agent could not longer connect to our Azure DevOps organisation.

Log file of azure agent

Judging by the log files, I assume this is because it is trying to connect with an older TLS version, which as of today is no longer available - https://devblogs.microsoft.com/devops/azure-devops-services-to-require-tls-1-2/

So I followed the instructions on how to make sure TLS 1.2 was enabled, and confirmed my settings in the registry editor and by running the PowerShell script suggested here - https://docs.microsoft.com/en-us/security/engineering/solving-tls1-problem#update-windows-powershell-scripts-or-related-registry-settings

All seems ok, yet it still fails to connect with the same issue. The machine has been restarted as well. If I try the URL it is requesting in the in built Internet Explorer browser, it fails, but with Chrome it succeeds, so it must still be trying to connect with TLS 1.2, but I don't know why. I've tried reinstalling the agent (with the latest build) as well but it fails on the same error. Any suggestions?

ANSWER

Answered 2022-Jan-31 at 23:27

Enabling below Cyphers with IISCrypto on the server helped us fix the issue

Cipher Suites

TLS 1.2 (suites in server-preferred order) TLS

  • _DHE_RSA_WITH_AES_256_GCM_SHA384 (0x9f) DH 2048 bits FS 256 TLS
  • DHE_RSA_WITH_AES_128_GCM_SHA256 (0x9e) DH 2048 bits FS 128

This from Vijay's solution

Source https://stackoverflow.com/questions/70929356

QUESTION

Fixing git HTTPS Error: "bad key length" on macOS 12

Asked 2022-Mar-29 at 17:34

I am using a company-hosted (Bitbucket) git repository that is accessible via HTTPS. Accessing it (e.g. git fetch) worked using macOS 11 (Big Sur), but broke after an update to macOS 12 Monterey. *

After the update of macOS to 12 Monterey my previous git setup broke. Now I am getting the following error message:

1$ git fetch
2fatal: unable to access 'https://.../':
3error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
4

For what it's worth, using curl does not work either:

1$ git fetch
2fatal: unable to access 'https://.../':
3error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
4$ curl --insecure -L -v https://...
5*   Trying ...
6* Connected to ... (...) port 443 (#0)
7* ALPN, offering h2
8* ALPN, offering http/1.1
9* successfully set certificate verify locations:
10*  CAfile: /etc/ssl/cert.pem
11*  CApath: none
12* TLSv1.2 (OUT), TLS handshake, Client hello (1):
13* TLSv1.2 (IN), TLS handshake, Server hello (2):
14* TLSv1.2 (IN), TLS handshake, Certificate (11):
15* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
16* TLSv1.2 (IN), TLS handshake, Server finished (14):
17* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
18* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
19* TLSv1.2 (OUT), TLS handshake, Finished (20):
20* error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
21* Closing connection 0
22curl: (35) error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
23

Accessing the same HTTPS-source via Safari or Firefox works.

As far as I understand, the underlying error "bad key length" error is coming from OpenSSL/LibreSSL, this would be consistent with both git and curl failing after an OS upgrade.

This is the output from openssl:

1$ git fetch
2fatal: unable to access 'https://.../':
3error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
4$ curl --insecure -L -v https://...
5*   Trying ...
6* Connected to ... (...) port 443 (#0)
7* ALPN, offering h2
8* ALPN, offering http/1.1
9* successfully set certificate verify locations:
10*  CAfile: /etc/ssl/cert.pem
11*  CApath: none
12* TLSv1.2 (OUT), TLS handshake, Client hello (1):
13* TLSv1.2 (IN), TLS handshake, Server hello (2):
14* TLSv1.2 (IN), TLS handshake, Certificate (11):
15* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
16* TLSv1.2 (IN), TLS handshake, Server finished (14):
17* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
18* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
19* TLSv1.2 (OUT), TLS handshake, Finished (20):
20* error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
21* Closing connection 0
22curl: (35) error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length
23$ openssl s_client -servername ... -connect ...:443
24CONNECTED(00000005)
25depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2
26verify return:1
27depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = Thawte TLS RSA CA G1
28verify return:1
29depth=0 ...
304593010348:error:06FFF089:digital envelope routines:CRYPTO_internal:bad key length:
31/System/Volumes/Data/SWE/macOS/BuildRoots/b8ff8433dc/Library/Caches/com.apple.xbs
32/Sources/libressl/libressl-75/libressl-2.8/crypto/apple/hmac/hmac.c:188:
33---
34Certificate chain
35 ...
36---
37No client certificate CA names sent
38Server Temp Key: DH, 2048 bits
39---
40SSL handshake has read 4105 bytes and written 318 bytes
41---
42New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-GCM-SHA384
43Server public key is 4096 bit
44Secure Renegotiation IS supported
45Compression: NONE
46Expansion: NONE
47No ALPN negotiated
48SSL-Session:
49    Protocol  : TLSv1.2
50    Cipher    : DHE-RSA-AES256-GCM-SHA384
51    Session-ID: 1FA062DC9EEC9A310FF8231F1EB11A3BD6E0778F7AB6E98EAD1020A44CF1A407
52    Session-ID-ctx:
53    Master-Key:
54    Start Time: 1635319904
55    Timeout   : 7200 (sec)
56    Verify return code: 0 (ok)
57---
58
59

I did try to add the server's certificates into a custom pem file and setting http.sslCAInfo, but that didn't work. As a workaround, I am currently using a proxy that decrypts/re-encrypts HTTPS traffic.

How do I configure git (or all LibreSSL users) to accept the server's certificate?

ANSWER

Answered 2021-Nov-02 at 07:12

Unfortunately I can't provide you with a fix, but I've found a workaround for that exact same problem (company-hosted bitbucket resulting in exact same error). I also don't know exactly why the problem occurs, but my best guess would be that the libressl library shipped with Monterey has some sort of problem with specific (?TLSv1.3) certs. This guess is because the brew-installed openssl v1.1 and v3 don't throw that error when executed with /opt/homebrew/opt/openssl/bin/openssl s_client -connect ...:443

To get around that error, I've built git from source built against different openssl and curl implementations:

  1. install autoconf, openssl and curl with brew (I think you can select the openssl lib you like, i.e. v1.1 or v3, I chose v3)
  2. clone git version you like, i.e. git clone --branch v2.33.1 https://github.com/git/git.git
  3. cd git
  4. make configure (that is why autoconf is needed)
  5. execute LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib -L/opt/homebrew/opt/curl/lib" CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include -I/opt/homebrew/opt/curl/include" ./configure --prefix=$HOME/git (here LDFLAGS and CPPFLAGS include the libs git will be built against, the right flags are emitted by brew on install success of curl and openssl; --prefix is the install directory of git, defaults to /usr/local but can be changed)
  6. make install
  7. ensure to add the install directory's subfolder /bin to the front of your $PATH to "override" the default git shipped by Monterey
  8. restart terminal
  9. check that git version shows the new version

This should help for now, but as I already said, this is only a workaround, hopefully Apple fixes their libressl fork ASAP.

Source https://stackoverflow.com/questions/69734654

QUESTION

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher

Asked 2022-Mar-22 at 09:17

I am getting this warning from github on my npm project build process... I tried searching on the internet and also read the blog link posted by github - but I could not find the solution to it anywhere. Am I missing something ?

Warning seen

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/

ANSWER

Answered 2021-Sep-10 at 15:18

Besides updating your version of node to an active or current LTS you want to ensure your NPM registry is set to an HTTPS endpoint:

1registry=https://registry.npmjs.org/
2

Source https://stackoverflow.com/questions/69044064

QUESTION

nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing

Asked 2022-Feb-11 at 22:39

This worked fine for me be building under Java 8. Now under Java 17.01 I get this when I do mvn deploy.

mvn install works fine. I tried 3.6.3 and 3.8.4 and updated (I think) all my plugins to the newest versions.

Any ideas?

1[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
2ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
3
4
5[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
6[ERROR]
7[ERROR] -----------------------------------------------------
8[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
9[ERROR] -> [Help 1]
10org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
11type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
12
13Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
14atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
15

POM:

1[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
2ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
3
4
5[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
6[ERROR]
7[ERROR] -----------------------------------------------------
8[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
9[ERROR] -> [Help 1]
10org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
11type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
12
13Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
14atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
15<?xml version="1.0" encoding="UTF-8"?>
16<project xmlns="http://maven.apache.org/POM/4.0.0"
17         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19    <modelVersion>4.0.0</modelVersion>
20
21    <groupId>io.github.sproket</groupId>
22    <artifactId>persism</artifactId>
23    <version>2.0.0</version>
24    <packaging>jar</packaging>
25
26
27    <build>
28        <sourceDirectory>./src</sourceDirectory>
29        <testSourceDirectory>./test</testSourceDirectory>
30        <testResources>
31            <testResource>
32                <directory>./test</directory>
33                <!--                <includes>-->
34                <!--                    <include>*.*</include>-->
35                <!--                </includes>-->
36            </testResource>
37        </testResources>
38        <plugins>
39            <plugin>
40                <groupId>org.apache.maven.plugins</groupId>
41                <artifactId>maven-compiler-plugin</artifactId>
42                <version>3.8.1</version>
43                <!-- MSSQL does not seem to able to connect with 16 -->
44                <configuration>
45                    <source>17</source>
46                    <target>17</target>
47<!--                    <compilerArgs>-->
48<!--                        <arg>-parameters</arg>-->
49<!--                    </compilerArgs>-->
50                </configuration>
51            </plugin>
52
53            <plugin>
54                <groupId>org.apache.maven.plugins</groupId>
55                <artifactId>maven-jar-plugin</artifactId>
56                <version>3.2.0</version>
57                <configuration>
58                    <archive>
59                        <manifestEntries>
60                            <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
61                        </manifestEntries>
62                    </archive>
63                </configuration>
64            </plugin>
65
66            <plugin>
67                <groupId>org.apache.maven.plugins</groupId>
68                <artifactId>maven-source-plugin</artifactId>
69                <version>3.2.1</version>
70                <executions>
71                    <execution>
72                        <id>attach-sources</id>
73                        <goals>
74                            <goal>jar-no-fork</goal>
75                        </goals>
76                    </execution>
77                </executions>
78            </plugin>
79            <plugin>
80                <groupId>org.apache.maven.plugins</groupId>
81                <artifactId>maven-javadoc-plugin</artifactId>
82                <version>3.2.0</version>
83                <configuration>
84                    <excludePackageNames>net.sf.persism.log*;net.sf.persism.logging.*</excludePackageNames>
85                    <source>17</source>
86                </configuration>
87                <executions>
88                    <execution>
89                        <id>attach-javadocs</id>
90                        <goals>
91                            <goal>jar</goal>
92                        </goals>
93                    </execution>
94                </executions>
95            </plugin>
96            <plugin>
97                <artifactId>maven-surefire-plugin</artifactId>
98                <version>3.0.0-M5</version>
99                <configuration>
100                    <excludedGroups>net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
101                    </excludedGroups>
102                </configuration>
103            </plugin>
104            <plugin>
105                <groupId>org.sonatype.plugins</groupId>
106                <artifactId>nexus-staging-maven-plugin</artifactId>
107                <version>1.6.8</version>
108                <extensions>true</extensions>
109                <configuration>
110                    <serverId>ossrh</serverId>
111                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
112                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
113                </configuration>
114            </plugin>
115
116        </plugins>
117    </build>
118
119    <name>persism</name>
120    <description>A zero ceremony ORM for Java</description>
121    <url>https://github.com/sproket/Persism</url>
122
123    <properties>
124        <java.version>17</java.version>
125        <maven.compiler.release>17</maven.compiler.release>
126        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
127    </properties>
128
129    <licenses>
130        <license>
131            <name>BSD-3-Clause License</name>
132            <url>https://github.com/sproket/Persism/blob/master/license.txt</url>
133        </license>
134    </licenses>
135
136    <developers>
137        <developer>
138            <name>Dan Howard</name>
139            <email>--------------------------</email>
140            <organization>io.github</organization>
141            <organizationUrl>https://sproket.github.io/Persism/</organizationUrl>
142        </developer>
143    </developers>
144
145    <distributionManagement>
146        <snapshotRepository>
147            <id>ossrh</id>
148            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
149        </snapshotRepository>
150        <repository>
151            <id>ossrh</id>
152            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
153        </repository>
154    </distributionManagement>
155
156    <scm>
157        <connection>scm:git:git://github.com/sproket/Persism.git</connection>
158        <developerConnection>scm:git:ssh://github.com/sproket/Persism.git</developerConnection>
159        <url>https://github.com/sproket/Persism</url>
160    </scm>
161
162    <profiles>
163        <profile>
164            <id>include-test-containers-db</id>
165            <activation>
166                <activeByDefault>false</activeByDefault>
167            </activation>
168            <build>
169                <plugins>
170                    <plugin>
171                        <artifactId>maven-surefire-plugin</artifactId>
172                        <version>3.0.0-M5</version>
173                        <configuration>
174                            <excludedGroups>net.sf.persism.categories.ExternalDB</excludedGroups>
175                        </configuration>
176                    </plugin>
177                </plugins>
178            </build>
179        </profile>
180
181        <profile>
182            <id>exclude-test-containers-db</id>
183            <activation>
184                <activeByDefault>false</activeByDefault>
185            </activation>
186            <build>
187                <plugins>
188                    <plugin>
189                        <artifactId>maven-surefire-plugin</artifactId>
190                        <version>3.0.0-M5</version>
191                        <configuration>
192                            <excludedGroups>net.sf.persism.categories.TestContainerDB</excludedGroups>
193                        </configuration>
194                    </plugin>
195                </plugins>
196            </build>
197        </profile>
198
199        <profile>
200            <id>release</id>
201            <build>
202                <plugins>
203                    <plugin>
204                        <groupId>org.apache.maven.plugins</groupId>
205                        <artifactId>maven-jar-plugin</artifactId>
206                        <version>3.2.0</version>
207                        <configuration>
208                            <archive>
209                                <manifestEntries>
210                                    <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
211                                </manifestEntries>
212                            </archive>
213                        </configuration>
214                    </plugin>
215                    <plugin>
216                        <groupId>org.apache.maven.plugins</groupId>
217                        <artifactId>maven-source-plugin</artifactId>
218                        <version>3.2.1</version>
219                        <executions>
220                            <execution>
221                                <id>attach-sources</id>
222                                <goals>
223                                    <goal>jar-no-fork</goal>
224                                </goals>
225                            </execution>
226                        </executions>
227                    </plugin>
228                    <plugin>
229                        <groupId>org.apache.maven.plugins</groupId>
230                        <artifactId>maven-javadoc-plugin</artifactId>
231                        <version>3.2.0</version>
232                        <executions>
233                            <execution>
234                                <id>attach-javadocs</id>
235                                <goals>
236                                    <goal>jar</goal>
237                                </goals>
238                                <configuration>
239                                    <release>17</release>
240                                </configuration>
241                            </execution>
242                        </executions>
243                    </plugin>
244                    <plugin>
245                        <groupId>org.apache.maven.plugins</groupId>
246                        <artifactId>maven-gpg-plugin</artifactId>
247                        <version>3.0.1</version>
248                        <executions>
249                            <execution>
250                                <id>sign-artifacts</id>
251                                <phase>verify</phase>
252                                <goals>
253                                    <goal>sign</goal>
254                                </goals>
255                            </execution>
256                        </executions>
257                    </plugin>
258                </plugins>
259            </build>
260        </profile>
261    </profiles>
262
263
264    <dependencies>
265        <dependency>
266            <groupId>junit</groupId>
267            <artifactId>junit</artifactId>
268            <version>4.13.2</version>
269            <scope>test</scope>
270        </dependency>
271        <dependency>
272            <groupId>com.carrotsearch</groupId>
273            <artifactId>junit-benchmarks</artifactId>
274            <version>0.7.2</version>
275            <scope>test</scope>
276        </dependency>
277        <dependency>
278            <groupId>org.testcontainers</groupId>
279            <artifactId>testcontainers</artifactId>
280            <version>1.15.2</version>
281            <scope>test</scope>
282        </dependency>
283        <dependency>
284            <groupId>ch.qos.logback</groupId>
285            <artifactId>logback-classic</artifactId>
286            <version>1.2.7</version>
287            <scope>provided</scope>
288        </dependency>
289
290        <dependency>
291            <groupId>log4j</groupId>
292            <artifactId>log4j</artifactId>
293            <version>1.2.17</version>
294            <scope>provided</scope>
295        </dependency>
296
297        <dependency>
298            <groupId>org.apache.logging.log4j</groupId>
299            <artifactId>log4j-api</artifactId>
300            <version>2.14.1</version>
301            <scope>provided</scope>
302        </dependency>
303        <dependency>
304            <groupId>org.apache.logging.log4j</groupId>
305            <artifactId>log4j-core</artifactId>
306            <version>2.14.1</version>
307            <scope>provided</scope>
308        </dependency>
309
310
311        <dependency>
312            <groupId>commons-dbcp</groupId>
313            <artifactId>commons-dbcp</artifactId>
314            <version>1.4</version>
315            <scope>test</scope>
316        </dependency>
317
318        <dependency>
319            <groupId>org.firebirdsql.jdbc</groupId>
320            <artifactId>jaybird</artifactId>
321            <version>4.0.2.java8</version>
322            <scope>test</scope>
323        </dependency>
324
325        <dependency>
326            <groupId>org.firebirdsql</groupId>
327            <artifactId>firebird-testcontainers-java</artifactId>
328            <version>1.1.0</version>
329            <scope>test</scope>
330        </dependency>
331
332        <dependency>
333            <groupId>com.h2database</groupId>
334            <artifactId>h2</artifactId>
335            <version>1.4.200</version>
336            <scope>test</scope>
337        </dependency>
338
339        <dependency>
340            <!-- using older version as 2.5.1 collides with ucanaccess -->
341            <groupId>org.hsqldb</groupId>
342            <artifactId>hsqldb</artifactId>
343            <version>2.5.1</version>
344            <scope>test</scope>
345            <!--            <classifier>debug</classifier>-->
346        </dependency>
347
348        <dependency>
349            <groupId>org.apache.derby</groupId>
350            <artifactId>derby</artifactId>
351            <version>10.8.2.2</version>
352            <scope>test</scope>
353        </dependency>
354
355        <!-- OR -Djdk.tls.client.protocols=TLSv1 -->
356        <dependency>
357            <groupId>com.microsoft.sqlserver</groupId>
358            <artifactId>mssql-jdbc</artifactId>
359            <version>8.4.1.jre8</version>
360            <scope>test</scope>
361        </dependency>
362
363        <dependency>
364            <groupId>org.testcontainers</groupId>
365            <artifactId>mssqlserver</artifactId>
366            <version>1.15.2</version>
367            <scope>test</scope>
368        </dependency>
369
370        <dependency>
371            <groupId>mysql</groupId>
372            <artifactId>mysql-connector-java</artifactId>
373            <version>8.0.23</version>
374            <scope>test</scope>
375        </dependency>
376
377        <dependency>
378            <groupId>org.testcontainers</groupId>
379            <artifactId>mysql</artifactId>
380            <version>1.15.2</version>
381            <scope>test</scope>
382        </dependency>
383
384        <dependency>
385            <groupId>net.sourceforge.jtds</groupId>
386            <artifactId>jtds</artifactId>
387            <version>1.3.1</version>
388            <scope>test</scope>
389        </dependency>
390
391        <dependency>
392            <groupId>com.oracle.database.jdbc</groupId>
393            <artifactId>ojdbc8</artifactId>
394            <version>21.3.0.0</version>
395            <scope>test</scope>
396        </dependency>
397
398        <!--        <dependency>-->
399        <!--            <groupId>com.oracle</groupId>-->
400        <!--            <artifactId>ojdbc6</artifactId>-->
401        <!--            <version>11.2.0.4</version>-->
402        <!--            <scope>test</scope>-->
403        <!--        </dependency>-->
404
405        <dependency>
406            <groupId>org.postgresql</groupId>
407            <artifactId>postgresql</artifactId>
408            <version>9.2-1004-jdbc41</version>
409            <scope>test</scope>
410        </dependency>
411        <dependency>
412            <groupId>org.testcontainers</groupId>
413            <artifactId>postgresql</artifactId>
414            <version>1.15.2</version>
415            <scope>test</scope>
416        </dependency>
417
418        <dependency>
419            <groupId>org.xerial</groupId>
420            <artifactId>sqlite-jdbc</artifactId>
421            <version>3.34.0</version>
422            <scope>test</scope>
423        </dependency>
424
425        <dependency>
426            <groupId>net.sf.ucanaccess</groupId>
427            <artifactId>ucanaccess</artifactId>
428            <version>5.0.1</version>
429            <scope>test</scope>
430        </dependency>
431
432        <dependency>
433            <groupId>com.ibm.informix</groupId>
434            <artifactId>informix-jdbc-complete</artifactId>
435            <version>4.50.4.1</version>
436            <scope>test</scope>
437        </dependency>
438
439        <dependency>
440            <groupId>com.toddfast.typeconverter</groupId>
441            <artifactId>typeconverter</artifactId>
442            <version>1.0</version>
443            <scope>test</scope>
444        </dependency>
445
446        <dependency>
447            <groupId>org.reflections</groupId>
448            <artifactId>reflections</artifactId>
449            <version>0.9.11</version>
450            <scope>test</scope>
451        </dependency>
452
453        <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
454        <dependency>
455            <groupId>javax.persistence</groupId>
456            <artifactId>javax.persistence-api</artifactId>
457            <version>2.2</version>
458            <scope>test</scope>
459        </dependency>
460
461
462        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
463        <!-- DOES NOT WORK with JAVA 8 + -->
464        <!--        <dependency>-->
465        <!--            <groupId>org.codehaus.mojo</groupId>-->
466        <!--            <artifactId>cobertura-maven-plugin</artifactId>-->
467        <!--            <version>2.7</version>-->
468        <!--            <scope>test</scope>-->
469        <!--            <exclusions>-->
470        <!--                <exclusion>-->
471        <!--                    <groupId>com.sun</groupId>-->
472        <!--                    <artifactId>tools</artifactId>-->
473        <!--                </exclusion>-->
474        <!--            </exclusions>-->
475        <!--        </dependency>-->
476
477
478    </dependencies>
479
480</project>
481

ANSWER

Answered 2022-Feb-11 at 22:39

Update: Version 1.6.9 has been released and should fix this issue! 🎉


This is actually a known bug, which is now open for quite a while: OSSRH-66257. There are two known workarounds:

1. Open Modules

As a workaround, use --add-opens to give the library causing the problem access to the required classes:

1[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
2ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
3
4
5[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
6[ERROR]
7[ERROR] -----------------------------------------------------
8[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
9[ERROR] -> [Help 1]
10org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
11type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
12
13Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
14atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
15<?xml version="1.0" encoding="UTF-8"?>
16<project xmlns="http://maven.apache.org/POM/4.0.0"
17         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19    <modelVersion>4.0.0</modelVersion>
20
21    <groupId>io.github.sproket</groupId>
22    <artifactId>persism</artifactId>
23    <version>2.0.0</version>
24    <packaging>jar</packaging>
25
26
27    <build>
28        <sourceDirectory>./src</sourceDirectory>
29        <testSourceDirectory>./test</testSourceDirectory>
30        <testResources>
31            <testResource>
32                <directory>./test</directory>
33                <!--                <includes>-->
34                <!--                    <include>*.*</include>-->
35                <!--                </includes>-->
36            </testResource>
37        </testResources>
38        <plugins>
39            <plugin>
40                <groupId>org.apache.maven.plugins</groupId>
41                <artifactId>maven-compiler-plugin</artifactId>
42                <version>3.8.1</version>
43                <!-- MSSQL does not seem to able to connect with 16 -->
44                <configuration>
45                    <source>17</source>
46                    <target>17</target>
47<!--                    <compilerArgs>-->
48<!--                        <arg>-parameters</arg>-->
49<!--                    </compilerArgs>-->
50                </configuration>
51            </plugin>
52
53            <plugin>
54                <groupId>org.apache.maven.plugins</groupId>
55                <artifactId>maven-jar-plugin</artifactId>
56                <version>3.2.0</version>
57                <configuration>
58                    <archive>
59                        <manifestEntries>
60                            <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
61                        </manifestEntries>
62                    </archive>
63                </configuration>
64            </plugin>
65
66            <plugin>
67                <groupId>org.apache.maven.plugins</groupId>
68                <artifactId>maven-source-plugin</artifactId>
69                <version>3.2.1</version>
70                <executions>
71                    <execution>
72                        <id>attach-sources</id>
73                        <goals>
74                            <goal>jar-no-fork</goal>
75                        </goals>
76                    </execution>
77                </executions>
78            </plugin>
79            <plugin>
80                <groupId>org.apache.maven.plugins</groupId>
81                <artifactId>maven-javadoc-plugin</artifactId>
82                <version>3.2.0</version>
83                <configuration>
84                    <excludePackageNames>net.sf.persism.log*;net.sf.persism.logging.*</excludePackageNames>
85                    <source>17</source>
86                </configuration>
87                <executions>
88                    <execution>
89                        <id>attach-javadocs</id>
90                        <goals>
91                            <goal>jar</goal>
92                        </goals>
93                    </execution>
94                </executions>
95            </plugin>
96            <plugin>
97                <artifactId>maven-surefire-plugin</artifactId>
98                <version>3.0.0-M5</version>
99                <configuration>
100                    <excludedGroups>net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
101                    </excludedGroups>
102                </configuration>
103            </plugin>
104            <plugin>
105                <groupId>org.sonatype.plugins</groupId>
106                <artifactId>nexus-staging-maven-plugin</artifactId>
107                <version>1.6.8</version>
108                <extensions>true</extensions>
109                <configuration>
110                    <serverId>ossrh</serverId>
111                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
112                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
113                </configuration>
114            </plugin>
115
116        </plugins>
117    </build>
118
119    <name>persism</name>
120    <description>A zero ceremony ORM for Java</description>
121    <url>https://github.com/sproket/Persism</url>
122
123    <properties>
124        <java.version>17</java.version>
125        <maven.compiler.release>17</maven.compiler.release>
126        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
127    </properties>
128
129    <licenses>
130        <license>
131            <name>BSD-3-Clause License</name>
132            <url>https://github.com/sproket/Persism/blob/master/license.txt</url>
133        </license>
134    </licenses>
135
136    <developers>
137        <developer>
138            <name>Dan Howard</name>
139            <email>--------------------------</email>
140            <organization>io.github</organization>
141            <organizationUrl>https://sproket.github.io/Persism/</organizationUrl>
142        </developer>
143    </developers>
144
145    <distributionManagement>
146        <snapshotRepository>
147            <id>ossrh</id>
148            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
149        </snapshotRepository>
150        <repository>
151            <id>ossrh</id>
152            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
153        </repository>
154    </distributionManagement>
155
156    <scm>
157        <connection>scm:git:git://github.com/sproket/Persism.git</connection>
158        <developerConnection>scm:git:ssh://github.com/sproket/Persism.git</developerConnection>
159        <url>https://github.com/sproket/Persism</url>
160    </scm>
161
162    <profiles>
163        <profile>
164            <id>include-test-containers-db</id>
165            <activation>
166                <activeByDefault>false</activeByDefault>
167            </activation>
168            <build>
169                <plugins>
170                    <plugin>
171                        <artifactId>maven-surefire-plugin</artifactId>
172                        <version>3.0.0-M5</version>
173                        <configuration>
174                            <excludedGroups>net.sf.persism.categories.ExternalDB</excludedGroups>
175                        </configuration>
176                    </plugin>
177                </plugins>
178            </build>
179        </profile>
180
181        <profile>
182            <id>exclude-test-containers-db</id>
183            <activation>
184                <activeByDefault>false</activeByDefault>
185            </activation>
186            <build>
187                <plugins>
188                    <plugin>
189                        <artifactId>maven-surefire-plugin</artifactId>
190                        <version>3.0.0-M5</version>
191                        <configuration>
192                            <excludedGroups>net.sf.persism.categories.TestContainerDB</excludedGroups>
193                        </configuration>
194                    </plugin>
195                </plugins>
196            </build>
197        </profile>
198
199        <profile>
200            <id>release</id>
201            <build>
202                <plugins>
203                    <plugin>
204                        <groupId>org.apache.maven.plugins</groupId>
205                        <artifactId>maven-jar-plugin</artifactId>
206                        <version>3.2.0</version>
207                        <configuration>
208                            <archive>
209                                <manifestEntries>
210                                    <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
211                                </manifestEntries>
212                            </archive>
213                        </configuration>
214                    </plugin>
215                    <plugin>
216                        <groupId>org.apache.maven.plugins</groupId>
217                        <artifactId>maven-source-plugin</artifactId>
218                        <version>3.2.1</version>
219                        <executions>
220                            <execution>
221                                <id>attach-sources</id>
222                                <goals>
223                                    <goal>jar-no-fork</goal>
224                                </goals>
225                            </execution>
226                        </executions>
227                    </plugin>
228                    <plugin>
229                        <groupId>org.apache.maven.plugins</groupId>
230                        <artifactId>maven-javadoc-plugin</artifactId>
231                        <version>3.2.0</version>
232                        <executions>
233                            <execution>
234                                <id>attach-javadocs</id>
235                                <goals>
236                                    <goal>jar</goal>
237                                </goals>
238                                <configuration>
239                                    <release>17</release>
240                                </configuration>
241                            </execution>
242                        </executions>
243                    </plugin>
244                    <plugin>
245                        <groupId>org.apache.maven.plugins</groupId>
246                        <artifactId>maven-gpg-plugin</artifactId>
247                        <version>3.0.1</version>
248                        <executions>
249                            <execution>
250                                <id>sign-artifacts</id>
251                                <phase>verify</phase>
252                                <goals>
253                                    <goal>sign</goal>
254                                </goals>
255                            </execution>
256                        </executions>
257                    </plugin>
258                </plugins>
259            </build>
260        </profile>
261    </profiles>
262
263
264    <dependencies>
265        <dependency>
266            <groupId>junit</groupId>
267            <artifactId>junit</artifactId>
268            <version>4.13.2</version>
269            <scope>test</scope>
270        </dependency>
271        <dependency>
272            <groupId>com.carrotsearch</groupId>
273            <artifactId>junit-benchmarks</artifactId>
274            <version>0.7.2</version>
275            <scope>test</scope>
276        </dependency>
277        <dependency>
278            <groupId>org.testcontainers</groupId>
279            <artifactId>testcontainers</artifactId>
280            <version>1.15.2</version>
281            <scope>test</scope>
282        </dependency>
283        <dependency>
284            <groupId>ch.qos.logback</groupId>
285            <artifactId>logback-classic</artifactId>
286            <version>1.2.7</version>
287            <scope>provided</scope>
288        </dependency>
289
290        <dependency>
291            <groupId>log4j</groupId>
292            <artifactId>log4j</artifactId>
293            <version>1.2.17</version>
294            <scope>provided</scope>
295        </dependency>
296
297        <dependency>
298            <groupId>org.apache.logging.log4j</groupId>
299            <artifactId>log4j-api</artifactId>
300            <version>2.14.1</version>
301            <scope>provided</scope>
302        </dependency>
303        <dependency>
304            <groupId>org.apache.logging.log4j</groupId>
305            <artifactId>log4j-core</artifactId>
306            <version>2.14.1</version>
307            <scope>provided</scope>
308        </dependency>
309
310
311        <dependency>
312            <groupId>commons-dbcp</groupId>
313            <artifactId>commons-dbcp</artifactId>
314            <version>1.4</version>
315            <scope>test</scope>
316        </dependency>
317
318        <dependency>
319            <groupId>org.firebirdsql.jdbc</groupId>
320            <artifactId>jaybird</artifactId>
321            <version>4.0.2.java8</version>
322            <scope>test</scope>
323        </dependency>
324
325        <dependency>
326            <groupId>org.firebirdsql</groupId>
327            <artifactId>firebird-testcontainers-java</artifactId>
328            <version>1.1.0</version>
329            <scope>test</scope>
330        </dependency>
331
332        <dependency>
333            <groupId>com.h2database</groupId>
334            <artifactId>h2</artifactId>
335            <version>1.4.200</version>
336            <scope>test</scope>
337        </dependency>
338
339        <dependency>
340            <!-- using older version as 2.5.1 collides with ucanaccess -->
341            <groupId>org.hsqldb</groupId>
342            <artifactId>hsqldb</artifactId>
343            <version>2.5.1</version>
344            <scope>test</scope>
345            <!--            <classifier>debug</classifier>-->
346        </dependency>
347
348        <dependency>
349            <groupId>org.apache.derby</groupId>
350            <artifactId>derby</artifactId>
351            <version>10.8.2.2</version>
352            <scope>test</scope>
353        </dependency>
354
355        <!-- OR -Djdk.tls.client.protocols=TLSv1 -->
356        <dependency>
357            <groupId>com.microsoft.sqlserver</groupId>
358            <artifactId>mssql-jdbc</artifactId>
359            <version>8.4.1.jre8</version>
360            <scope>test</scope>
361        </dependency>
362
363        <dependency>
364            <groupId>org.testcontainers</groupId>
365            <artifactId>mssqlserver</artifactId>
366            <version>1.15.2</version>
367            <scope>test</scope>
368        </dependency>
369
370        <dependency>
371            <groupId>mysql</groupId>
372            <artifactId>mysql-connector-java</artifactId>
373            <version>8.0.23</version>
374            <scope>test</scope>
375        </dependency>
376
377        <dependency>
378            <groupId>org.testcontainers</groupId>
379            <artifactId>mysql</artifactId>
380            <version>1.15.2</version>
381            <scope>test</scope>
382        </dependency>
383
384        <dependency>
385            <groupId>net.sourceforge.jtds</groupId>
386            <artifactId>jtds</artifactId>
387            <version>1.3.1</version>
388            <scope>test</scope>
389        </dependency>
390
391        <dependency>
392            <groupId>com.oracle.database.jdbc</groupId>
393            <artifactId>ojdbc8</artifactId>
394            <version>21.3.0.0</version>
395            <scope>test</scope>
396        </dependency>
397
398        <!--        <dependency>-->
399        <!--            <groupId>com.oracle</groupId>-->
400        <!--            <artifactId>ojdbc6</artifactId>-->
401        <!--            <version>11.2.0.4</version>-->
402        <!--            <scope>test</scope>-->
403        <!--        </dependency>-->
404
405        <dependency>
406            <groupId>org.postgresql</groupId>
407            <artifactId>postgresql</artifactId>
408            <version>9.2-1004-jdbc41</version>
409            <scope>test</scope>
410        </dependency>
411        <dependency>
412            <groupId>org.testcontainers</groupId>
413            <artifactId>postgresql</artifactId>
414            <version>1.15.2</version>
415            <scope>test</scope>
416        </dependency>
417
418        <dependency>
419            <groupId>org.xerial</groupId>
420            <artifactId>sqlite-jdbc</artifactId>
421            <version>3.34.0</version>
422            <scope>test</scope>
423        </dependency>
424
425        <dependency>
426            <groupId>net.sf.ucanaccess</groupId>
427            <artifactId>ucanaccess</artifactId>
428            <version>5.0.1</version>
429            <scope>test</scope>
430        </dependency>
431
432        <dependency>
433            <groupId>com.ibm.informix</groupId>
434            <artifactId>informix-jdbc-complete</artifactId>
435            <version>4.50.4.1</version>
436            <scope>test</scope>
437        </dependency>
438
439        <dependency>
440            <groupId>com.toddfast.typeconverter</groupId>
441            <artifactId>typeconverter</artifactId>
442            <version>1.0</version>
443            <scope>test</scope>
444        </dependency>
445
446        <dependency>
447            <groupId>org.reflections</groupId>
448            <artifactId>reflections</artifactId>
449            <version>0.9.11</version>
450            <scope>test</scope>
451        </dependency>
452
453        <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
454        <dependency>
455            <groupId>javax.persistence</groupId>
456            <artifactId>javax.persistence-api</artifactId>
457            <version>2.2</version>
458            <scope>test</scope>
459        </dependency>
460
461
462        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
463        <!-- DOES NOT WORK with JAVA 8 + -->
464        <!--        <dependency>-->
465        <!--            <groupId>org.codehaus.mojo</groupId>-->
466        <!--            <artifactId>cobertura-maven-plugin</artifactId>-->
467        <!--            <version>2.7</version>-->
468        <!--            <scope>test</scope>-->
469        <!--            <exclusions>-->
470        <!--                <exclusion>-->
471        <!--                    <groupId>com.sun</groupId>-->
472        <!--                    <artifactId>tools</artifactId>-->
473        <!--                </exclusion>-->
474        <!--            </exclusions>-->
475        <!--        </dependency>-->
476
477
478    </dependencies>
479
480</project>
481export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
482mvn deploy
483
2. Manage Upstream Dependencies

Or you can update the library that causes the problem:

1[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:de
2ploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
3
4
5[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
6[ERROR]
7[ERROR] -----------------------------------------------------
8[ERROR] : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @149f5761
9[ERROR] -> [Help 1]
10org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project persism: Execution injected-nexus-deploy of goal org.sona
11type.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
12
13Caused by: org.apache.maven.plugin.PluginExecutionException: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: An API incompatibility was encountered while executing org.son
14atype.plugins:nexus-staging-maven-plugin:1.6.8:deploy: java.lang.ExceptionInInitializerError: null
15<?xml version="1.0" encoding="UTF-8"?>
16<project xmlns="http://maven.apache.org/POM/4.0.0"
17         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
19    <modelVersion>4.0.0</modelVersion>
20
21    <groupId>io.github.sproket</groupId>
22    <artifactId>persism</artifactId>
23    <version>2.0.0</version>
24    <packaging>jar</packaging>
25
26
27    <build>
28        <sourceDirectory>./src</sourceDirectory>
29        <testSourceDirectory>./test</testSourceDirectory>
30        <testResources>
31            <testResource>
32                <directory>./test</directory>
33                <!--                <includes>-->
34                <!--                    <include>*.*</include>-->
35                <!--                </includes>-->
36            </testResource>
37        </testResources>
38        <plugins>
39            <plugin>
40                <groupId>org.apache.maven.plugins</groupId>
41                <artifactId>maven-compiler-plugin</artifactId>
42                <version>3.8.1</version>
43                <!-- MSSQL does not seem to able to connect with 16 -->
44                <configuration>
45                    <source>17</source>
46                    <target>17</target>
47<!--                    <compilerArgs>-->
48<!--                        <arg>-parameters</arg>-->
49<!--                    </compilerArgs>-->
50                </configuration>
51            </plugin>
52
53            <plugin>
54                <groupId>org.apache.maven.plugins</groupId>
55                <artifactId>maven-jar-plugin</artifactId>
56                <version>3.2.0</version>
57                <configuration>
58                    <archive>
59                        <manifestEntries>
60                            <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
61                        </manifestEntries>
62                    </archive>
63                </configuration>
64            </plugin>
65
66            <plugin>
67                <groupId>org.apache.maven.plugins</groupId>
68                <artifactId>maven-source-plugin</artifactId>
69                <version>3.2.1</version>
70                <executions>
71                    <execution>
72                        <id>attach-sources</id>
73                        <goals>
74                            <goal>jar-no-fork</goal>
75                        </goals>
76                    </execution>
77                </executions>
78            </plugin>
79            <plugin>
80                <groupId>org.apache.maven.plugins</groupId>
81                <artifactId>maven-javadoc-plugin</artifactId>
82                <version>3.2.0</version>
83                <configuration>
84                    <excludePackageNames>net.sf.persism.log*;net.sf.persism.logging.*</excludePackageNames>
85                    <source>17</source>
86                </configuration>
87                <executions>
88                    <execution>
89                        <id>attach-javadocs</id>
90                        <goals>
91                            <goal>jar</goal>
92                        </goals>
93                    </execution>
94                </executions>
95            </plugin>
96            <plugin>
97                <artifactId>maven-surefire-plugin</artifactId>
98                <version>3.0.0-M5</version>
99                <configuration>
100                    <excludedGroups>net.sf.persism.categories.ExternalDB,net.sf.persism.categories.TestContainerDB
101                    </excludedGroups>
102                </configuration>
103            </plugin>
104            <plugin>
105                <groupId>org.sonatype.plugins</groupId>
106                <artifactId>nexus-staging-maven-plugin</artifactId>
107                <version>1.6.8</version>
108                <extensions>true</extensions>
109                <configuration>
110                    <serverId>ossrh</serverId>
111                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
112                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
113                </configuration>
114            </plugin>
115
116        </plugins>
117    </build>
118
119    <name>persism</name>
120    <description>A zero ceremony ORM for Java</description>
121    <url>https://github.com/sproket/Persism</url>
122
123    <properties>
124        <java.version>17</java.version>
125        <maven.compiler.release>17</maven.compiler.release>
126        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
127    </properties>
128
129    <licenses>
130        <license>
131            <name>BSD-3-Clause License</name>
132            <url>https://github.com/sproket/Persism/blob/master/license.txt</url>
133        </license>
134    </licenses>
135
136    <developers>
137        <developer>
138            <name>Dan Howard</name>
139            <email>--------------------------</email>
140            <organization>io.github</organization>
141            <organizationUrl>https://sproket.github.io/Persism/</organizationUrl>
142        </developer>
143    </developers>
144
145    <distributionManagement>
146        <snapshotRepository>
147            <id>ossrh</id>
148            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
149        </snapshotRepository>
150        <repository>
151            <id>ossrh</id>
152            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
153        </repository>
154    </distributionManagement>
155
156    <scm>
157        <connection>scm:git:git://github.com/sproket/Persism.git</connection>
158        <developerConnection>scm:git:ssh://github.com/sproket/Persism.git</developerConnection>
159        <url>https://github.com/sproket/Persism</url>
160    </scm>
161
162    <profiles>
163        <profile>
164            <id>include-test-containers-db</id>
165            <activation>
166                <activeByDefault>false</activeByDefault>
167            </activation>
168            <build>
169                <plugins>
170                    <plugin>
171                        <artifactId>maven-surefire-plugin</artifactId>
172                        <version>3.0.0-M5</version>
173                        <configuration>
174                            <excludedGroups>net.sf.persism.categories.ExternalDB</excludedGroups>
175                        </configuration>
176                    </plugin>
177                </plugins>
178            </build>
179        </profile>
180
181        <profile>
182            <id>exclude-test-containers-db</id>
183            <activation>
184                <activeByDefault>false</activeByDefault>
185            </activation>
186            <build>
187                <plugins>
188                    <plugin>
189                        <artifactId>maven-surefire-plugin</artifactId>
190                        <version>3.0.0-M5</version>
191                        <configuration>
192                            <excludedGroups>net.sf.persism.categories.TestContainerDB</excludedGroups>
193                        </configuration>
194                    </plugin>
195                </plugins>
196            </build>
197        </profile>
198
199        <profile>
200            <id>release</id>
201            <build>
202                <plugins>
203                    <plugin>
204                        <groupId>org.apache.maven.plugins</groupId>
205                        <artifactId>maven-jar-plugin</artifactId>
206                        <version>3.2.0</version>
207                        <configuration>
208                            <archive>
209                                <manifestEntries>
210                                    <Automatic-Module-Name>sproket.github.io.persism</Automatic-Module-Name>
211                                </manifestEntries>
212                            </archive>
213                        </configuration>
214                    </plugin>
215                    <plugin>
216                        <groupId>org.apache.maven.plugins</groupId>
217                        <artifactId>maven-source-plugin</artifactId>
218                        <version>3.2.1</version>
219                        <executions>
220                            <execution>
221                                <id>attach-sources</id>
222                                <goals>
223                                    <goal>jar-no-fork</goal>
224                                </goals>
225                            </execution>
226                        </executions>
227                    </plugin>
228                    <plugin>
229                        <groupId>org.apache.maven.plugins</groupId>
230                        <artifactId>maven-javadoc-plugin</artifactId>
231                        <version>3.2.0</version>
232                        <executions>
233                            <execution>
234                                <id>attach-javadocs</id>
235                                <goals>
236                                    <goal>jar</goal>
237                                </goals>
238                                <configuration>
239                                    <release>17</release>
240                                </configuration>
241                            </execution>
242                        </executions>
243                    </plugin>
244                    <plugin>
245                        <groupId>org.apache.maven.plugins</groupId>
246                        <artifactId>maven-gpg-plugin</artifactId>
247                        <version>3.0.1</version>
248                        <executions>
249                            <execution>
250                                <id>sign-artifacts</id>
251                                <phase>verify</phase>
252                                <goals>
253                                    <goal>sign</goal>
254                                </goals>
255                            </execution>
256                        </executions>
257                    </plugin>
258                </plugins>
259            </build>
260        </profile>
261    </profiles>
262
263
264    <dependencies>
265        <dependency>
266            <groupId>junit</groupId>
267            <artifactId>junit</artifactId>
268            <version>4.13.2</version>
269            <scope>test</scope>
270        </dependency>
271        <dependency>
272            <groupId>com.carrotsearch</groupId>
273            <artifactId>junit-benchmarks</artifactId>
274            <version>0.7.2</version>
275            <scope>test</scope>
276        </dependency>
277        <dependency>
278            <groupId>org.testcontainers</groupId>
279            <artifactId>testcontainers</artifactId>
280            <version>1.15.2</version>
281            <scope>test</scope>
282        </dependency>
283        <dependency>
284            <groupId>ch.qos.logback</groupId>
285            <artifactId>logback-classic</artifactId>
286            <version>1.2.7</version>
287            <scope>provided</scope>
288        </dependency>
289
290        <dependency>
291            <groupId>log4j</groupId>
292            <artifactId>log4j</artifactId>
293            <version>1.2.17</version>
294            <scope>provided</scope>
295        </dependency>
296
297        <dependency>
298            <groupId>org.apache.logging.log4j</groupId>
299            <artifactId>log4j-api</artifactId>
300            <version>2.14.1</version>
301            <scope>provided</scope>
302        </dependency>
303        <dependency>
304            <groupId>org.apache.logging.log4j</groupId>
305            <artifactId>log4j-core</artifactId>
306            <version>2.14.1</version>
307            <scope>provided</scope>
308        </dependency>
309
310
311        <dependency>
312            <groupId>commons-dbcp</groupId>
313            <artifactId>commons-dbcp</artifactId>
314            <version>1.4</version>
315            <scope>test</scope>
316        </dependency>
317
318        <dependency>
319            <groupId>org.firebirdsql.jdbc</groupId>
320            <artifactId>jaybird</artifactId>
321            <version>4.0.2.java8</version>
322            <scope>test</scope>
323        </dependency>
324
325        <dependency>
326            <groupId>org.firebirdsql</groupId>
327            <artifactId>firebird-testcontainers-java</artifactId>
328            <version>1.1.0</version>
329            <scope>test</scope>
330        </dependency>
331
332        <dependency>
333            <groupId>com.h2database</groupId>
334            <artifactId>h2</artifactId>
335            <version>1.4.200</version>
336            <scope>test</scope>
337        </dependency>
338
339        <dependency>
340            <!-- using older version as 2.5.1 collides with ucanaccess -->
341            <groupId>org.hsqldb</groupId>
342            <artifactId>hsqldb</artifactId>
343            <version>2.5.1</version>
344            <scope>test</scope>
345            <!--            <classifier>debug</classifier>-->
346        </dependency>
347
348        <dependency>
349            <groupId>org.apache.derby</groupId>
350            <artifactId>derby</artifactId>
351            <version>10.8.2.2</version>
352            <scope>test</scope>
353        </dependency>
354
355        <!-- OR -Djdk.tls.client.protocols=TLSv1 -->
356        <dependency>
357            <groupId>com.microsoft.sqlserver</groupId>
358            <artifactId>mssql-jdbc</artifactId>
359            <version>8.4.1.jre8</version>
360            <scope>test</scope>
361        </dependency>
362
363        <dependency>
364            <groupId>org.testcontainers</groupId>
365            <artifactId>mssqlserver</artifactId>
366            <version>1.15.2</version>
367            <scope>test</scope>
368        </dependency>
369
370        <dependency>
371            <groupId>mysql</groupId>
372            <artifactId>mysql-connector-java</artifactId>
373            <version>8.0.23</version>
374            <scope>test</scope>
375        </dependency>
376
377        <dependency>
378            <groupId>org.testcontainers</groupId>
379            <artifactId>mysql</artifactId>
380            <version>1.15.2</version>
381            <scope>test</scope>
382        </dependency>
383
384        <dependency>
385            <groupId>net.sourceforge.jtds</groupId>
386            <artifactId>jtds</artifactId>
387            <version>1.3.1</version>
388            <scope>test</scope>
389        </dependency>
390
391        <dependency>
392            <groupId>com.oracle.database.jdbc</groupId>
393            <artifactId>ojdbc8</artifactId>
394            <version>21.3.0.0</version>
395            <scope>test</scope>
396        </dependency>
397
398        <!--        <dependency>-->
399        <!--            <groupId>com.oracle</groupId>-->
400        <!--            <artifactId>ojdbc6</artifactId>-->
401        <!--            <version>11.2.0.4</version>-->
402        <!--            <scope>test</scope>-->
403        <!--        </dependency>-->
404
405        <dependency>
406            <groupId>org.postgresql</groupId>
407            <artifactId>postgresql</artifactId>
408            <version>9.2-1004-jdbc41</version>
409            <scope>test</scope>
410        </dependency>
411        <dependency>
412            <groupId>org.testcontainers</groupId>
413            <artifactId>postgresql</artifactId>
414            <version>1.15.2</version>
415            <scope>test</scope>
416        </dependency>
417
418        <dependency>
419            <groupId>org.xerial</groupId>
420            <artifactId>sqlite-jdbc</artifactId>
421            <version>3.34.0</version>
422            <scope>test</scope>
423        </dependency>
424
425        <dependency>
426            <groupId>net.sf.ucanaccess</groupId>
427            <artifactId>ucanaccess</artifactId>
428            <version>5.0.1</version>
429            <scope>test</scope>
430        </dependency>
431
432        <dependency>
433            <groupId>com.ibm.informix</groupId>
434            <artifactId>informix-jdbc-complete</artifactId>
435            <version>4.50.4.1</version>
436            <scope>test</scope>
437        </dependency>
438
439        <dependency>
440            <groupId>com.toddfast.typeconverter</groupId>
441            <artifactId>typeconverter</artifactId>
442            <version>1.0</version>
443            <scope>test</scope>
444        </dependency>
445
446        <dependency>
447            <groupId>org.reflections</groupId>
448            <artifactId>reflections</artifactId>
449            <version>0.9.11</version>
450            <scope>test</scope>
451        </dependency>
452
453        <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
454        <dependency>
455            <groupId>javax.persistence</groupId>
456            <artifactId>javax.persistence-api</artifactId>
457            <version>2.2</version>
458            <scope>test</scope>
459        </dependency>
460
461
462        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin -->
463        <!-- DOES NOT WORK with JAVA 8 + -->
464        <!--        <dependency>-->
465        <!--            <groupId>org.codehaus.mojo</groupId>-->
466        <!--            <artifactId>cobertura-maven-plugin</artifactId>-->
467        <!--            <version>2.7</version>-->
468        <!--            <scope>test</scope>-->
469        <!--            <exclusions>-->
470        <!--                <exclusion>-->
471        <!--                    <groupId>com.sun</groupId>-->
472        <!--                    <artifactId>tools</artifactId>-->
473        <!--                </exclusion>-->
474        <!--            </exclusions>-->
475        <!--        </dependency>-->
476
477
478    </dependencies>
479
480</project>
481export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
482mvn deploy
483<plugin>
484  <groupId>org.sonatype.plugins</groupId>
485  <artifactId>nexus-staging-maven-plugin</artifactId>
486  <version>1.6.8</version>
487  <extensions>true</extensions>
488  <configuration>
489    <serverId>ossrh</serverId>
490    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
491    <autoReleaseAfterClose>true</autoReleaseAfterClose>
492  </configuration>
493  <dependencies>
494    <dependency>
495      <groupId>com.thoughtworks.xstream</groupId>
496      <artifactId>xstream</artifactId>
497      <version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
498    </dependency>
499  </dependencies>
500</plugin>
501

Source https://stackoverflow.com/questions/70153962

QUESTION

Unable to log egress traffic HTTP requests with the istio-proxy

Asked 2022-Feb-11 at 10:45

I am following this guide.

Ingress requests are getting logged. Egress traffic control is working as expected, except I am unable to log egress HTTP requests. What is missing?

1apiVersion: networking.istio.io/v1beta1
2kind: Sidecar
3metadata:
4  name: myapp
5spec:
6  workloadSelector:
7    labels:
8      app: myapp
9
10  outboundTrafficPolicy:
11    mode: REGISTRY_ONLY
12
13  egress:
14    - hosts:
15        - default/*.example.com
16
1apiVersion: networking.istio.io/v1beta1
2kind: Sidecar
3metadata:
4  name: myapp
5spec:
6  workloadSelector:
7    labels:
8      app: myapp
9
10  outboundTrafficPolicy:
11    mode: REGISTRY_ONLY
12
13  egress:
14    - hosts:
15        - default/*.example.com
16apiVersion: networking.istio.io/v1alpha3
17kind: ServiceEntry
18metadata:
19  name: example
20
21spec:
22  location: MESH_EXTERNAL
23  resolution: NONE
24  hosts:
25    - '*.example.com'
26
27  ports:
28    - name: https
29      protocol: TLS
30      number: 443
31
1apiVersion: networking.istio.io/v1beta1
2kind: Sidecar
3metadata:
4  name: myapp
5spec:
6  workloadSelector:
7    labels:
8      app: myapp
9
10  outboundTrafficPolicy:
11    mode: REGISTRY_ONLY
12
13  egress:
14    - hosts:
15        - default/*.example.com
16apiVersion: networking.istio.io/v1alpha3
17kind: ServiceEntry
18metadata:
19  name: example
20
21spec:
22  location: MESH_EXTERNAL
23  resolution: NONE
24  hosts:
25    - '*.example.com'
26
27  ports:
28    - name: https
29      protocol: TLS
30      number: 443
31apiVersion: telemetry.istio.io/v1alpha1
32kind: Telemetry
33metadata:
34  name: mesh-default
35  namespace: istio-system
36spec:
37  accessLogging:
38    - providers:
39        - name: envoy
40
41

Kubernetes 1.22.2 Istio 1.11.4

ANSWER

Answered 2022-Feb-07 at 17:14

AFAIK istio collects only ingress HTTP logs by default.

In the istio documentation there is an old article (from 2018) describing how to enable egress traffic HTTP logs.

Please keep in mind that some of the information may be outdated, however I believe this is the part that you are missing.

Source https://stackoverflow.com/questions/71018977

QUESTION

How to force TLS 1.2 usage for PhpMailer 5.2

Asked 2022-Feb-04 at 09:50

Recently the 3rd party email service provider I was using made a change. They disabled support for TLS 1.0 and TLS 1.1.

I provide support for an ancient system that still uses php 5.3 and phpmailer 5.2.

My tests indicates that TLS 1.2 is enabled.

But, the PHPMailer code cannot connect to the email server after the disabling of TLS 1.0 and 1.1

Also, note that I am not a full time php expert.

Is there a way to make PHPMailer 5.2 use tls 1.2?

ANSWER

Answered 2021-Nov-07 at 14:47

It's not up to PHPMailer, its up to the version of PHP that you're using to run it, so the solution is to update your PHP version. The major changes relating to TLS were largely in PHP 5.6, so upgrading to that would be a good intermediate point if you're really stuck with this legacy version.

Source https://stackoverflow.com/questions/69873422

QUESTION

Error Importing "mongodb" with typescript

Asked 2022-Jan-25 at 18:41

When compiling any typescript program that just imports mongodb, i get 12 errors like:

1node_modules/mongodb/mongodb.d.ts:3309:5 - error TS2416: Property 'end' in type 'GridFSBucketWriteStream' is not assignable to the same property in base type 'WritableStream'
2

To reproduce is simple with node TLS (v16.13.1), & a empty directory, just run:

1node_modules/mongodb/mongodb.d.ts:3309:5 - error TS2416: Property 'end' in type 'GridFSBucketWriteStream' is not assignable to the same property in base type 'WritableStream'
2npm i mongodb typescript
3echo "import mongodb  from 'mongodb'" > index.ts
4npx tsc index
5

ANSWER

Answered 2022-Jan-06 at 15:48

I'm unable to reproduce your problem in my local environment, so I think it is a problem probably related to some other package in your project.

As suggested on this issue, you should try deleting your package-lock.json and generating it again with npm.

Source https://stackoverflow.com/questions/70607218

QUESTION

Find the missing module

Asked 2022-Jan-16 at 19:31

My question: when building a minimal JRE, how can one make sure that no required module is missing?


To illustrate the question, here is an example where I want to build a minimal JRE for my project. Let's assume for this example that logback is my only dependency.

I run the following command to see what modules are required:

1$ jar --file=logback-core-1.2.3.jar --describe-module
2No module descriptor found. Derived automatic module.
3
4logback.core@1.2.3 automatic
5requires java.base mandated
6contains ch.qos.logback.core
7contains ch.qos.logback.core.boolex
8etc. (there are more "contains ch.qos.logback.XXX" lines)
9

It looks like I only need the java.base module and I build my minimal JRE accordingly:

1$ jar --file=logback-core-1.2.3.jar --describe-module
2No module descriptor found. Derived automatic module.
3
4logback.core@1.2.3 automatic
5requires java.base mandated
6contains ch.qos.logback.core
7contains ch.qos.logback.core.boolex
8etc. (there are more "contains ch.qos.logback.XXX" lines)
9jlink --output jre-min --add-modules java.base
10

However when running the project with the minimal JRE, I encounter issues using logback's email logger (malformed emails over TLS). Through trial and error, I find that jdk.crypto.cryptoki module is also required:

1$ jar --file=logback-core-1.2.3.jar --describe-module
2No module descriptor found. Derived automatic module.
3
4logback.core@1.2.3 automatic
5requires java.base mandated
6contains ch.qos.logback.core
7contains ch.qos.logback.core.boolex
8etc. (there are more "contains ch.qos.logback.XXX" lines)
9jlink --output jre-min --add-modules java.base
10jlink --output jre-min --add-modules java.base,jdk.crypto.cryptoki
11

Now my project works fine. How could I have avoided the trial & error step?

ANSWER

Answered 2022-Jan-16 at 19:31

The JAR you're using there has "no module descriptor" (see first line of output) and thus can't tell you what modules it depends on, so you have to find out yourself. The canonical tool for that is jdeps but it may not be enough.

Static Dependencies

I wrote a jdeps tutorial that gets you started, but the interesting bit is this section. The gist is this command:

1$ jar --file=logback-core-1.2.3.jar --describe-module
2No module descriptor found. Derived automatic module.
3
4logback.core@1.2.3 automatic
5requires java.base mandated
6contains ch.qos.logback.core
7contains ch.qos.logback.core.boolex
8etc. (there are more "contains ch.qos.logback.XXX" lines)
9jlink --output jre-min --add-modules java.base
10jlink --output jre-min --add-modules java.base,jdk.crypto.cryptoki
11jdeps --class-path 'jars/*' -summary -recursive logback-core-1.2.3.jar
12

Where jars contains all Logback dependencies. (If you don't have those at hand, you can leave --class-path and -recursive out, but then you don't know which modules the dependencies.) Besides a few other things, the output will list the dependencies on JDK modules.

Dynamic Dependencies

jdeps works by analyzing the byte code, which means it will only find dependencies that are statically linked. Consequently, if a JAR uses reflection, the service loader, or other mechanisms to avoid explicitly mentioning the classes it wants to use, jdeps will not notice them.

To find those cases, you can run an app with the java command-line option -XX:DumpLoadedClassList=classes.lst - it will generate a file classes.lst that lists all loaded classes.

Minimal Runtime

Note that the base module java.base uses a lot of services that are provided by other modules, for example locale data by jdk.localedata. That means a minimal runtime (i.e. one where service provider modules are not included) may miss things that an app needs (in the example, maybe locales).

You can list services with java --describe-module java.base (see list of uses ... in output) and then find potentiual providers for each with jlink's --suggest-providers option.

You can include all of possible providers with jlink's --bind-services option, but that immediately abandons the idea of a "minimal" runtime as it will include a lot of modules. If you're going for "minimal", probably better to include them one by one as needed.

Whatever you do, make sure to thoroughly test your app on the custom-made runtime.

Source https://stackoverflow.com/questions/70664036

QUESTION

vvv.test not loading (nor any of my sites) when running vagrant up

Asked 2022-Jan-07 at 21:03

Ever since I've upgraded my Mac to Monteray, I've been having issues with Vagrant.

Initially, I use to see a vBoxManage error on terminal when running vagrant up. I posted a question on this on SO previously, see here for details.

Today, I uninstalled VirtualBox again (removed VirtualBox VMs folder and moved application to trash) and reinstalled VirtualBox 6.1.3 for OS X hosts` (link here).

I then ran vagrant up on terminal and it successfully compiled:

enter image description here

After seeing the famous green teddy, I tried going to vvv.test but, the page doesn't load. I've tried accessing URLs of sites that have been provisioned before, but they too do not load.

I've also ran vagrant up --debug, and nothing concerning was seen.

My Vagrant version is 2.2.19

Unsure what steps to take next?

Edit:

Steps taken:

  1. Have ran vagrant up --provision to provision sites in config.yml file (config.yml file can be seen below)
  2. Have tried to access website-dev.test, page doesn't load
  3. Have tried to access vvv.test, page doesn't load
  4. Have ran vagrant reload --provision and repeated steps 2 and 3, but same results
  5. Have ran vagrant halt and vagrant up and repeated steps 2 and 3, but same results

I don't believe there's an issue in my config.yml file, as before Monteray update, everything was working fine (and I've made no changes to my yml file since). But, to cover all scenario's, here is my config.yml file:

1sites:
2
3  website-dev:
4    skip_provisioning: false
5    description: ""
6    hosts:
7      - website-dev.test
8    custom:
9      wpconfig_constants:
10        WP_DEBUG: true
11        WP_DEBUG_LOG: true
12        WP_DISABLE_FATAL_ERROR_HANDLER: true
13
14
15  wordpress-trunk:
16    skip_provisioning: true 
17    description: "An svn based WP Core trunk dev setup, useful for contributor days, Trac tickets, patches"
18    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template-develop.git
19    hosts:
20      - trunk.wordpress.test
21
22  wordpress-meta-environment:
23    skip_provisioning: true 
24    description: "An environment useful for contributions to the WordPress meta team."
25    repo: https://github.com/WordPress/meta-environment.git
26    hosts:
27      - wp-meta.test
28    custom:
29      provision_site:
30        "buddypressorg.test": true
31        "jobs.wordpressnet.test": true
32        "wordcamp.test": true
33        "wordpressorg.test": true
34        "wordpresstv.test": true
35
36utilities:
37  core: 
38    - tls-ca 
39    - phpmyadmin
40
41vm_config:
42  memory: 1600
43  cores: 2
44
45general:
46  db_backup: true
47  db_restore: true
48  db_share_type: false
49
50
51vagrant-plugins:
52  disksize: 10GB

In regards to vagrant ssh, I'm unsure on what steps I would need to take to get vvv.test to start working again here, can't see anything on the docs for this also?

ANSWER

Answered 2021-Dec-15 at 18:33

Thanks to guidance from @Tinxuanna, I've managed to solve the issue (finally!).

For anyone else having similar issues, here's what I did:

  1. Access the /etc/hosts folder
  2. Find file called hosts and open it in a text editor.
  3. Remove the IP addresses related to vagrant (I kept a backup of the original file just in case)
  4. After saving hosts file the IP addresses removed, I ran vagrant up --provision
  5. I then ran vagrant up
  6. Then accessed vvv.test
  7. You're done!

Source https://stackoverflow.com/questions/70192942

Community Discussions contain sources that include Stack Exchange Network

Tutorials and Learning Resources in TLS

Tutorials and Learning Resources are not available at this moment for TLS

Share this Page

share link

Get latest updates on TLS