Boa tarde, fiz uma pesquisa própria para testar a leitura CSV e informa que o cabeçaho não contém campos obrigatórios
Recompiling the module because of changed source code.
Compiling 4 source files with javac [debug release 23] to target\classes
/C:/Users/joaoc/OneDrive/Documentos/NetBeansProjects/GerenciamentoCortes/src/main/java/br/com/jchaves/cortes/GerenciamentoCortes.java: C:\Users\joaoc\OneDrive\Documentos\NetBeansProjects\GerenciamentoCortes\src\main\java\br\com\jchaves\cortes\GerenciamentoCortes.java uses unchecked or unsafe operations.
/C:/Users/joaoc/OneDrive/Documentos/NetBeansProjects/GerenciamentoCortes/src/main/java/br/com/jchaves/cortes/GerenciamentoCortes.java: Recompile with -Xlint:unchecked for details.
--- exec:3.1.0:exec (default-cli) @ GerenciamentoCortes ---
Exception in thread "main" java.lang.RuntimeException: Erro ao capturar cabe�alho CSV.
at com.opencsv.bean.CsvToBean.prepareToReadInput(CsvToBean.java:304)
at com.opencsv.bean.CsvToBean.stream(CsvToBean.java:143)
at com.opencsv.bean.CsvToBean.parse(CsvToBean.java:126)
at br.com.jchaves.cortes.GerenciamentoCortes.main(GerenciamentoCortes.java:22)
Caused by: com.opencsv.exceptions.CsvRequiredFieldEmptyException: Cabe�alho n�o cont�m campos obrigat�rios [MATRICULA, NOME]. A lista de cabe�alhos encontrados � [MATRICULA;NOME].
at com.opencsv.bean.HeaderNameBaseMappingStrategy.captureHeader(HeaderNameBaseMappingStrategy.java:95)
at com.opencsv.bean.CsvToBean.prepareToReadInput(CsvToBean.java:302)
... 3 more
Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:1000)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:947)
at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:471)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.927 s
Finished at: 2024-11-02T12:02:43-03:00
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:exec (default-cli) on project GerenciamentoCortes: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]