You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by Atita Arora <at...@gmail.com> on 2022/12/23 12:42:06 UTC
Issue with cli
Hi ,
I hope you are doing well and enjoying the festive season!
I beg your pardon if this isn't the right forum to bring these questions
but I am completely blocked atm.
I wonder if anyone encountered something like this before :
(base) atitaarora@Atitas-MBP opennlp % opennlp
> [ERROR] Failed to execute goal
> org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project
> opennlp: An exception occurred while executing the Java class.
> opennlp.tools.cmdline.CLI -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on
> project opennlp: An exception occurred while executing the Java class.
> opennlp.tools.cmdline.CLI
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:215)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:568)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
> occurred while executing the Java class. opennlp.tools.cmdline.CLI
> at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:349)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> (DefaultBuildPluginManager.java:137)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:210)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> (MojoExecutor.java:148)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:117)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> (LifecycleModuleBuilder.java:81)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:77)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:568)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> Caused by: java.lang.ClassNotFoundException: opennlp.tools.cmdline.CLI
> at
> org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.loadClass
> (URLClassLoaderBuilder.java:198)
> at java.lang.ClassLoader.loadClass (ClassLoader.java:520)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:271)
> at java.lang.Thread.run (Thread.java:833)
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I seem to be able to run everything as expected from the IDE (Intellj)
using the run config but cli isn't working for me (and yes it worked
before!!).
I am running Java 11 on OSX 12.6 + mvn 3.8.4
Any suggestions ?
Thank you,
Best,
Atita
Re: Issue with cli
Posted by Richard Zowalla <rz...@apache.org>.
Hi,
just build the latest "main" branch and did some tests (based on your
description):
rz@ironcat:~/IdeaProjects/opennlp/opennlp-tools$ export
OPENNLP_HOME=/home/rz/IdeaProjects/opennlp/opennlp-tools/
rz@ironcat:~/IdeaProjects/opennlp/opennlp-tools$ export
PATH=$OPENNLP_HOME/bin:$PATH
rz@ironcat:~/IdeaProjects/opennlp/opennlp-tools$ opennlp
OpenNLP 2.1.1-SNAPSHOT. Usage: opennlp TOOL
I am on a Ubuntu / Linux
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 17.0.5, vendor: Private Build, runtime:
/usr/lib/jvm/java-17-openjdk-amd64
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-56-generic", arch: "amd64", family:
"unix"
So I cannot reproduce it on my machine.
The exception suggests, that the Maven exec plugin isn't able to find
the CLI class, which is a bit odd.
It might be worth to use "mvnDebug" to have a (remote) debugger
attached to the exec plugin to inspect the classpath on your machine in
order to determine why it isn't able to find the related class.
Gruß
Richard
Am Freitag, dem 23.12.2022 um 14:30 +0100 schrieb Atita Arora:
> Hi,
> Thank you for the response.
>
> For the given stack trace I was expecting opennlp helptext
> as the command was
>
> $ opennlp
>
>
> the opennlp home is configured as :
> % which opennlp
> /Users/atitaarora/workspace/opennlp/opennlp-tools/bin/opennlp
>
> and
>
> export OPENNLP_HOME=$HOME/workspace/opennlp/opennlp-tools
> export PATH=$OPENNLP_HOME/bin:$PATH
>
> so I usually fie commands as :
>
> > $opennlp TokenizerTrainer -model en-token-test.bin -alphaNumOpt
> > true -lang
> > en -data en-token.train -encoding UTF-8 -cutoff 5
>
>
> but since lately when I do it I get this stack trace with
> java.lang.ClassNotFoundException: opennlp.tools.cmdline.CLI
>
> So I was not sure what m I missing.
>
> Best,
> Atita
>
>
>
> On Fri, Dec 23, 2022 at 1:47 PM Richard Zowalla <ri...@zowalla.com>
> wrote:
>
> > What is the command / run config you are using? Would be nice to
> > have it
> > to see, if anyone can reproduce. :-)
> >
> > Gruß
> > Richard
> >
> >
> > Am 23. Dezember 2022 13:42:06 MEZ schrieb Atita Arora <
> > atitaarora@gmail.com>:
> > > Hi ,
> > >
> > > I hope you are doing well and enjoying the festive season!
> > > I beg your pardon if this isn't the right forum to bring these
> > > questions
> > > but I am completely blocked atm.
> > >
> > > I wonder if anyone encountered something like this before :
> > >
> > > (base) atitaarora@Atitas-MBP opennlp % opennlp
> > > > [ERROR] Failed to execute goal
> > > > org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on
> > > > project
> > > > opennlp: An exception occurred while executing the Java class.
> > > > opennlp.tools.cmdline.CLI -> [Help 1]
> > > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed
> > > > to
> > execute
> > > > goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-
> > > > cli) on
> > > > project opennlp: An exception occurred while executing the Java
> > > > class.
> > > > opennlp.tools.cmdline.CLI
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:215)
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:156)
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:148)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buil
> > > > dProject
> > > > (LifecycleModuleBuilder.java:117)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buil
> > > > dProject
> > > > (LifecycleModuleBuilder.java:81)
> > > > at
> > > >
> > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleTh
> > readedBuilder.build
> > > > (SingleThreadedBuilder.java:56)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> > > > (LifecycleStarter.java:128)
> > > > at org.apache.maven.DefaultMaven.doExecute
> > > > (DefaultMaven.java:305)
> > > > at org.apache.maven.DefaultMaven.doExecute
> > > > (DefaultMaven.java:192)
> > > > at org.apache.maven.DefaultMaven.execute
> > > > (DefaultMaven.java:105)
> > > > at org.apache.maven.cli.MavenCli.execute
> > > > (MavenCli.java:972)
> > > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> > > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> > > > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
> > > > (Native
> > > > Method)
> > > > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> > > > (NativeMethodAccessorImpl.java:77)
> > > > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> > > > (DelegatingMethodAccessorImpl.java:43)
> > > > at java.lang.reflect.Method.invoke (Method.java:568)
> > > > at
> > > > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhance
> > > > d
> > > > (Launcher.java:282)
> > > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> > > > (Launcher.java:225)
> > > > at
> > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> > > > (Launcher.java:406)
> > > > at org.codehaus.plexus.classworlds.launcher.Launcher.main
> > > > (Launcher.java:347)
> > > > Caused by: org.apache.maven.plugin.MojoExecutionException: An
> > > > exception
> > > > occurred while executing the Java class.
> > > > opennlp.tools.cmdline.CLI
> > > > at org.codehaus.mojo.exec.ExecJavaMojo.execute
> > (ExecJavaMojo.java:349)
> > > > at
> > > > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> > > > (DefaultBuildPluginManager.java:137)
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:210)
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:156)
> > > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> > > > (MojoExecutor.java:148)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buil
> > > > dProject
> > > > (LifecycleModuleBuilder.java:117)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buil
> > > > dProject
> > > > (LifecycleModuleBuilder.java:81)
> > > > at
> > > >
> > org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleTh
> > readedBuilder.build
> > > > (SingleThreadedBuilder.java:56)
> > > > at
> > > > org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> > > > (LifecycleStarter.java:128)
> > > > at org.apache.maven.DefaultMaven.doExecute
> > > > (DefaultMaven.java:305)
> > > > at org.apache.maven.DefaultMaven.doExecute
> > > > (DefaultMaven.java:192)
> > > > at org.apache.maven.DefaultMaven.execute
> > > > (DefaultMaven.java:105)
> > > > at org.apache.maven.cli.MavenCli.execute
> > > > (MavenCli.java:972)
> > > > at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> > > > at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> > > > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0
> > > > (Native
> > > > Method)
> > > > at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> > > > (NativeMethodAccessorImpl.java:77)
> > > > at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> > > > (DelegatingMethodAccessorImpl.java:43)
> > > > at java.lang.reflect.Method.invoke (Method.java:568)
> > > > at
> > > > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhance
> > > > d
> > > > (Launcher.java:282)
> > > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> > > > (Launcher.java:225)
> > > > at
> > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> > > > (Launcher.java:406)
> > > > at org.codehaus.plexus.classworlds.launcher.Launcher.main
> > > > (Launcher.java:347)
> > > > Caused by: java.lang.ClassNotFoundException:
> > > > opennlp.tools.cmdline.CLI
> > > > at
> > > >
> > org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.lo
> > adClass
> > > > (URLClassLoaderBuilder.java:198)
> > > > at java.lang.ClassLoader.loadClass (ClassLoader.java:520)
> > > > at org.codehaus.mojo.exec.ExecJavaMojo$1.run
> > > > (ExecJavaMojo.java:271)
> > > > at java.lang.Thread.run (Thread.java:833)
> > > > [ERROR]
> > > > [ERROR] Re-run Maven using the -X switch to enable full debug
> > > > logging.
> > > > [ERROR]
> > > > [ERROR] For more information about the errors and possible
> > > > solutions,
> > > > please read the following articles:
> > > > [ERROR] [Help 1]
> > > > http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> > >
> > >
> > > I seem to be able to run everything as expected from the IDE
> > > (Intellj)
> > > using the run config but cli isn't working for me (and yes it
> > > worked
> > > before!!).
> > > I am running Java 11 on OSX 12.6 + mvn 3.8.4
> > > Any suggestions ?
> > >
> > > Thank you,
> > > Best,
> > > Atita
> >
Re: Issue with cli
Posted by Atita Arora <at...@gmail.com>.
Hi,
Thank you for the response.
For the given stack trace I was expecting opennlp helptext
as the command was
$ opennlp
the opennlp home is configured as :
% which opennlp
/Users/atitaarora/workspace/opennlp/opennlp-tools/bin/opennlp
and
export OPENNLP_HOME=$HOME/workspace/opennlp/opennlp-tools
export PATH=$OPENNLP_HOME/bin:$PATH
so I usually fie commands as :
> $opennlp TokenizerTrainer -model en-token-test.bin -alphaNumOpt true -lang
> en -data en-token.train -encoding UTF-8 -cutoff 5
but since lately when I do it I get this stack trace with
java.lang.ClassNotFoundException: opennlp.tools.cmdline.CLI
So I was not sure what m I missing.
Best,
Atita
On Fri, Dec 23, 2022 at 1:47 PM Richard Zowalla <ri...@zowalla.com> wrote:
> What is the command / run config you are using? Would be nice to have it
> to see, if anyone can reproduce. :-)
>
> Gruß
> Richard
>
>
> Am 23. Dezember 2022 13:42:06 MEZ schrieb Atita Arora <
> atitaarora@gmail.com>:
> >Hi ,
> >
> >I hope you are doing well and enjoying the festive season!
> >I beg your pardon if this isn't the right forum to bring these questions
> >but I am completely blocked atm.
> >
> >I wonder if anyone encountered something like this before :
> >
> >(base) atitaarora@Atitas-MBP opennlp % opennlp
> >> [ERROR] Failed to execute goal
> >> org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project
> >> opennlp: An exception occurred while executing the Java class.
> >> opennlp.tools.cmdline.CLI -> [Help 1]
> >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute
> >> goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on
> >> project opennlp: An exception occurred while executing the Java class.
> >> opennlp.tools.cmdline.CLI
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:215)
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:156)
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:148)
> >> at
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> >> (LifecycleModuleBuilder.java:117)
> >> at
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> >> (LifecycleModuleBuilder.java:81)
> >> at
> >>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> >> (SingleThreadedBuilder.java:56)
> >> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> >> (LifecycleStarter.java:128)
> >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> >> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> >> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> >> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> >> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> >> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> >> Method)
> >> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> >> (NativeMethodAccessorImpl.java:77)
> >> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> >> (DelegatingMethodAccessorImpl.java:43)
> >> at java.lang.reflect.Method.invoke (Method.java:568)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> >> (Launcher.java:282)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> >> (Launcher.java:225)
> >> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> >> (Launcher.java:406)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> >> (Launcher.java:347)
> >> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
> >> occurred while executing the Java class. opennlp.tools.cmdline.CLI
> >> at org.codehaus.mojo.exec.ExecJavaMojo.execute
> (ExecJavaMojo.java:349)
> >> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
> >> (DefaultBuildPluginManager.java:137)
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:210)
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:156)
> >> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
> >> (MojoExecutor.java:148)
> >> at
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> >> (LifecycleModuleBuilder.java:117)
> >> at
> >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
> >> (LifecycleModuleBuilder.java:81)
> >> at
> >>
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
> >> (SingleThreadedBuilder.java:56)
> >> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> >> (LifecycleStarter.java:128)
> >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> >> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> >> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> >> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
> >> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
> >> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
> >> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
> >> Method)
> >> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> >> (NativeMethodAccessorImpl.java:77)
> >> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> >> (DelegatingMethodAccessorImpl.java:43)
> >> at java.lang.reflect.Method.invoke (Method.java:568)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> >> (Launcher.java:282)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> >> (Launcher.java:225)
> >> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> >> (Launcher.java:406)
> >> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> >> (Launcher.java:347)
> >> Caused by: java.lang.ClassNotFoundException: opennlp.tools.cmdline.CLI
> >> at
> >>
> org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.loadClass
> >> (URLClassLoaderBuilder.java:198)
> >> at java.lang.ClassLoader.loadClass (ClassLoader.java:520)
> >> at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:271)
> >> at java.lang.Thread.run (Thread.java:833)
> >> [ERROR]
> >> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> >> [ERROR]
> >> [ERROR] For more information about the errors and possible solutions,
> >> please read the following articles:
> >> [ERROR] [Help 1]
> >> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> >
> >
> >I seem to be able to run everything as expected from the IDE (Intellj)
> >using the run config but cli isn't working for me (and yes it worked
> >before!!).
> >I am running Java 11 on OSX 12.6 + mvn 3.8.4
> >Any suggestions ?
> >
> >Thank you,
> >Best,
> >Atita
>
Re: Issue with cli
Posted by Richard Zowalla <ri...@zowalla.com>.
What is the command / run config you are using? Would be nice to have it to see, if anyone can reproduce. :-)
Gruß
Richard
Am 23. Dezember 2022 13:42:06 MEZ schrieb Atita Arora <at...@gmail.com>:
>Hi ,
>
>I hope you are doing well and enjoying the festive season!
>I beg your pardon if this isn't the right forum to bring these questions
>but I am completely blocked atm.
>
>I wonder if anyone encountered something like this before :
>
>(base) atitaarora@Atitas-MBP opennlp % opennlp
>> [ERROR] Failed to execute goal
>> org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project
>> opennlp: An exception occurred while executing the Java class.
>> opennlp.tools.cmdline.CLI -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
>> goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on
>> project opennlp: An exception occurred while executing the Java class.
>> opennlp.tools.cmdline.CLI
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:215)
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:156)
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:148)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
>> (LifecycleModuleBuilder.java:117)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
>> (LifecycleModuleBuilder.java:81)
>> at
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
>> (SingleThreadedBuilder.java:56)
>> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
>> (LifecycleStarter.java:128)
>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
>> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
>> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
>> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
>> Method)
>> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:77)
>> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke (Method.java:568)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
>> (Launcher.java:282)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
>> (Launcher.java:225)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
>> (Launcher.java:406)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.main
>> (Launcher.java:347)
>> Caused by: org.apache.maven.plugin.MojoExecutionException: An exception
>> occurred while executing the Java class. opennlp.tools.cmdline.CLI
>> at org.codehaus.mojo.exec.ExecJavaMojo.execute (ExecJavaMojo.java:349)
>> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
>> (DefaultBuildPluginManager.java:137)
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:210)
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:156)
>> at org.apache.maven.lifecycle.internal.MojoExecutor.execute
>> (MojoExecutor.java:148)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
>> (LifecycleModuleBuilder.java:117)
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
>> (LifecycleModuleBuilder.java:81)
>> at
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
>> (SingleThreadedBuilder.java:56)
>> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
>> (LifecycleStarter.java:128)
>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
>> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
>> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
>> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
>> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
>> at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
>> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native
>> Method)
>> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
>> (NativeMethodAccessorImpl.java:77)
>> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
>> (DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke (Method.java:568)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
>> (Launcher.java:282)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
>> (Launcher.java:225)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
>> (Launcher.java:406)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.main
>> (Launcher.java:347)
>> Caused by: java.lang.ClassNotFoundException: opennlp.tools.cmdline.CLI
>> at
>> org.codehaus.mojo.exec.URLClassLoaderBuilder$ExecJavaClassLoader.loadClass
>> (URLClassLoaderBuilder.java:198)
>> at java.lang.ClassLoader.loadClass (ClassLoader.java:520)
>> at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:271)
>> at java.lang.Thread.run (Thread.java:833)
>> [ERROR]
>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions,
>> please read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
>
>I seem to be able to run everything as expected from the IDE (Intellj)
>using the run config but cli isn't working for me (and yes it worked
>before!!).
>I am running Java 11 on OSX 12.6 + mvn 3.8.4
>Any suggestions ?
>
>Thank you,
>Best,
>Atita