Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while following the steps #1129

Closed
ramkis1 opened this issue Dec 20, 2022 · 1 comment
Closed

Getting error while following the steps #1129

ramkis1 opened this issue Dec 20, 2022 · 1 comment

Comments

@ramkis1
Copy link

ramkis1 commented Dec 20, 2022

When I run ./mvnw package I get this:

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
        at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
        at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/cli/UnrecognizedOptionException
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at org.codehaus.plexus.classworlds.launcher.Launcher.getEnhancedMainMethod(Launcher.java:168)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:261)
        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)
        ... 7 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.UnrecognizedOptionException
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        ... 17 more
@dsyer
Copy link
Member

dsyer commented Jan 27, 2023

Looks like you got a bad jar in your local Maven cache or something. It's nothing to do with the code here anyway, I expect. Try clearing the cache and starting again. Or build in a container.

@dsyer dsyer closed this as completed Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants