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

Maven 3.9.0 and Tycho 3.0.1 - Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null #2063

Closed
Phillipus opened this issue Feb 7, 2023 · 5 comments · Fixed by #2093 or eclipse/chemclipse#1331
Milestone

Comments

@Phillipus
Copy link

Phillipus commented Feb 7, 2023

Maven 3.9.0
Tycho 3.0.1 (and 4.0.0-SNAPSHOT)
Java Temurin-17.0.6+10

Apologies in advance - I don't know if this is a Maven problem or a Tycho problem.

Simple test pom.xml and project attached:

test tycho.zip

mvn clean package leads to:

[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:88)
    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)
@Phillipus Phillipus changed the title Maven 3.9.0 and Tycho 3.0.1 - NullPointerException: Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null Maven 3.9.0 and Tycho 3.0.1 - Cannot invoke "org.apache.maven.repository.internal.ModelCacheFactory.createCache(org.eclipse.aether.RepositorySystemSession)" because "this.modelCacheFactory" is null Feb 7, 2023
@laeubi
Copy link
Member

laeubi commented Feb 7, 2023

Tycho currently do not support maven 3.9 see

@Phillipus
Copy link
Author

Phillipus commented Feb 7, 2023

Tycho currently do not support maven 3.9

Got it, missed that one. I'll close this, sorry for noise. 😄

homer-simpson-homer

@laeubi
Copy link
Member

laeubi commented Feb 10, 2023

See also:

@laeubi
Copy link
Member

laeubi commented Feb 13, 2023

@Phillipus
Copy link
Author

@laeubi Thanks for letting me know, appreciate it. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants