2

I am new in spring boot framework. I tried a simple scratch application but my embedded tomcat wont startup. Also i downloaded source code from spring boot initialize, same application is running smoothly in another system but giving error in my system.

My pom.xml file

<?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>

<groupId>com.sokka</groupId>
<artifactId>Sokka</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Sokka</name>
<description>Demo project for Spring Boot</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.1.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF- 
      8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>


</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

My Java File

package com.sokka.Sokka;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SokkaApplication {

public static void main(String[] args) {
    SpringApplication.run(SokkaApplication.class, args);
}
}

The same Application is running in another system but not running in my system.

The error message that I get is:

018-04-20 11:42:22.969  INFO 31454 --- [  restartedMain] com.sokka.Sokka.SokkaApplication         : Starting SokkaApplication on hero-HP-Pavilion-Notebook with PID 31454 (/home/hero/Projects/Sokka/target/classes started by hero in /home/hero/Projects/Sokka)
2018-04-20 11:42:22.970  INFO 31454 --- [  restartedMain] com.sokka.Sokka.SokkaApplication         : No active profile set, falling back to default profiles: default
2018-04-20 11:42:23.015  INFO 31454 --- [  restartedMain] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@530af565: startup date [Fri Apr 20 11:42:23 NPT 2018]; root of context hierarchy
2018-04-20 11:42:23.939  INFO 31454 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2018-04-20 11:42:23.962  INFO 31454 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-04-20 11:42:23.975  INFO 31454 --- [  restartedMain] com.sokka.Sokka.SokkaApplication         : Started SokkaApplication in 1.239 seconds (JVM running for 1.618)
2018-04-20 11:42:23.980  INFO 31454 --- [       Thread-8] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@530af565: startup date [Fri Apr 20 11:42:23 NPT 2018]; root of context hierarchy
2018-04-20 11:42:23.986  INFO 31454 --- [       Thread-8] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
Jayanta Rijal
  • 69
  • 1
  • 8

0 Answers0