0

I have looked at all the similar questions regarding "cannot find symbol". Most of them give a vague answers in terms of

"It means that either there is a problem in your Java source code, or there is a problem in the way that you are compiling it."

I still cannot solve the issue that I have when trying to run my program.

Currently, the error that is being outputted is :

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ user-management-service ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 123 source files to F:\Work\user-management-service\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /F:/Work/user-management-service/src/main/java/uk/co/senapt/crm/user/management/service/ServerSecurityContextExtension.java:[13,23] cannot find symbol
  symbol:   class SSLFactory
  location: package nl.altindag.ssl
[INFO] 1 error
[INFO] -------------------------------------------------------------

Followed by - for one of the java class:

cannot find symbol

The error seems to be related to

import nl.altindag.ssl.SSLFactory;
import nl.altindag.ssl.util.PemUtils;

But I cannot seems to resolve it.

Even though I do have the correct dependency in the pom.xl file:

...
        <dependency>
            <groupId>io.github.hakky54</groupId>
            <artifactId>sslcontext-kickstart</artifactId>
            <version>7.1.0</version>
        </dependency>
        <dependency>
            <groupId>io.github.hakky54</groupId>
            <artifactId>sslcontext-kickstart-for-pem</artifactId>
            <version>7.1.0</version>
        </dependency>
...

Also, under Maven dependencies, I am getting "omitted for duplicate" -- not sure if this is related. enter image description here

If the question is vague - before flagging - please comment on what needs updating and I will update the question accordingly.

Laird Nelson
  • 15,321
  • 19
  • 73
  • 127
  • Yes, `nl.altindag.ssl.SSLFactory` (the symbol the Java compiler can't find) is indeed part of the [Hakky54](https://github.com/Hakky54/sslcontext-kickstart) library. So you need to fix your pom.xml to fix the compile error. Q: What happens if you delete one of the two (duplicate?) entries from your pom.xml? Q: Do you see *ANY* Hakky54 .jar in your "build" directory (after the attempted compile)? Q: Any chance you could use a different library instead? – paulsm4 Jul 19 '22 at 23:48
  • Which java version are you using? – Hakan54 Jul 20 '22 at 07:40

0 Answers0