Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1597 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  mon programme ne trouve pas la classe

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

mon programme ne trouve pas la classe

n°1793029
nina08
Posté le 28-09-2008 à 14:01:05  profilanswer
 

bonjours tous le monde
Je dois rajouter un module a un logicile open source "jhove"
Je l'ai rajouté dans le repetroire: /home/jhove/classes/edu/harvard/hul/ois/jhove/module/Project/
 
la compilation a très bien marché.
 
j'ai aussi rajoué:
EXTRA_JARS=/home/jhove/classes/edu/harvard/hul/ois/jhove/module/Project/WarcModule.jar:/home/jhove/classes/edu/harvard/hul/ois/jhove/module/Project/jhove.jar:
au fichier jhove.tmpl
 
puis j'ai rajouté à jhove.conf le code suivant comme ils ont dis ds la documentaion:
<module>
<class>MonModule</class>
</module>
 
j'ai même essayé de rajouter:
<module>
<class>edu.harvard.hul.ois.jhove.module.Project.MonModule</class>
</module>
 
Mais j'ai cette erreur:
edu.harvard.hul.ois.jhove.JhoveException: cannot instantiate module: WarcModule
at edu.harvard.hul.ois.jhove.JhoveBase.init(Unknown Source)
at Jhove.main(Unknown Source)
 
Normalement c'est un problème de classpath ou de package.
Je suis bloqué sur ce point, svp aidez moi.
 
Voici mon code:
 
 

Code :
  1. import java.io.File; 
  2. import java.util.*;
  3. import java.io.*;
  4. //import org.archive.io.warc.*;
  5. import edu.harvard.hul.ois.jhove.*;
  6. import edu.harvard.hul.ois.jhove.ModuleBase;
  7. import edu.harvard.hul.ois.jhove.RepInfo;
  8. import org.archive.io.warc.*;
  9. public class MonModule extends ModuleBase
  10. {
  11.     private static final String NAME = "Warc-hul";
  12.     private static final String RELEASE = "1.7";
  13.     private static final int [] DATE = {2008, 9, 23};
  14.     private static final String [] FORMAT = { "warc"};
  15.     private static final String COVERAGE =
  16.         "PDF 1.0-1.6; PDF/X-1 (ISO 15930-1:2001), X-1a (ISO 15930-4:2003), " +
  17.  "X-2 (ISO 15930-5:2003), and X-3 (ISO 15930-6:2003); Tagged PDF; " +
  18.  "Linearized PDF; PDF/A (ISO/CD 19005-1)";
  19.     private static final String [] MIMETYPE = {"application/warc"};
  20.     private static final String WELLFORMED = "A PDF file is " +
  21.         "well-formed if it meets the criteria defined in Chapter " +
  22.         "3 of the PDF Reference 1.6 (5th edition, 2004)";
  23.     private static final String VALIDITY = null;
  24.     private static final String REPINFO = null;
  25.     private static final String NOTE = "This module does *not* validate " +
  26.  "data within content streams (including operators) or encrypted data";
  27.     private static final String RIGHTS = "Copyright 2003-2007 by JSTOR and " +
  28.  "the President and Fellows of Harvard College. " +
  29.  "Released under the GNU Lesser General Public License.";
  30.     private static final String ENCRYPTED = "<May be encrypted>";
  31.  
  32.    
  33.  
  34.    
  35.    
  36. protected MonModule(String NAME, String RELEASE, int[] DATE, String[] FORMAT, String COVERAGE, String[] MIMETYPE, String WELLFORMED, String VALIDITY, String REPINFO, String NOTE, String RIGHTS, boolean x)
  37.  {
  38.     super  (NAME, RELEASE, DATE, FORMAT, COVERAGE, MIMETYPE, WELLFORMED,VALIDITY, REPINFO, NOTE, RIGHTS, true);
  39.    
  40.   }
  41. /******************************************************************
  42. * PRIVATE INSTANCE FIELDS.
  43. ******************************************************************/
  44. /* First 6 bytes of file */
  45. protected byte _sig[];
  46. /* Checksummer object */
  47. protected Checksummer _ckSummer;
  48. /* XMP property */
  49. protected Property _xmpProp;
  50. /* Input stream wrapper which handles checksums */
  51. protected ChecksumInputStream _cstream;
  52. /* Data input stream wrapped around _cstream */
  53. protected DataInputStream _dstream;
  54. /* Flag for presence of global color table */
  55. protected boolean _globalColorTableFlag;
  56. /* Size of global color table */
  57. protected int _globalColorTableSize;
  58. /* Count of graphic control extensions preceding
  59. * something to modify */
  60. protected int _gceCounter;
  61. /* Top-level metadata property */
  62. protected Property _metadata;
  63. /* Blocks list property */
  64. protected List _blocksList;
  65. /* Total count of graphic and plain text extension blocks */
  66. protected int _numGraphicBlocks;
  67. public void checkSignatures (File file,  InputStream stream, RepInfo info)
  68. throws IOException
  69. {
  70. int sigBytes[] = { 'W', 'A', 'R', 'C'};
  71. int i;
  72. int ch;
  73. try {
  74.     _dstream = null;
  75.     _dstream = getBufferedDataStream (stream, _je != null ?
  76.                 _je.getBufferSize () : 0);
  77.     for (i = 0; i < 4; i++) {
  78.         ch = readUnsignedByte(_dstream, this);
  79.         if (ch != sigBytes[i]) {
  80.             info.setWellFormed (false);
  81.             return;
  82.         }
  83.     }
  84.     info.setModule (this);
  85.     info.setFormat (_format[0]);
  86.     info.setMimeType (_mimeType[0]);
  87.     info.setSigMatch(_name);
  88. }
  89. catch (Exception e) {
  90.     // Reading a very short file may take us here.
  91.     info.setWellFormed (false);
  92.     return;
  93. }
  94. }


 
Merci d'avance pour tout aide.

mood
Publicité
Posté le 28-09-2008 à 14:01:05  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  mon programme ne trouve pas la classe

 

Sujets relatifs
Création d'un logiciel ouvrant un programme par reconnaissance vocale[C] Erreur que je trouve pas :D
Programme pour calculer une moyenne (débutant)ecriture dans memoire d'un autre programme
Débutant ==> Problème avec un programmeScript SQLPlus Oracle ==> Programme VB
pb applet et classe javaUne requete mySQL qui ne classe pas les résultats
[PHP] Vous utilisez quelle classe pour générer/gérer vos formulaires ?Débutant- Conseils pour développer un programme d'incubation
Plus de sujets relatifs à : mon programme ne trouve pas la classe


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR