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 spring boot et Jasperreport


Sujet :

Spring Boot Java

  1. #1
    Membre régulier
    Homme Profil pro
    Développeur Java
    Inscrit en
    Octobre 2012
    Messages
    100
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Congo-Kinshasa

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2012
    Messages : 100
    Points : 91
    Points
    91
    Par défaut Problème spring boot et Jasperreport
    Bonjour,

    J'ai utilise spring boot 2.O pour réaliser mon application. Alors qu'ajoute la dépendance pour jasperreport mon projet ne marche pas.
    Je veux savoir si cette version de spring ne marche encore avec Jasperreport.

    Voici la dépendance ajouté:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    <dependency>
    		    <groupId>net.sf.jasperreports</groupId>
    		    <artifactId>jasperreports</artifactId>
    		    <version>6.1.0</version>
    		</dependency>

  2. #2
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonjour,

    Peut-on avoir les messages d'erreurs dans le log?

    A+.

  3. #3
    Expert confirmé
    Homme Profil pro
    Inscrit en
    Septembre 2006
    Messages
    2 936
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 2 936
    Points : 4 356
    Points
    4 356
    Par défaut
    Vérifier les conflits des versions de JAR,
    https://mvnrepository.com/artifact/n...rreports/6.1.0
    jackson, commons-*, ant, ... sont tous susceptibles d'être aussi utilisés par Spring.

  4. #4
    Membre régulier
    Homme Profil pro
    Développeur Java
    Inscrit en
    Octobre 2012
    Messages
    100
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Congo-Kinshasa

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Enseignement

    Informations forums :
    Inscription : Octobre 2012
    Messages : 100
    Points : 91
    Points
    91
    Par défaut
    Voici mon fichier pom.xmls
    Code : 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
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
     
    <?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.wangi</groupId>
    	<artifactId>AeroPro2018</artifactId>
    	<version>0.0.1-SNAPSHOT</version>
    	<packaging>jar</packaging>
     
    	<name>AeroPro2018</name>
    	<description>Gestion de personnels aeronautiques</description>
     
    	<parent>
    		<groupId>org.springframework.boot</groupId>
    		<artifactId>spring-boot-starter-parent</artifactId>
    		<version>2.0.0.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-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>
    		</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>
     
     
            <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
    		<dependency>
    		    <groupId>commons-io</groupId>
    		    <artifactId>commons-io</artifactId>
    		    <version>2.5</version>
    		</dependency>
     
            <!-- spring securité -->
    		<dependency>
    			<groupId>org.springframework.boot</groupId>
    			<artifactId>spring-boot-starter-security</artifactId>			
    		</dependency>
     
    		<dependency>
    		    <groupId>nz.net.ultraq.thymeleaf</groupId>
    		    <artifactId>thymeleaf-layout-dialect</artifactId>
    		</dependency>
     
    	<!-- https://mvnrepository.com/artifact/org.thymeleaf.extras/thymeleaf-extras-springsecurity4 -->
    		<dependency>
    		    <groupId>org.thymeleaf.extras</groupId>
    		    <artifactId>thymeleaf-extras-springsecurity4</artifactId>
    		    <version>2.1.2.RELEASE</version>
    		</dependency>
    		<!-- integration jasperreport     -->		
     
           <!-- https://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports -->
    	<dependency>
    	    <groupId>net.sf.jasperreports</groupId>
    	    <artifactId>jasperreports</artifactId>
    	    <version>6.1.0</version>
    	</dependency>
     
     
    	</dependencies>
     
    	<build>
    		<plugins>
    			<plugin>
    				<groupId>org.springframework.boot</groupId>
    				<artifactId>spring-boot-maven-plugin</artifactId>
    			</plugin>
    		</plugins>
    	</build>
     
     
    </project>
    Le message d'erreur suivant s'affiche dans ce fichier:
    Nom : erreur1.png
