Skip to content

Commit

Permalink
Update development instructions for Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
willmostly authored and mosabua committed Sep 13, 2023
1 parent c744f6a commit 639896c
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ testing

### Build and run

Please note these steps have been verified with JDK 8 and 11. Higher versions of
Java might run into unexpected issues.
This project requires Java 17. Note that higher version of Java have not been
verified and may run into unexpected issues.

run `mvn clean install` to build `trino-gateway`
Run `./mvnw clean install` to build `trino-gateway`. VM options required for
compilation and testing are specified in `.mvn/jvm.config`.

Edit the [config file](/gateway-ha/gateway-ha-config.yml) and update the mysql
db information.
Expand All @@ -70,29 +71,33 @@ cd gateway-ha/target/
java -jar gateway-ha-{{VERSION}}-jar-with-dependencies.jar server ../gateway-ha-config.yml
```

If you encounter a `Failed to connect to JDBC URL` error, this may be due to
newer versions of java disabling certain algorithms when using SSL/TLS, in
particular `TLSv1` and `TLSv1.1`. This will cause `Bad handshake` errors when
connecting to the MySQL server. To enable `TLSv1` and `TLSv1.1` open the
following file in any editor (`sudo` access needed):
If you encounter a `Failed to connect to JDBC URL` error with the MySQL backend,
this may be due to newer versions of Java disabling certain algorithms when
using SSL/TLS, in particular `TLSv1` and `TLSv1.1`. This causes `Bad handshake`
errors when connecting to the MySQL server. You can avoid this by enabling
`TLSv1` and `TLSv1.1` in your JDK, or by adding `sslMode=DISABLED` to your
connection string.

To enable TLS1 and 1.1, in

```
/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/security/java.security
${JAVA_HOME}/jre/lib/security/java.security
```

Search for `jdk.tls.disabledAlgorithms`, it should look something like this:
search for `jdk.tls.disabledAlgorithms`, it should look something like this:

```
jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves
```

Remove `TLSv1, TLSv1.1` and redo the above steps to build and run `trino-gateway`.
Remove `TLSv1, TLSv1.1` and redo the above steps to build and run
`trino-gateway`.

If you see test failures while building `trino-gateway` or in an IDE, please run
`mvn process-classes` to instrument javalite models which are used by the tests
. Ref
`mvn process-classes` to instrument javalite models which are used by the tests.
Refer to the
[javalite-examples](https://github.com/javalite/javalite-examples/tree/master/simple-example#instrumentation)
for more details.

Expand Down

0 comments on commit 639896c

Please sign in to comment.