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 Java Discussion :

comment resoudre Spring


Sujet :

Spring Java

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Enseignant Chercheur
    Inscrit en
    Juin 2012
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Guinée

    Informations professionnelles :
    Activité : Enseignant Chercheur
    Secteur : Enseignement

    Informations forums :
    Inscription : Juin 2012
    Messages : 1
    Points : 1
    Points
    1
    Par défaut comment resoudre Spring
    Bonjour
    je travaille sur un MacBook PRO je ne maitrise pas son environnement veuillez aidez s'il vous plait.
    je travaille sur un projet mais j'ai un problème le programme s'exécute en me donnant ce message

    "

    Description:

    Cannot determine embedded database driver class for database type NONE

    Action:

    If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active)."
    voici mes codes

    code application

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    package org.ist;
     
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
    import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
     
    @SpringBootApplication
    public class TaxesApplication {
     
    	public static void main(String[] args) {
    		SpringApplication.run(TaxesApplication.class, args);
    	}
    }
    code Application properties

    Spring.dataSource.url=jdbc:mysql://localhost/DB_TAXE
    Spring.dataSource.username=root
    Spring.dataSource.password=
    Spring.dataSource.driver-class-name=com.mysql.jdbc.Driver
    Spring.jpa.hibernate.dll-auto=create
    Spring.jpa.show-sql=true
    Spring.jpa.properties.hibernate.dialecte=org.hibernate.dialecte.MYSQL5DIALECTE
    code 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
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    <?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>org.ist</groupId>
    	<artifactId>taxes</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>jar</packaging>
     
    	<name>taxes</name>
    	<description>Demo project for Spring Boot</description>
     
    	<parent>
    		<groupId>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>1.4.3.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-jpa</artifactId>
    		</dependency>
    <!-- 		<dependency> -->
    <!-- 			<groupId>org.springframework.boot</groupId> -->
    <!-- 			<artifactId>spring-boot-starter-security</artifactId> -->
    <!-- 		</dependency> -->
     		<dependency> 
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-thymeleaf</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>mysql</groupId>
    			<artifactId>mysql-connector-java</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>
     
     
    </project>

  2. #2
    Membre éprouvé Avatar de noOneIsInnocent
    Homme Profil pro
    Inscrit en
    Mai 2002
    Messages
    1 037
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2002
    Messages : 1 037
    Points : 1 161
    Points
    1 161
    Par défaut
    Bonjour,

    Dans ton fichier pom.xml il est indiqué que le driver JDBC pour accéder à ta base de données MySQL est fourni au runtime. Il doit donc être présent dans le classpath de ton application lorsque tu l’exécutes

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    
    <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <scope>runtime</scope>
    </dependency>
    Tu peux chercher où est le jar correspondant à mysql-connector et le rajouter dans ton classpath
    Visiblement ton application est générée sous forme de jar. Donc tu la lances de la façon suivante

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    java -jar monApplication.jar
    tu peux rajouter

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    java -cp .;/path/mysqlconnector -jar monApplication.jar

Discussions similaires

  1. [C++.NET] Comment résoudre un problème d'arrondi avec Single ?
    Par KaeRZed dans le forum Framework .NET
    Réponses: 7
    Dernier message: 18/09/2007, 10h08
  2. Réponses: 2
    Dernier message: 21/06/2006, 11h05
  3. Réponses: 2
    Dernier message: 26/04/2006, 12h19
  4. [VS.NET 2005] Comment resoudre installation problematique ?
    Par stailer dans le forum Framework .NET
    Réponses: 1
    Dernier message: 21/12/2005, 03h51
  5. Réponses: 3
    Dernier message: 29/09/2005, 17h43

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