Skip to content

Commit

Permalink
Merge pull request #16 from shelfio/feature/Extended-doc-with-trouble…
Browse files Browse the repository at this point in the history
…shooting

Added troubleshooting section with the guide of fixing incompatible java version
  • Loading branch information
harazdovskiy authored Jul 26, 2022
2 parents 2a7d324 + fe7f2b7 commit e977c1c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,52 @@ module.exports = () => {
it();
```

## Troubleshooting

<details>
<summary> Issue running tests locally - Exception in thread "main"</summary>

```shell
Exception in thread "main'
java.lang.UnsupportedOperationException The Security Manager is deprecated and will be removed in a future release
at java.base/java.lang.System.setSecurityManager(System. java: 416)
at ora.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.iava:71
```
The main reason why this issue appears is that you have an incompatible java version installed to run elastic locally.
### What to do?
1. List current java versions
```shell
$ /usr/libexec/java_home -V
```
2. If you see version 1.8.xxx
Add this command to your bashrc, zshrc, etc
```shell
$ /usr/libexec/java_home -v 1.8
```
3. If you see no versions or do not have a compatible version installed - Install version 1.8xxx
https://www.java.com/en/download/
4. Reload the console and check the java version with
```shell
$ java -version
```
Output for proper work
```shell
$ java -version
java version "1.8.0_333"
Java(TM) SE Runtime Environment (build 1.8.0_333-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode)
```
5. Go to step 2 and set version 1.8xx as a default for the shell
</details>
## See Also
- [jest-dynamodb](https://github.com/shelfio/jest-dynamodb)
Expand Down

0 comments on commit e977c1c

Please sign in to comment.