# Exception running CLI tool in Java 17

**URL:** <https://community.sonatype.com/t/exception-running-cli-tool-in-java-17/8937>\
**Category:** Sonatype Lifecycle & Firewall\
**Created:** [July 8, 2022, 4:50pm UTC](https://community.sonatype.com/t/exception-running-cli-tool-in-java-17/8937 "2022-07-08T16:50:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan.kasson](https://avatars.discourse-cdn.com/v4/letter/r/fbc32d/32.png) [@ryan.kasson](https://community.sonatype.com/u/ryan.kasson)\
**Post date:** [July 8, 2022, 4:50pm UTC](https://community.sonatype.com/t/exception-running-cli-tool-in-java-17/8937/1 "2022-07-08T16:50:15Z")

</div>

I am having this issue when running CLI tool (version 136) on Java 17. Our developer tells us there are no changes to their build platform. Here is the error:  
at com.sonatype.insight.scan.cli.PolicyEvaluatorCli.instantiate(PolicyEvaluatorCli.java:106)  
at com.sonatype.insight.scan.cli.PolicyEvaluatorCli.boot(PolicyEvaluatorCli.java:86)  
at com.sonatype.insight.scan.cli.PolicyEvaluatorCli.run(PolicyEvaluatorCli.java:55)  
at com.sonatype.insight.scan.cli.PolicyEvaluatorCli.main(PolicyEvaluatorCli.java:47)  
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not “opens java.lang” to unnamed module @3d71d552

I have never seen this before, any guidance on how to further troubleshoot? So far I told them to update to latest CLI tool, or at least 138, which is what many are using. Using Java 8 may not be feasible for the team at this time.

---

<div class="post-metadata">

**Author:** ![rwilson](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@rwilson](https://community.sonatype.com/u/rwilson)\
**Post date:** [July 12, 2022, 5:27pm UTC](https://community.sonatype.com/t/exception-running-cli-tool-in-java-17/8937/2 "2022-07-12T17:27:54Z")

</div>

Ryan - if you are a licensed customer (which you have to be to run Lifecycle/Firewall) and you are an authorized support contact, you can reach out to support at [https://SUPPORT.sonatype.com](https://SUPPORT.sonatype.com) for assistance with any Sonatype supported product.

---

<div class="post-metadata">

**Author:** ![georgiev](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@georgiev](https://community.sonatype.com/u/georgiev)\
**Post date:** [May 26, 2023, 10:08am UTC](https://community.sonatype.com/t/exception-running-cli-tool-in-java-17/8937/3 "2023-05-26T10:08:00Z")

</div>

We have same issue with version 1.158, do you found any solution to this issue?
