treatment of exemptions in grails?

0

I have a class programmed in java in the Netbeans, when I try to use the class in the grails, an exceptions handling error occurs. This is my code:

    package cermine; /**
    * Created by  on 7/05/16.
    */


   import pl.edu.icm.cermine.*;
   import pl.edu.icm.cermine.exception.AnalysisException;
   import pl.edu.icm.cermine.metadata.model.DocumentMetadata;

   import java.io.File;
   import java.io.FileNotFoundException;
   import java.io.InputStream;
   import java.io.FileInputStream;

  import java.util.logging.Level;
  import java.util.logging.Logger;


public class Extraccion {
public static String Arreglo[];
public static int last = -1;



 public static void metadataExtraction(String Ruta) throws Exception {

    int cantPdf = 13;
    int CDV = 4;   //cantidadDiscosVirtuales = Formula = 4;
    int lotes = cantPdf / CDV;

    Arreglo = new String[cantPdf];
    for (int i = 0; i < CDV; i++) {
        new Thread(proceso(i, lotes)).start();
    }
}




public static void Extraccion(String i)  {
    InputStream inputStream = null;
    try {
            ContentExtractor extractor = new ContentExtractor();
            inputStream = new FileInputStream("/home/paul/cermine/sample.pdf");
            DocumentMetadata documentMetadata = ExtractionUtils.extractMetadata(extractor.getConf(), inputStream);
            System.out.println("Pdf  " + i + "Annalizado");

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (AnalysisException e) {
            e.printStackTrace();
        }

            }

public static Runnable proceso(int i, int lotes) {
    return () -> {
        for (int j = 0; j < lotes; j++) {

            System.out.println(j + lotes * i);
            Extraccion(Arreglo[j + lotes * i]);


        }
    };


}

Make some changes to my class related to the JVM and the error now changes

    Exception in thread "main" java.lang.NoSuchMethodException: cermine.Extraccion.main([Ljava.lang.String;)
at java.lang.Class.getMethod(Class.java:1786)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:119)

What can it be?

    
asked by Paul 10.05.2016 в 22:25
source

0 answers