IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Spring Boot Java Discussion :

Problème pour lancer un projet spring boot


Sujet :

Spring Boot Java

  1. #1
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut Problème pour lancer un projet spring boot
    Bonjour à tous,

    Je viens de commencer à regarder spring boot avec le super tuto https://bnguimgo.developpez.com/tuto...-le-serveur#LI

    Par contre je n'arrive pas à lancer le projet avec un run as > spring boot app, je suis sous debian 9 avec eclipse

    Ma console
    Code x : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.1.6.RELEASE)
    
    2019-07-29 10:43:26.742  INFO 28625 --- [           main] c.p.g.PasswordGeneratorApplication       : Starting PasswordGeneratorApplication on debian with PID 28625 (started by kevin in /home/kevin/Documents/password generator/password-generator)
    2019-07-29 10:43:26.746  INFO 28625 --- [           main] c.p.g.PasswordGeneratorApplication       : No active profile set, falling back to default profiles: default
    2019-07-29 10:43:27.215  INFO 28625 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
    2019-07-29 10:43:27.239  INFO 28625 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 14ms. Found 0 repository interfaces.
    2019-07-29 10:43:27.627  INFO 28625 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
    2019-07-29 10:43:27.733  INFO 28625 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
    2019-07-29 10:43:27.792  INFO 28625 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    	name: default
    	...]
    2019-07-29 10:43:27.863  INFO 28625 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.10.Final}
    2019-07-29 10:43:27.865  INFO 28625 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
    2019-07-29 10:43:28.018  INFO 28625 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
    2019-07-29 10:43:28.159  INFO 28625 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
    2019-07-29 10:43:28.376  INFO 28625 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@38eb2c50'
    2019-07-29 10:43:28.380  INFO 28625 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
    2019-07-29 10:43:28.667  INFO 28625 --- [           main] c.p.g.PasswordGeneratorApplication       : Started PasswordGeneratorApplication in 2.326 seconds (JVM running for 2.963)
    2019-07-29 10:43:28.671  INFO 28625 --- [       Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
    2019-07-29 10:43:28.671  INFO 28625 --- [       Thread-2] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
    2019-07-29 10:43:28.676  INFO 28625 --- [       Thread-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
    2019-07-29 10:43:28.679  INFO 28625 --- [       Thread-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

    Mon pom.xml

    Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    <?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>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>2.1.6.RELEASE</version>
    		<relativePath/> <!-- lookup parent from repository -->
    	</parent>
    	<groupId>com.password.generator</groupId>
    	<artifactId>password-generator</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>war</packaging>
    	<name>password-generator</name>
    	<description>Password generator for java</description>
     
    	<properties>
    		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    		<java.version>12</java.version>
    		<tomcat.version>8.0.41</tomcat.version>
    	</properties>
     
    	<dependencies>
    		<dependency>
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-data-jpa</artifactId>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-web</artifactId>
    		</dependency>
     
    		<dependency>
    			<groupId>com.h2database</groupId>
    			<artifactId>h2</artifactId>
    			<scope>runtime</scope>
    		</dependency>
    		<dependency>
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-tomcat</artifactId>
    			<scope>provided</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>
     
    </project>

    J'ai également deux warning
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    Description	Resource	Path	Location	Type
    The compiler compliance specified is 1.5 but a JRE 1.8 is used	password-generator		Compiler Compliance	JRE Compiler Compliance Problem
    Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. 	password-generator		Build path	JRE System Library Problem
    Merci de votre aide

  2. #2
    Membre actif
    Inscrit en
    Juin 2005
    Messages
    578
    Détails du profil
    Informations forums :
    Inscription : Juin 2005
    Messages : 578
    Points : 240
    Points
    240
    Par défaut
    Bonjour

    Tu es sûr que la version de java que tu as spécifiée est bonne:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <java.version>12</java.version>

  3. #3
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Merci pour ta réponse,

    En effet c'est la 8 qui est utilisé j'ai donc changé
    Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
    <java.version>8</java.version>

    Par contre j'ai toujours un shutdown , dans la console j'ai java-8-openjdk
    Code x : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
      .   ____          _            __ _ _
     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
      '  |____| .__|_| |_|_| |_\__, | / / / /
     =========|_|==============|___/=/_/_/_/
     :: Spring Boot ::        (v2.1.6.RELEASE)
    
    2019-07-30 17:26:07.742  INFO 4687 --- [           main] c.p.g.PasswordGeneratorApplication       : Starting PasswordGeneratorApplication on debian with PID 4687 (started by kevin in /home/kevin/Documents/password generator/password-generator)
    2019-07-30 17:26:07.746  INFO 4687 --- [           main] c.p.g.PasswordGeneratorApplication       : No active profile set, falling back to default profiles: default
    2019-07-30 17:26:08.265  INFO 4687 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
    2019-07-30 17:26:08.292  INFO 4687 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 17ms. Found 0 repository interfaces.
    2019-07-30 17:26:08.808  INFO 4687 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
    2019-07-30 17:26:08.958  INFO 4687 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
    2019-07-30 17:26:09.028  INFO 4687 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    	name: default
    	...]
    2019-07-30 17:26:09.123  INFO 4687 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.10.Final}
    2019-07-30 17:26:09.125  INFO 4687 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
    2019-07-30 17:26:09.305  INFO 4687 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
    2019-07-30 17:26:09.476  INFO 4687 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
    2019-07-30 17:26:09.720  INFO 4687 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@2125ad3'
    2019-07-30 17:26:09.724  INFO 4687 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
    2019-07-30 17:26:10.042  INFO 4687 --- [           main] c.p.g.PasswordGeneratorApplication       : Started PasswordGeneratorApplication in 2.731 seconds (JVM running for 3.41)
    2019-07-30 17:26:10.047  INFO 4687 --- [       Thread-2] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
    2019-07-30 17:26:10.047  INFO 4687 --- [       Thread-2] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
    2019-07-30 17:26:10.052  INFO 4687 --- [       Thread-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
    2019-07-30 17:26:10.054  INFO 4687 --- [       Thread-2] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

    Je n'est plus le problème de compilation j'ai changé en 1.8, par contre j'ai toujours l'erreur
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Description	Resource	Path	Location	Type
    Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. 	password-generator		Build path	JRE System Library Problem
    Pourrais-tu m'aiguiller s'il te plaît?

    Merci

  4. #4
    Membre actif
    Inscrit en
    Juin 2005
    Messages
    578
    Détails du profil
    Informations forums :
    Inscription : Juin 2005
    Messages : 578
    Points : 240
    Points
    240

  5. #5
    Membre chevronné

    Homme Profil pro
    développeur
    Inscrit en
    Octobre 2013
    Messages
    1 576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Oise (Picardie)

    Informations professionnelles :
    Activité : développeur

    Informations forums :
    Inscription : Octobre 2013
    Messages : 1 576
    Points : 1 989
    Points
    1 989
    Par défaut
    Java se était en 1.5 j'ai build est import en 1.8 j'ai plus l'erreur de path. Par contre le serveur shutdown encore, d'ailleurs j'ai l'impression que tomcat ne run pas?

    Nom : spring.png
Affichages : 3127
Taille : 279,3 Ko

    Merci

    Edit:

    Bon finalement le problème venait de tomcat et de la dépendance, j'ai crée le projet directement depuis eclipse et non depuis le générateur maven en ligne et le projet ce lancer bien sur le port 8080

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 10/10/2016, 11h28
  2. Problème création projet Spring Boot
    Par Copainbig dans le forum Spring Boot
    Réponses: 0
    Dernier message: 01/01/2015, 21h48
  3. [RCP] problème pour exporter le projet
    Par david06600 dans le forum Eclipse Platform
    Réponses: 11
    Dernier message: 14/11/2007, 16h46
  4. Réponses: 3
    Dernier message: 06/01/2006, 15h05
  5. [Système]Problème pour lancer l'appli au démarrage
    Par CVERRIER3 dans le forum API standards et tierces
    Réponses: 2
    Dernier message: 23/11/2005, 16h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo