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

mvn clean => Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null #446

Closed
vorburger opened this issue Feb 18, 2023 · 1 comment

Comments

@vorburger
Copy link
Contributor

$ /home/vorburger/Downloads/apache-maven-3.9.0-bin/apache-maven-3.9.0/bin/mvn clean
[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.NullPointerException: Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException: Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:108)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:821)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:270)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    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.NullPointerException: Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null
    at org.apache.maven.project.DefaultProjectBuilder.createModelCache (DefaultProjectBuilder.java:1002)
    at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:362)
    at org.sonatype.maven.polyglot.TeslaProjectBuilder.build (TeslaProjectBuilder.java:43)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects (DefaultGraphBuilder.java:349)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor (DefaultGraphBuilder.java:340)
    at org.apache.maven.graph.DefaultGraphBuilder.build (DefaultGraphBuilder.java:76)
    at org.eclipse.tycho.build.TychoGraphBuilder.build (TychoGraphBuilder.java:97)
    at org.apache.maven.DefaultMaven.buildGraph (DefaultMaven.java:453)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:196)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:172)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:100)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:821)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:270)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    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)
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/InternalErrorException
@vorburger
Copy link
Contributor Author

According to eclipse-tycho/tycho#2063, this is because (quote) "Tycho currently do not support maven 3.9", and will be fixed with (and after a release of) eclipse-tycho/tycho#2058.

Indeed, when I use Maven 3.8.7 instead of 3.9.0 then I'm not hitting this problem anymore (but #447 instead).

All the more reason to contrib #445...

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

1 participant