'Unable to run mvn spring-boot:run
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>apps</groupId>
<artifactId>proman</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>apps.proman</groupId>
<artifactId>proman-api</artifactId>
<packaging>jar</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>Project Management Application - RESTful API</name>
<description>Project Management Application - RESTful API Implementation</description>
<properties>
<swagger.codegen.version>2.3.1</swagger.codegen.version>
<swagger.codegen.generators.version>1.0.0-rc0</swagger.codegen.generators.version>
<application.package>apps.proman.api</application.package>
<endpoints.dir>${project.basedir}/src/main/resources/endpoints</endpoints.dir>
<supported.language>spring</supported.language>
<supported.library>spring-boot</supported.library>
</properties>
<dependencies>
<dependency>
<groupId>apps.proman</groupId>
<artifactId>proman-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.18</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- Generate request/response models -->
<profile>
<id>generate-model</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger.codegen.version}</version>
<configuration>
<output>${project.build.directory}/generated-sources</output>
<language>${supported.language}</language>
<library>${supported.library}</library>
<verbose>true</verbose>
<generateModels>true</generateModels>
<generateApis>false</generateApis>
<modelPackage>${application.package}.model</modelPackage>
<apiPackage>${application.package}.rest</apiPackage>
<configOptions>
<sourceFolder>.</sourceFolder>
<java8>true</java8>
<dateLibrary>java8</dateLibrary>
<interfaceOnly>true</interfaceOnly>
</configOptions>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-generators</artifactId>
<version>1.0.0-rc0</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>authentication</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${endpoints.dir}/authentication.json</inputSpec>
<language>${supported.language}</language>
</configuration>
</execution>
<execution>
<id>signup</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${endpoints.dir}/signup.json</inputSpec>
<language>${supported.language}</language>
</configuration>
</execution>
<execution>
<id>usermanagement</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${endpoints.dir}/usermanagement.json</inputSpec>
<language>${supported.language}</language>
</configuration>
</execution>
<execution>
<id>boardmanagement-v1</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${endpoints.dir}/boardmanagement.json</inputSpec>
<language>${supported.language}</language>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
I am new here and this would be my first question, hope to get some inputs from my seniors here:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) on project proman-api: An exception occurred while running. null: InvocationTargetException: Cannot load configuration class: apps.proman.api.PromanRestApplication: ExceptionInInitializerError: 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
This is a huge roadblock as I am unable to open swagger.
Also a little gist: I am learning FSD from upgrad and I have an existing POM file (which we are advised not to edit).
Any help is appreciated.
Thank you in advance
Raksha Nair
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