Affichages : 741
Taille : 33,7 Ko

    De que je clic sur ce point rouge, le message est:
    Nom : erreur2.png
Affichages : 705
Taille : 86,6 Ko

    Si j'exécute maintenant le projet au niveau du log, j'obtiens:
    Code : 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
     
    Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/C:/Users/ERIWANG/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
    	at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:132)
    	at org.springframework.boot.devtools.restart.ChangeableUrls.fromClassLoader(ChangeableUrls.java:98)
    	at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:91)
    	at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:55)
    	at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
    	at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:535)
    	at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)
    	at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
    	at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:68)
    	at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234)
    	at com.wangi.aeropro.AeroPro2018Application.main(AeroPro2018Application.java:35)
    Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
    	at java.util.zip.ZipFile.read(Native Method)
    	at java.util.zip.ZipFile.access$1400(Unknown Source)
    	at java.util.zip.ZipFile$ZipFileInputStream.read(Unknown Source)
    	at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(Unknown Source)
    	at java.util.zip.InflaterInputStream.read(Unknown Source)
    	at sun.misc.IOUtils.readFully(Unknown Source)
    	at java.util.jar.JarFile.getBytes(Unknown Source)
    	at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
    	at java.util.jar.JarFile.getManifest(Unknown Source)
    	at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromManifestClassPathAttribute(ChangeableUrls.java:153)
    	at org.springframework.boot.devtools.restart.ChangeableUrls.getUrlsFromClassPathOfJarManifestIfPossible(ChangeableUrls.java:129)
    	... 17 more
    Comment resourdre ce problème?

  5. #5
    Rédacteur/Modérateur
    Avatar de andry.aime
    Homme Profil pro
    Inscrit en
    Septembre 2007
    Messages
    8 391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Ile Maurice

    Informations forums :
    Inscription : Septembre 2007
    Messages : 8 391
    Points : 15 059
    Points
    15 059
    Par défaut
    Bonjour,

    L'archive C:/Users/ERIWANG/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar est corrompu. Supprime le fichier et lance mvn clean install.

    A+.

  6. #6
    Expert confirmé
    Homme Profil pro
    Inscrit en
    Septembre 2006
    Messages
    2 936
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 2 936
    Points : 4 356
    Points
    4 356
    Par défaut
    Citation Envoyé par andry.aime Voir le message
    Bonjour,

    L'archive C:/Users/ERIWANG/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar est corrompu. Supprime le fichier et lance mvn clean install.

    A+.
    "corrompu" : disons plutôt que le déchargement ne s'est pas déroulé comme prévu...
    avant de l'effacer, regardez ce qu'il contient: en cas de problème, c'est souvent la réponse HTML du serveur Nexus, et la lire ne peut pas faire de mal pour comprendre ce qui se passe...
    et donc résoudre le problème correctement
    sinon vous risquez de rester bloquer dans la même situation même après .

    (exemple typique de problème qui risque de vous faire tourner en rond : vos settings.xml de Maven ne sont pas corrects et l'accès à un des repositories vous est refusé...
    dans ce cas le contenu du fichier "corrompu" vous montrera un HTML avec "access denied"... )

Discussions similaires

  1. Problème sqlite avec hibernate et spring-boot
    Par Kasko dans le forum Hibernate
    Réponses: 0
    Dernier message: 15/11/2017, 02h28
  2. Réponses: 1
    Dernier message: 26/07/2017, 13h48
  3. Problème création projet Spring Boot
    Par Copainbig dans le forum Spring Boot
    Réponses: 0
    Dernier message: 01/01/2015, 21h48
  4. [WINDOWS XP] Problème de boot
    Par Hoegaarden dans le forum Windows XP
    Réponses: 44
    Dernier message: 16/11/2005, 09h27
  5. Un problème de Boot avec un de mes PC
    Par Cygnus Saint dans le forum Ordinateurs
    Réponses: 4
    Dernier message: 06/10/2005, 15h04

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