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

Servlets/JSP Java Discussion :

JaspertReport coupe Apache


Sujet :

Servlets/JSP Java

  1. #1
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut JaspertReport coupe Apache
    Bonjour à tous,

    Voilà j'ai enfin terminer mon projet il fonctionne nickel et j'arrive à générer mes document avec jaspertreport et iReports

    par contre j'ai un "bug" que je n'arrive pas à comprendre et à résoudre

    une fois que je lance la méthode pour générer mon pdf, il me le génère bien mais après si je regarder dans ecplise j'ai mon tomacat qui est stoper, je dois donc re lancer le projet aussi non il ne fonctionne plus.

    avez vous déjà eu le cas, avez vous une piste pour résoudre cela ?

    je vous met en annexe le code de ma classe

    Encore merci à tous,

    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
    	/**
    	 * Méthode permettant la création et la génération de lettre au format pdf
    	 * pour toute les services qui peuvent fournir une ou plusieurs ressources
    	 * 
    	 * @param id
    	 *            id du registerForm en cours de traitement
    	 * @author Lemaitre Rudy
    	 */
    	public Boolean printResources(String idForm) throws SQLException {
    		JasperDesign jasperDesign = null;
    		JasperReport jasperReport = null;
    		JasperPrint jasperPrint = null;
    		File file = null;
    		Boolean validationPdf=false;
    		Boolean validationSql=false;
     
    		// chargement et compilation du rapport
    		try {
    			log.debug("Chargement du template : " + Constant.templates
    					+ "en cour");
    			jasperDesign = JRXmlLoader.load(Constant.templates);
    			log.debug("Chargement du template réussi");
     
    			jasperReport = JasperCompileManager.compileReport(jasperDesign);
    			log.debug("Chargement du template dans le compilateur : ok");
    			// paramètres à envoyer au rapport
    			Map parameters = new HashMap();
    			parameters.put("id", idForm);
     
    			// execution du rapport
    			jasperPrint = JasperFillManager.fillReport(jasperReport,
    					parameters, DbConnection.getInstance());
    			log.debug("Execution du rapport");
     
    			// création du rapport au format pdf
    			// Création du format de la date pour le répertoire
    			SimpleDateFormat dateFormatDirectory = new SimpleDateFormat("yyyy");
    			String dateDirectory = dateFormatDirectory.format(new Date());
    			// Création du format de la date pour le fichier
    			SimpleDateFormat dateFormat = new SimpleDateFormat(
    					"yyyy_MM_dd-HH-mm-ss");
    			String date = dateFormat.format(new Date());
     
    			// au besoin on creer le dossier principal des archive et le sous
    			// dossier qui correspond à l'année en cour
    			new File(Constant.dossierUplaod + dateDirectory).mkdirs();
     
    			// on donne le chemin d'écriture au fichier ainsi que sont nom
    			// et on le met dans l'année en cours
    			file = new File(Constant.dossierUplaod + dateDirectory, idForm
    					+ "_" + "Lettre" + "_" + date + ".pdf");
     
    			//Affiche le document à l'utilisateur
    			JasperViewer.viewReport(jasperPrint);
     
    			// Création du pdf
    			JasperExportManager.exportReportToPdfFile(jasperPrint,
    					file.getAbsolutePath());
    			log.debug("Génération du pdf en cours");
     
    			//opération réussie alors on dit youpie :)
    			validationPdf=true;
     
    		}
    		catch (JRException e) {
    			e.printStackTrace();
    		}
    		finally {
    			DbConnection.closeConnection();
    			log.debug("Déconnexion effectuée");
    			log.debug("document générer");
    		}
    		if(validationPdf){
    			// on écrit les informations de l'upload dans la db
    			AddDocumentLinkDAO documentLink = new AddDocumentLinkMySqlImpl();
     
    			try {
    				documentLink.addDocumentLink(idForm, file.getName(),
    						file.getAbsolutePath());
    				log.debug("Lien physique du fichier ajouter en base de données");
    				// on valide pour la valeur de retour;
    				validationSql = true;
    			}
    			catch (Exception e) {
    				log.error("Impossible d'ajouter le lien physique du document en base de données");
    				e.printStackTrace();
    			}
    		}
    		return validationSql;		
    	}

  2. #2
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Chelou ton pb, tu utilises eclipse + tomcat pour deploier ou juste tomcat dans ton test?

  3. #3
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Chelou ton pb, tu utilises eclipse + tomcat pour deploier ou juste tomcat dans ton test?
    oui c'est bizard.

    je lance le projet via run as dans eclipse, mais je comprend pas pourquoi

  4. #4
    Membre chevronné Avatar de florentB
    Homme Profil pro
    Développeur Java
    Inscrit en
    Décembre 2006
    Messages
    332
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Décembre 2006
    Messages : 332
    Par défaut
    Est-ce que c'est pour un rapport en particulier ou pour tous les rapports JASPER ?

    Peux-tu poster le code de ta page JASPER ?

  5. #5
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Testes un peu ton appli hors eclipse voir, en d'autres termes copie ton war manuellement sous tomact, redemarres le manuellement et refais le test.

  6. #6
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Bonjour,
    oui j'ai cela sur tout les rapports.
    pour le war j'essaye surement ce soir car ici je n'ai plus accès à ma db
    voici le code :
    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
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
     
    /**
     * 
     */
    package be.festiwavre.model.rl.printFilesDocuments;
     
    import java.io.File;
    import java.sql.SQLException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.HashMap;
    import java.util.Map;
     
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.design.JasperDesign;
    import net.sf.jasperreports.engine.xml.JRXmlLoader;
    import net.sf.jasperreports.view.JasperViewer;
     
    import org.apache.log4j.Logger;
    import org.codehaus.groovy.tools.groovydoc.ClasspathResourceManager;
     
    import be.festiwavre.dao.constant.Constant;
    import be.festiwavre.dao.rl.addDocumentLink.AddDocumentLinkDAO;
    import be.festiwavre.dao.rl.addDocumentLink.AddDocumentLinkMySqlImpl;
    import be.festiwavre.dao.rl.connection.DbConnection;
     
    /**
     * <p>
     * Classe pour la récupération d'information dans le but de créer des lettres
     * type
     * </p>
     * 
     * @author Rudy Lemaitre *
     */
    public class PrintResourcesModel implements PrintResourcesInterface {
     
    	/**
    	 * Constructeur
    	 */
    	public PrintResourcesModel() {
    		super();
    	}
     
    	/**
    	 * mise en service du logger
    	 */
    	private static final Logger log = Logger
    			.getLogger(PrintResourcesModel.class);
     
    	/**
    	 * Méthode permettant la création et la génération de lettre au format pdf
    	 * pour toute les services qui peuvent fournir une ou plusieurs ressources
    	 * 
    	 * @param id
    	 *            id du registerForm en cours de traitement
    	 * @author Lemaitre Rudy
    	 */
    	public Boolean printResources(String idForm) throws SQLException {
    		JasperDesign jasperDesign = null;
    		JasperReport jasperReport = null;
    		JasperPrint jasperPrint = null;
    		File file = null;
    		Boolean validationPdf = false;
    		Boolean validationSql = false;
     
    		// chargement et compilation du rapport
    		try {
    			log.debug("Chargement du template : " + Constant.templates
    					+ "en cour");
    			jasperDesign = JRXmlLoader.load(Constant.templates);
    			log.debug("Chargement du template réussi");
     
    			jasperReport = JasperCompileManager.compileReport(jasperDesign);
    			log.debug("Chargement du template dans le compilateur : ok");
    			// paramètres à envoyer au rapport
    			Map parameters = new HashMap();
    			parameters.put("id", idForm);
     
    			// execution du rapport
    			jasperPrint = JasperFillManager.fillReport(jasperReport,
    					parameters, DbConnection.getInstance());
    			log.debug("Execution du rapport");
     
    			// création du rapport au format pdf
    			// Création du format de la date pour le répertoire
    			SimpleDateFormat dateFormatDirectory = new SimpleDateFormat("yyyy");
    			String dateDirectory = dateFormatDirectory.format(new Date());
    			// Création du format de la date pour le fichier
    			SimpleDateFormat dateFormat = new SimpleDateFormat(
    					"yyyy_MM_dd-HH-mm-ss");
    			String date = dateFormat.format(new Date());
     
    			// au besoin on creer le dossier principal des archive et le sous
    			// dossier qui correspond à l'année en cour
    			new File(Constant.dossierUplaod + dateDirectory).mkdirs();
     
    			// on donne le chemin d'écriture au fichier ainsi que sont nom
    			// et on le met dans l'année en cours
    			file = new File(Constant.dossierUplaod + dateDirectory, idForm
    					+ "_" + "LettreAll" + "_" + date + ".pdf");
     
    			// Affiche le document à l'utilisateur
    			JasperViewer.viewReport(jasperPrint);
     
    			// Création du pdf
    			JasperExportManager.exportReportToPdfFile(jasperPrint,
    					file.getAbsolutePath());
    			log.debug("Génération du pdf en cours");
     
    			// opération réussie alors on dit youpie :)
    			validationPdf = true;
     
    		} catch (JRException e) {
    			e.printStackTrace();
    		} finally {
    			DbConnection.closeConnection();
    			log.debug("Déconnexion effectuée");
    			log.debug("document générer");
    		}
    		if (validationPdf) {
    			// on écrit les informations de l'upload dans la db
    			AddDocumentLinkDAO documentLink = new AddDocumentLinkMySqlImpl();
     
    			try {
    				documentLink.addDocumentLink(idForm, file.getName(),
    						file.getAbsolutePath());
    				log.debug("Lien physique du fichier ajouter en base de données");
    				// on valide pour la valeur de retour;
    				validationSql = true;
    			} catch (Exception e) {
    				log.error("Impossible d'ajouter le lien physique du document en base de données");
    				e.printStackTrace();
    			}
    		}
    		return validationSql;
    	}
     
    	/**
    	 * Méthode permettant la création et la génération de lettre duplicata au
    	 * format pdf pour toute les services qui peuvent fournir une ou plusieurs
    	 * ressources surcharge de méthode
    	 * 
    	 * @param String
    	 *            id du registerForm en cours de traitement
    	 * @param String
    	 *            id du services concerner
    	 * 
    	 * @author Lemaitre Rudy
    	 */
    	public Boolean printResources(String idForm, String idResources)
    			throws SQLException {
    		JasperDesign jasperDesign = null;
    		JasperReport jasperReport = null;
    		JasperPrint jasperPrint = null;
    		File file = null;
    		Boolean validationPdf = false;
    		Boolean validationSql = false;
     
    		// chargement et compilation du rapport
    		try {
    			log.debug("Chargement du template : " + Constant.templates
    					+ "en cour");
    			jasperDesign = JRXmlLoader.load(Constant.templatesDUP);
    			log.debug("Chargement du template réussi");
     
    			jasperReport = JasperCompileManager.compileReport(jasperDesign);
    			log.debug("Chargement du template dans le compilateur : ok");
    			// paramètres à envoyer au rapport
    			Map parameters = new HashMap();
    			parameters.put("id", idForm);
    			parameters.put("idServ", idResources);
     
    			// execution du rapport
    			jasperPrint = JasperFillManager.fillReport(jasperReport,
    					parameters, DbConnection.getInstance());
    			log.debug("Execution du rapport");
     
    			// création du rapport au format pdf
    			// Création du format de la date pour le répertoire
    			SimpleDateFormat dateFormatDirectory = new SimpleDateFormat("yyyy");
    			String dateDirectory = dateFormatDirectory.format(new Date());
    			// Création du format de la date pour le fichier
    			SimpleDateFormat dateFormat = new SimpleDateFormat(
    					"yyyy_MM_dd-HH-mm-ss");
    			String date = dateFormat.format(new Date());
     
    			// au besoin on creer le dossier principal des archive et le sous
    			// dossier qui correspond à l'année en cour
    			new File(Constant.dossierUplaod + dateDirectory).mkdirs();
     
    			// on donne le chemin d'écriture au fichier ainsi que sont nom
    			// et on le met dans l'année en cours
    			file = new File(Constant.dossierUplaod + dateDirectory, idForm
    					+ "_" + "LettreDup" + "_" + date + ".pdf");
     
    			// Affiche le document à l'utilisateur
    			JasperViewer.viewReport(jasperPrint);
     
    			// Création du pdf
    			JasperExportManager.exportReportToPdfFile(jasperPrint,
    					file.getAbsolutePath());
    			log.debug("Génération du pdf en cours");
     
    			// opération réussie alors on dit youpie :)
    			validationPdf = true;
     
    		} catch (JRException e) {
    			e.printStackTrace();
    		} finally {
    			DbConnection.closeConnection();
    			log.debug("Déconnexion effectuée");
    			log.debug("document générer");
    		}
    		if (validationPdf) {
    			// on écrit les informations de l'upload dans la db
    			AddDocumentLinkDAO documentLink = new AddDocumentLinkMySqlImpl();
     
    			try {
    				//le 1 dans l'ajout en db signifie que cela est un document duplicate
    				documentLink.addDocumentLink(idForm, file.getName(),
    						file.getAbsolutePath(),"1");
    				log.debug("Lien physique du fichier ajouter en base de données");
    				// on valide pour la valeur de retour;
    				validationSql = true;
    			} catch (Exception e) {
    				log.error("Impossible d'ajouter le lien physique du document en base de données");
    				e.printStackTrace();
    			}
    		}
    		return validationSql;
    	}
     
    }

  7. #7
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Testes un peu ton appli hors eclipse voir, en d'autres termes copie ton war manuellement sous tomact, redemarres le manuellement et refais le test.
    Voilà j'ai refait le test et même uniquement le serveur Apache et le war, cela donne la même chose

    As tu une autre idée ?

  8. #8
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Que disent les logs de tomcat? fichier catalinat.out

  9. #9
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Que disent les logs de tomcat? fichier catalinat.out
    voici les logs, j'y comprend pas grand chose

    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
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
     
    22-juin-2011 8:59:23 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files (x86)\ActiveState Komodo Edit 5\;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Belgium Identity Card;C:\Program Files (x86)\Druide\Antidote 7\Programmes32;C:\Program Files (x86)\Druide\Antidote 7\Programmes64;C:\Program Files (x86)\QuickTime\QTSystem\
    22-juin-2011 8:59:23 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:PaperLandReviewed' did not find a matching property.
    22-juin-2011 8:59:23 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Evynile' did not find a matching property.
    22-juin-2011 8:59:23 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:FestiWavre' did not find a matching property.
    22-juin-2011 8:59:23 org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    22-juin-2011 8:59:23 org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 8:59:23 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 525 ms
    22-juin-2011 8:59:23 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    22-juin-2011 8:59:23 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
    22-juin-2011 8:59:24 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire docs de l'application web
    22-juin-2011 8:59:24 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire examples de l'application web
    22-juin-2011 8:59:25 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire host-manager de l'application web
    22-juin-2011 8:59:25 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire manager de l'application web
    22-juin-2011 8:59:25 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire ROOT de l'application web
    22-juin-2011 8:59:25 org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    22-juin-2011 8:59:25 org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 8:59:25 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2064 ms
    22-juin-2011 9:01:13 org.apache.catalina.core.StandardContext reload
    INFO: Le rechargement du contexte [/FestiWavre] a démarré
    22-juin-2011 9:01:13 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    GRAVE: The web application [/FestiWavre] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    22-juin-2011 9:01:14 org.apache.catalina.core.StandardContext reload
    INFO: Le rechargement de ce contexte est terminé
    22-juin-2011 9:01:58 org.apache.coyote.AbstractProtocolHandler pause
    INFO: Pausing ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:01:59 org.apache.coyote.AbstractProtocolHandler pause
    INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 9:02:00 org.apache.catalina.core.StandardService stopInternal
    INFO: Arrêt du service Catalina
    22-juin-2011 9:02:00 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    GRAVE: The web application [/FestiWavre] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    22-juin-2011 9:02:00 org.apache.coyote.AbstractProtocolHandler stop
    INFO: Stopping ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:02:00 org.apache.coyote.AbstractProtocolHandler stop
    INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 9:08:07 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files (x86)\ActiveState Komodo Edit 5\;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Belgium Identity Card;C:\Program Files (x86)\Druide\Antidote 7\Programmes32;C:\Program Files (x86)\Druide\Antidote 7\Programmes64;C:\Program Files (x86)\QuickTime\QTSystem\
    22-juin-2011 9:08:07 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:PaperLandReviewed' did not find a matching property.
    22-juin-2011 9:08:07 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Evynile' did not find a matching property.
    22-juin-2011 9:08:07 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:FestiWavre' did not find a matching property.
    22-juin-2011 9:08:07 org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:08:07 org.apache.coyote.AbstractProtocolHandler init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 9:08:07 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 484 ms
    22-juin-2011 9:08:07 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    22-juin-2011 9:08:07 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.12
    22-juin-2011 9:08:08 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire docs de l'application web
    22-juin-2011 9:08:08 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire examples de l'application web
    22-juin-2011 9:08:08 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire host-manager de l'application web
    22-juin-2011 9:08:08 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire manager de l'application web
    22-juin-2011 9:08:08 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire ROOT de l'application web
    22-juin-2011 9:08:08 org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:08:08 org.apache.coyote.AbstractProtocolHandler start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 9:08:08 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1496 ms
    22-juin-2011 9:09:23 org.apache.coyote.AbstractProtocolHandler pause
    INFO: Pausing ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:09:24 org.apache.coyote.AbstractProtocolHandler pause
    INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
    22-juin-2011 9:09:25 org.apache.catalina.core.StandardService stopInternal
    INFO: Arrêt du service Catalina
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    GRAVE: The web application [/FestiWavre] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    GRAVE: The web application [/FestiWavre] appears to have started a thread named [AWT-Shutdown] but has failed to stop it. This is very likely to create a memory leak.
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    GRAVE: The web application [/FestiWavre] appears to have started a thread named [AWT-EventQueue-0] but has failed to stop it. This is very likely to create a memory leak.
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    GRAVE: The web application [/FestiWavre] appears to have started a thread named [Image Fetcher 0] but has failed to stop it. This is very likely to create a memory leak.
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@516a4aef]) and a value of type [java.lang.Class] (value [class test_dataset1_1308726549728_814607]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1d45d135]) and a value of type [net.sf.jasperreports.engine.export.legacy.BorderOffset$1] (value [net.sf.jasperreports.engine.export.legacy.BorderOffset$1@52a9fd96]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1647ad40]) and a value of type [org.apache.commons.collections.ReferenceMap] (value [{WebappClassLoader
      context: /FestiWavre
      delegate: false
      repositories:
        /WEB-INF/classes/
    ----------> Parent Classloader:
    org.apache.catalina.loader.StandardClassLoader@73995d80
    =com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl@c596a7a}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1d45d135]) and a value of type [net.sf.jasperreports.engine.export.legacy.BorderOffset$1] (value [net.sf.jasperreports.engine.export.legacy.BorderOffset$1@52a9fd96]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    GRAVE: The web application [/FestiWavre] created a ThreadLocal with key of type [net.sf.jasperreports.engine.util.JRFontUtil$1] (value [net.sf.jasperreports.engine.util.JRFontUtil$1@b4aa453]) and a value of type [java.util.HashSet] (value [[]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
    22-juin-2011 9:09:25 org.apache.coyote.AbstractProtocolHandler stop
    INFO: Stopping ProtocolHandler ["http-bio-8080"]
    22-juin-2011 9:09:25 org.apache.coyote.AbstractProtocolHandler stop
    INFO: Stopping ProtocolHandler ["ajp-bio-8009"]

  10. #10
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Ce serait visiblement lié à une fuite mémoire, c'est une erreur connue sous jdk6 et tomcat6, t'as un exemple de résolution ici Faut avoir le reflexe de lire les traces d'execution et eventuellement demander la réponse à google avec ces traces .

  11. #11
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Ce serait visiblement lié à une fuite mémoire, c'est une erreur connue sous jdk6 et tomcat6, t'as un exemple de résolution ici Faut avoir le reflexe de lire les traces d'execution et eventuellement demander la réponse à google avec ces traces .
    je ne comprend pas très bien, peux tu m'endire plus ? je suis en tomcat 7 aussi et non 6, je comprend pas

    comment à tu vu cela ?

  12. #12
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Quels sont tes framework utilisés? Pour voir cela, tu copies l'erreur, notamment cette ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    created a ThreadLocal with key of type [java.lang.ThreadLocal]
    c'est elle qui signale l'arret brutale de ton serveur et tu mets dans google, t'auras pleines de personnes qui l'ont eue. C'est pas sorcier

  13. #13
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Quels sont tes framework utilisés? Pour voir cela, tu copies l'erreur, notamment cette ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    created a ThreadLocal with key of type [java.lang.ThreadLocal]
    c'est elle qui signale l'arret brutale de ton serveur et tu mets dans google, t'auras pleines de personnes qui l'ont eue. C'est pas sorcier
    sorry de faire le boulet, je début vraiment dans cela et je ne voyais vraiment pas ou étais le problème et comment tu l'avais trouvé je demande.
    cette ligne ne me dit vraiment rien

    je vais regarder sur google

    niveau framework je n'ai que log4j et jasperreports, pour autant que cela sois des framework

    je voulais juste savoir pour la prochaine fois, c'est par l'erreur que l'on apprend.

  14. #14
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Je t'ai envoyé un lien qui te dit comment résoudre ton pb, utilises tu JSF ?

  15. #15
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Je t'ai envoyé un lien qui te dit comment résoudre ton pb, utilises tu JSF ?
    non je n'utilise pas de jsf

    pour le liens j'essaye mais cela ne fonctionne pas non plus

    je suis en jsp qui appel un servlet qui lui appel une méthode de mon modèle qui elle fait le traitement pour la génération du pdf

    voilà en résumer

    je viens de passer en tomcat 7.0.16 mais rien ne change

  16. #16
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Et si tu utilises tomcat 5 avec jdk5, ca donne quoi?

  17. #17
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Et si tu utilises tomcat 5 avec jdk5, ca donne quoi?
    je n'ai pas essayer mais cela va me posé des problème car j'utilise des servlets 3.0 c'est déjà pour cela que j'ai du passer en tomcat 7

  18. #18
    Membre Expert
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Juin 2007
    Messages
    2 938
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 938
    Par défaut
    Ce souci de perte mémoire est visiblement apparu depuis la tomcat 6, comme je pensais, ce tuto aussi en parle. Bouquine un peu la dessus, je ne peux mieux t'aider sorry.

  19. #19
    Membre confirmé
    Homme Profil pro
    Développeur Java
    Inscrit en
    Juin 2009
    Messages
    132
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Juin 2009
    Messages : 132
    Par défaut
    Citation Envoyé par DevServlet Voir le message
    Ce souci de perte mémoire est visiblement apparu depuis la tomcat 6, comme je pensais, ce tuto aussi en parle. Bouquine un peu la dessus, je ne peux mieux t'aider sorry.
    Yes, grâce à tes infos j'ai trouver le problème.
    en réalité dans mon code j'utilise ceci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    // Affiche le document à l'utilisateur
    			JasperViewer.viewReport(jasperPrint);
    Qui ouvre une fenetre avec le document, et quand je ferme la fenêtre du pdf alors il coupe tomcat, pourquoi ? je ne sais pas, mais le problème viens de là

    encore merci pour ton aide

  20. #20
    Membre averti
    Homme Profil pro
    Étudiant
    Inscrit en
    Septembre 2011
    Messages
    19
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Septembre 2011
    Messages : 19
    Par défaut
    L'ajout de false a viewReport régle le problème.

    JasperViewer.viewReport(jasperPrint, false);

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Tutoriels pour Apache
    Par Marc Lussac dans le forum Apache
    Réponses: 8
    Dernier message: 11/11/2009, 20h10
  2. Apache ne demarre pas a tous les coups
    Par bastien03 dans le forum Apache
    Réponses: 6
    Dernier message: 22/06/2007, 11h25
  3. Réponses: 2
    Dernier message: 05/12/2002, 16h55
  4. Réponses: 6
    Dernier message: 28/10/2002, 11h34
  5. Tomcat + Apache-SOAP
    Par lucho31 dans le forum Services Web
    Réponses: 3
    Dernier message: 17/10/2002, 09h55

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