close

[Solved] java.lang.IllegalArgumentException: Malformed \uxxxx encoding

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run mvn install in my project And I am facing the following error java.lang.IllegalArgumentException: Malformed \uxxxx encoding in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How java.lang.IllegalArgumentException: Malformed \uxxxx encoding Error Occurs ?

Today I am trying to run mvn install in my project And I am facing the following error.

java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
    at java.util.Properties.loadConvert (Properties.java:672)
    at java.util.Properties.load0 (Properties.java:455)
    at java.util.Properties.load (Properties.java:408)
    at org.eclipse.aether.internal.impl.TrackingFileManager.read (TrackingFileManager.java:56)

How To Solve java.lang.IllegalArgumentException: Malformed \uxxxx encoding Error ?

  1. How To Solve java.lang.IllegalArgumentException: Malformed \uxxxx encoding Error?

    To Solve java.lang.IllegalArgumentException: Malformed \uxxxx encoding Error First, check if this is the issue by running mvn –version Check If there is a mismatch in java version set JAVA_HOME by running export JAVA_HOME=$(/usr/libexec/java_home) Then run mvn –version. Maven should point to the right Java version. Here When you run mvn install next time, maven automatically picks up the version set in your JAVA_HOME

  2. java.lang.IllegalArgumentException: Malformed \uxxxx encoding

    To Solve java.lang.IllegalArgumentException: Malformed \uxxxx encoding Error First, check if this is the issue by running mvn –version Check If there is a mismatch in java version set JAVA_HOME by running export JAVA_HOME=$(/usr/libexec/java_home) Then run mvn –version. Maven should point to the right Java version. Here When you run mvn install next time, maven automatically picks up the version set in your JAVA_HOME

Solution 1

  1. First, check if this is the issue by running mvn --version
  2. Check If there is a mismatch in java version set JAVA_HOME by running
  3. export JAVA_HOME=$(/usr/libexec/java_home)
  4. Then run mvn --version. Maven should point to the right Java version.
  5. Here When you run mvn install next time, maven automatically picks up the version set in your JAVA_HOME

Solution 2

In My case problem was solved just by removing all artifacts from my ~/.m2 directory and re-ran mvn build. This time, the build succeeded.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment