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

Java Discussion :

exceptions de java web start


Sujet :

Java

  1. #1
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut exceptions de java web start
    je veux d�ployer une application en utilisant le java web start mais quand je veux lancer mon programme via une page web j'aurai les exceptions suivantes:
    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
     
    com.sun.deploy.net.FailedDownloadException: Impossible de charger la ressource : <a href="http://localhost:8080/starjavapos.jnlp" target="_blank">http://localhost:8080/starjavapos.jnlp</a>
    	at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
    	at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
    	at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
    	at com.sun.javaws.Launcher.launch(Unknown Source)
    	at com.sun.javaws.Main.launchApp(Unknown Source)
    	at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    	at com.sun.javaws.Main$1.run(Unknown Source)
    	at java.lang.Thread.run(Unknown Source)
    voici mon fichier .jnlp:
    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
     
    <?xml version="1.0" encoding="UTF-8"?>
     
    <jnlp spec="1.0+" codebase="http://localhost:8080" href="starjavapos.jnlp">
    <!-- jnlp tag comment : change the codebase attribute to point to your server and the href attribute to point to your jnlp file -->
     
        <information>
        <!-- information tag comment - change the below information to describe your application, anything is OK -->
     
            <title>StarJavaPOS</title>
            <vendor>Star Micronics</vendor>
            <homepage href="starjavapos-jnlp.html"/>
            <description>StarJavaPOS - Java Web Start Example</description>
            <description kind="short">StarJavaPOS-JWS</description>
     
            <offline-allowed/>
            <!-- offline tag comment : if this tag is present then this application is allowed to be executed from the local cache without an internet connection -->
     
        </information>
     
        <security>
        <!-- security tag comment : this tag is required because StarJavaPOS needs communications port access  -->
     
            <all-permissions/>
        </security>
     
        <resources>
            <!-- resources tag comment : list all JAR files required for your application here (the ones listed below are required for StarJavaPOS) -->
     
            <j2se version="1.4+"/>
            <!--j2se tag comment : specify the J2SE version required for your application -->
     
            <jar href="javapos-registry_signed.jar"/>
    		<jar href="jcl_signed.jar"/>
    		<jar href="jpos17-controls_signed.jar"/>
    		<jar href="jpos1122_signed.jar"/>
    		<jar href="jpos1122-controls_signed.jar"/>
    		<jar href="jpos_signed.jar"/>
    		<jar href="POSPrinterService_signed.jar"/>
    		<jar href="starjavapos_signed.jar"/>    
            <jar href="xercesimpl_signed.jar"/>
            <jar href="xml-apis_signed.jar"/>
     
     
     
     
     
        </resources>
     
        <resources os="Windows">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Windows computer (primarily DLLs) -->
     
            <nativelib href="star-windows-libs_signed"/>
        </resources>
     
        <resources os="Linux" arch="i386">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Linux computer (primarily SOs) -->
     
            <nativelib href="star-linux-libs_signed"/>
        </resources>
     
        <resources os="Mac OS X" arch="ppc">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Mac computer (primarily JNILIBs) -->
     
            <nativelib href="star-mac-libs_signed"/>
        </resources>
     
        <application-desc main-class="fr.application.impression.jpos.StarReceiptTest"/>
        <!-- application desc tag comment : this tag specifies the package and class name of your application's Main Class  -->
     
    </jnlp>
    merci pour votre aide

  2. #2
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    La page "http://localhost:8080/starjavapos.jnlp" n'existe pas. Tu n'aurais pas fait un faute de frappe dans le nom de fichier?

  3. #3
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut exception de java web start
    si le chemin du fichier .jnlp est correct

  4. #4
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    Quand tu clique sur le lien dance forum, ca fonctionne? http://localhost:8080/starjavapos.jnlp

    En g�n�ral mettre 'localhost' dans le codebase est une mauvaise id�e, tes clients auraont du mal � ce connecter avec cette adresse. Met plutot au minimum l'ip/le nom de la machine concern�e.

  5. #5
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    vous avez raison le lien �a marche pas j'ai corrig� le chemin dans le fichier .jnlp comme suit :
    <jnlp spec="1.0+" codebase="http://localhost:8080/jpos_signed" href="starjavapos.jnlp"> et voici l'erreur que j'ai maintenant : impossible de v�rifier la signature dans la ressource //localhost:8080/jpos_signed/javapos-registry_signed

  6. #6
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    en fait j'ai int�ret � signer mes fichiers jars parce que l'application acc�de � des ressources(ports de communication..) mais je suis pas s�r que la signature a �t� correctement faite

  7. #7
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    voici un exemple de signature du fichier jcl.jar:
    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
     
    C:\jarjar>keytool -genkey -keystore jcl_signed -alias jcl.jar
    Tapez le mot de passe du Keystore :
    Ressaisissez le nouveau mot de passe :
    Quels sont vos prÚnom et nom ?
      [Unknown] :  rizki rizki
    Quel est le nom de votre unitÚ organisationnelle ?
      [Unknown] :  rizki
    Quelle est le nom de votre organisation ?
      [Unknown] :  rizki
    Quel est le nom de votre ville de rÚsidence ?
      [Unknown] :  rizki
    Quel est le nom de votre Útat ou province ?
      [Unknown] :  maroc
    Quel est le code de pays Ó deux lettres pour cette unitÚ ?
      [Unknown] :  ma
    Est-ce CN=rizki rizki, OU=rizki, O=rizki, L=rizki, ST=maroc, C=ma ?
      [non] :  oui
     
    SpÚcifiez le mot de passe de la clÚ pour <jcl.jar>
            (appuyez sur EntrÚe s'il s'agit du mot de passe du Keystore) :
     
    C:\jarjar>keytool -selfcert -alias jcl.jar -keystore jcl_signed
    Tapez le mot de passe du Keystore :
     
    C:\jarjar>keytool -list -keystore jcl_signed
    Tapez le mot de passe du Keystore :
     
    Type Keystore : JKS
    Fournisseur Keystore : SUN
     
    Votre Keystore contient 1 entrÚe(s)
     
    jcl.jar, 8 ao¹t 2009, PrivateKeyEntry,
    Empreinte du certificat (MD5) : 69:90:2A:14:C7:B8:2F:EB:90:A8:EA:82:43:0A:02:B4

  8. #8
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    Le keystore sert uniquement � stocker des certificats. Pour signer des jar il faut utiliser jarsigner.

  9. #9
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    j'ai trouv� cela sur le net merci de me v�rifier la syntaxe

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    keytool -genkey -alias jcl_signature -keystore monStore
     
    jarsigner -keystore monStore -signedjar jcl_signed.jar Jcl.jar jcl_signature

  10. #10
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    j'ai sign� les fichiers .jar et j'arrive � lancer Jws mais il y a une erreur :
    impossible de trouver la classe principale com.starmicronis.javapos.POSPrinterExerciser dans http://localhost:8080/projet/jpos-registry_signed.jar sachant que c la m�me class main dans mon fichier .jnlp merci bcp pour votre aide

  11. #11
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    on peux voir ton jnlp actuel? ainsi que la sortie de la commande
    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    jar tf jpos-registry_signed.jar

  12. #12
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    comment ajouter ma class main dans mon fichier .xml de configuration associ� au fichier javapos-registry_signed.jar?
    merci pour votre aide

  13. #13
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    voici mon fichier .jnlp actuel:
    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
    <?xml version="1.0" encoding="UTF-8"?>
     
    <jnlp spec="1.0+" codebase="http://localhost:8080/projet" href="starjavapos.jnlp">
    <!-- jnlp tag comment : change the codebase attribute to point to your server and the href attribute to point to your jnlp file -->
     
        <information>
        <!-- information tag comment - change the below information to describe your application, anything is OK -->
     
            <title>StarJavaPOS</title>
            <vendor>Star Micronics</vendor>
            <homepage href="starjavapos-jnlp.html"/>
            <description>StarJavaPOS - Java Web Start Example</description>
            <description kind="short">StarJavaPOS-JWS</description>
     
            <offline-allowed/>
            <!-- offline tag comment : if this tag is present then this application is allowed to be executed from the local cache without an internet connection -->
     
        </information>
     
        <security>
        <!-- security tag comment : this tag is required because StarJavaPOS needs communications port access  -->
     
            <all-permissions/>
        </security>
     
        <resources>
            <!-- resources tag comment : list all JAR files required for your application here (the ones listed below are required for StarJavaPOS) -->
     
            <j2se version="1.4+"/>
            <!--j2se tag comment : specify the J2SE version required for your application -->
     
            <jar href="javapos-registry_signed.jar"/>
    		<jar href="jcl_signed.jar"/>
    		<jar href="jpos17-controls_signed.jar"/>
    		<jar href="jpos1122_signed.jar"/>
    		<jar href="jpos1122-controls_signed.jar"/>
    		<jar href="jpos_signed.jar"/>
    		<jar href="POSPrinterService_signed.jar"/>
    		<jar href="starjavapos_signed.jar"/>
            <jar href="xercesImpl-2.7.1_signed.jar"/>     
            <jar href="xercesimpl_signed.jar"/>
            <jar href="xml-apis_signed.jar"/>
        </resources>
     
        <resources os="Windows">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Windows computer (primarily DLLs) -->
     
            <nativelib href="star-windows-libs_signed.jar"/>
        </resources>
     
        <resources os="Linux" arch="i386">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Linux computer (primarily SOs) -->
     
            <nativelib href="star-linux-libs_signed.jar"/>
        </resources>
     
        <resources os="Mac OS X" arch="ppc">
        <!-- resources tag comment : this tag specifies those additional JAR files required when this application is run on a Mac computer (primarily JNILIBs) -->
     
            <nativelib href="star-mac-libs_signed.jar"/>
        </resources>
     
        <application-desc main-class="fr.application.impression.jpos.StarReceiptTest"/>
        <!-- application desc tag comment : this tag specifies the package and class name of your application's Main Class  -->
     
    </jnlp>
    pour la sortie de la commande voici le resultat:

    META-INF/MANIFEST.MF
    META-INF/SIGNATUR.SF
    META-INF/SIGNATUR.DSA
    META-INF/
    jpos.xml

  14. #14
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    tu peux faire le m�me avec le jar cens� contenir ton main? Je pensais que c'�tait celui l� :p

    Edit: Est-ce normal que tu parle de com.starmicronis.javapos.POSPrinterExerciser alors que ton jnlp mentionne fr.application.impression.jpos.StarReceiptTest?

  15. #15
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    comment ajouter ma class main dans mon fichier .xml de configuration associ� au fichier javapos-registry_signed.jar?
    merci pour votre aide

  16. #16
    Expert �minent
    Avatar de tchize_
    Homme Profil pro
    Ing�nieur d�veloppement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 482
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 46
    Localisation : Belgique

    Informations professionnelles :
    Activit� : Ing�nieur d�veloppement logiciels
    Secteur : High Tech - �diteur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 482
    Par d�faut
    j'ai pas trop compris ta question l�. Ta classe main, t l'a d�j� d�finie dans le jnlp. Maintenant, il faut que toutes tes classes soient pr�sentes dans tes jar, sinon java webstart il aura un peu du mal � fonctionner si il manque des classes. Ton main que tu r�f�rence dans ton jnlp, tu l'a mis dans quel jar?

  17. #17
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    d�sol� je vous ai montr� la 1�re version de mon fichier.jnlp dans lequel la classe main est:fr.application.impression.jpos.StarReceiptTest mais la derni�re version diff�re seulement au niveau de la classe main "com.starmicronis.javapos.POSPrinterExerciser "m�me si ma classe main est "fr.application.impression.jpos.StarReceiptTest "

    voici la sortie de commande jar tf sur mon fichier d'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
    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
    C:\Documents and Settings\amine\Bureau\jpos-registry sans modifier .xml>cd C:\P
    ogram Files\Apache Software Foundation\Tomcat 5.5\webapps\projet
     
    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\projet>jar tf jp
    s_signed.jar
    META-INF/MANIFEST.MF
    META-INF/SIGNATUR.SF
    META-INF/SIGNATUR.DSA
    fr/application/impression/jpos/StarReceiptTest.class
    fr/application/impression/jpos/StarCashDrawerTest.class
    fr/application/impression/jpos/PINPadRead.class
    fr/application/impression/jpos/StarDirectIOTest.class
    fr/application/impression/jpos/ClientSocketTest.class
    fr/application/impression/jpos/SimpleAppLauncher$1.class
    fr/application/impression/jpos/SimpleAppLauncher.class
    fr/application/impression/jpos/POSPrinterService.class
    fr/application/impression/jpos/DebugFrame.class
    fr/application/impression/jpos/SimplePOSPrinterApp.class
    fr/application/impression/jpos/jpos.xml
    .classpath
    .project
    RXTXcomm.jar
    build/classes/.netbeans_automatic_build
    build/classes/fr/application/impression/jpos/ClientSocketTest.class
    build/classes/fr/application/impression/jpos/DebugFrame.class
    build/classes/fr/application/impression/jpos/PINPadRead.class
    build/classes/fr/application/impression/jpos/POSPrinterService.class
    build/classes/fr/application/impression/jpos/SimpleAppLauncher$1.class
    build/classes/fr/application/impression/jpos/SimpleAppLauncher.class
    build/classes/fr/application/impression/jpos/SimplePOSPrinterApp.class
    build/classes/fr/application/impression/jpos/StarCashDrawerTest.class
    build/classes/fr/application/impression/jpos/StarDirectIOTest.class
    build/classes/fr/application/impression/jpos/StarReceiptTest.class
    build.xml
    comm.jar
    javapos-registry.jar
    jpos.xml
    jpos1122-controls.jar
    jpos1122.jar
    jpos17-controls.jar
    jps.jar
    nbproject/build-impl.xml
    nbproject/genfiles.properties
    nbproject/private/private.properties
    nbproject/project.properties
    nbproject/project.xml
    star-linux-libs.jar
    star-mac-libs.jar
    star-windows-libs.jar
    star.gif
    starjavapos.jar
    starjavapos.jnlp
    merci bcp pour votre aide

  18. #18
    Membre confirm�
    Inscrit en
    Mars 2008
    Messages
    64
    D�tails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 64
    Par d�faut
    bonjour, �a marche bien maintenant le probl�me c'�tait dans la d�claration des fichiers .jar je devais seulement d�clarer le fichier jpos_signed.jar contenant ma classe main au d�but merci beaucoup pour votre aide

Discussions similaires

  1. exception lors du lancement avec java web start
    Par isoman dans le forum Glassfish et Payara
    R�ponses: 7
    Dernier message: 18/05/2009, 23h01
  2. Exception sur Java Web Start
    Par Le Bressan dans le forum JWS
    R�ponses: 5
    Dernier message: 01/02/2005, 10h52
  3. [Info]D�veloppement Java Web Start
    Par szdavid dans le forum Interfaces Graphiques en Java
    R�ponses: 5
    Dernier message: 26/01/2005, 16h59
  4. java web start qui veut pas se lancer
    Par calvin dans le forum JWS
    R�ponses: 4
    Dernier message: 30/06/2004, 11h42
  5. [JNDI] Equivalent avec Java Web Start ?
    Par cameleon2002 dans le forum Java EE
    R�ponses: 8
    Dernier message: 18/09/2003, 18h55

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