close

[Solved] Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run my java application but I am facing following error Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision 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 This Error Occurs ?

I am trying to run my java application but I am facing following error.

Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision, see the following errors:

Error injecting constructor, java.lang.ExceptionInInitializerError at org.apache.maven.plugin.war.WarMojo.<init>(Unknown Source) while locating org.apache.maven.plugin.war.WarMojo

How To Solve Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision Error ?

  1. How To Solve Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision Error ?

    To Solve Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision Error Just configure war plugin in your POM.xml. Second one is Just Change your JDK for particular Project. Follow this step. First of all Left-click on your project.Then, Select Properties.now, Select Build.Select compile.Change the JDK to version 14.If you don't have JDK 14 then The download of the JDK is here.Now, Your issue will be fix.

  2. Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision

    To Solve Error injecting: org.apache.maven.plugin.war.WarMojo com.google.inject.ProvisionException: Unable to provision Error Just configure war plugin in your POM.xml. Second one is Just Change your JDK for particular Project. Follow this step. First of all Left-click on your project.Then, Select Properties.now, Select Build.Select compile.Change the JDK to version 14.If you don't have JDK 14 then The download of the JDK is here.Now, Your issue will be fix.

Solution 1: configure war plugin

Just configure war plugin in your POM.xml like this.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>3.3.2</version>
</plugin>

Solution 2: Change JDK for your project

Just Change your JDK for particular Project. Follow this step.

  1. First of all Left-click on your project.
  2. Then, Select Properties.
  3. now, Select Build.
  4. Select compile.
  5. Change the JDK to version 14.
  6. If you don’t have JDK 14 then The download of the JDK is here.
  7. Now, Your issue will be fix.

Summary

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