Failed to Build and deploy JAR app to Azure Web App

0 votes

0

When im trying to build my application to upload my project to azure I have the next errors and debugging it with "mvn -e -X -Pproduction -DskipTests clean package":

[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:22.0.0:build-frontend (default) on project cinema: Could not execute build-frontend goal: Error occured during goal execution: Type [unknown] not presentPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace. org/springframework/context/ApplicationEventPublisherAware: org.springframework.context.ApplicationEventPublisherAware -> [Help 1]


Caused by: org.apache.maven.plugin.MojoFailureException: Could not execute build-frontend goal

Caused by: com.vaadin.flow.server.ExecutionFailedException: Error occured during goal execution: Type [unknown] not presentPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace.

Caused by: java.lang.TypeNotPresentException: Type [unknown] not present

Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationEventPublisherAware
<?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>
    <!-- Vaadin project from https://start.vaadin.com/project/1e82b309-3fef-4d97-b376-4d9e20b1dd3e -->
    <groupId>com.cinema.application</groupId>
    <artifactId>cinema</artifactId>
    <name>Project base for Spring Boot and Vaadin Flow</name>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <java.version>8</java.version>
        <vaadin.version>22.0.0</vaadin.version>
    </properties>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.5.4</version>
    </parent>

    <repositories>
        <!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->

        <!-- Main Maven repository -->
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>vaadin-prereleases</id>
            <url>
                https://maven.vaadin.com/vaadin-prereleases/
            </url>
        </repository>
        <!-- Repository used by many Vaadin add-ons -->
        <repository>
            <id>Vaadin Directory</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
        <pluginRepository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>vaadin-prereleases</id>
            <url>
                https://maven.vaadin.com/vaadin-prereleases/
            </url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>


this is how my pom.xml looks like, I think im not missing any dependency or anything, have spent all day trying to figure out what's going on here, thanks.

any idea how could I handle those problems?

Mar 4 in Azure by Edureka
• 8,060 points
60 views

1 answer to this question.

0 votes

You don't need @EnableJpaRepositories because your package structure is hierarchical correct. Plus this annotation without defining packages does not make sense. Remove it.

@EnableAutoConfiguration is already on @SpringBootApplication. Remove this.

Then there are some issues in the pom.xml.

You shouldn't override the Spring Boot version like here:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
    <version>2.3.3.RELEASE</version>
</dependency>
answered Mar 29 by Edureka
• 9,540 points

Related Questions In Azure

0 votes
1 answer

What is the difference between "Azure Web app" and "Azure App Service"?

Azure App Services Azure App Services is a ...READ MORE

answered Mar 8 in Azure by Edureka
• 8,060 points
51 views
0 votes
1 answer

deploy sample springboot app (WebGoat) to Azure app service

In APPLICATION SETTINGS you need to set the key/value ...READ MORE

answered Mar 24 in Azure by Edureka
• 8,060 points
164 views
0 votes
0 answers

Windows Azure Portal login to portal and receive error "We are having trouble logging you into the portal"

Open browser Navigate to http://www.windowsazure.com/en-us/ Select portal top right login with ...READ MORE

Mar 2 in Azure by Edureka
• 8,060 points
52 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,673 views
+2 votes
1 answer
0 votes
1 answer

How do I use Powershell to create an Azure Web App that runs on Linux?

Try the command below: New-AzureRmResource -ResourceGroupName <ResourceGroupName> -Location ...READ MORE

answered Mar 25 in Azure by Edureka
• 9,540 points
55 views
0 votes
1 answer

Differences between Azure App Services and Cloud Services

App Services  Cloud Services Supported Platforms ASP.NET, Node.js, Java, PHP, ...READ MORE

answered Mar 1 in Azure by Edureka
• 9,540 points
43 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP