Maven download sources: fails with NPE [SOLVED]

Hi guys,

We run into problems when we want to download our sources jars. They are available on the artifactory server but the download does not work. I've trace with wireshark no request is made/sent.

In de idea.log file I found a NPE (see below) but I can't figure out what cause the problem. The line where the NPE occurs is:

       File checkFile = new File(session.getLocalRepository().getBasedir(), session.getLocalRepositoryManager().getPathForRemoteMetadata(metadata, repository, request.getRequestContext()));


Is there any way to get more debugging information. This is a real problem for our team.

Best regards,

Johan


2015-03-31 11:21:18,713 [ 494026]   INFO -      #org.jetbrains.idea.maven -
java.lang.NullPointerException
 at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:279)
 at org.sonatype.aether.impl.internal.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:173)
 at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:225)
 at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:272)
 at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
 at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
 at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286)
 at org.jetbrains.idea.maven.server.embedder.CustomMaven3ArtifactResolver.resolveOld(CustomMaven3ArtifactResolver.java:206)
 at org.jetbrains.idea.maven.server.embedder.CustomMaven3ArtifactResolver.resolve(CustomMaven3ArtifactResolver.java:152)
 at org.jetbrains.idea.maven.server.embedder.CustomMaven3ArtifactResolver.resolve(CustomMaven3ArtifactResolver.java:139)
 at org.jetbrains.idea.maven.server.embedder.CustomMaven3ArtifactResolver.resolve(CustomMaven3ArtifactResolver.java:518)
 at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.resolve(Maven3ServerEmbedderImpl.java:753)
 at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.doResolve(Maven3ServerEmbedderImpl.java:731)
 at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.doResolve(Maven3ServerEmbedderImpl.java:725)
 at org.jetbrains.idea.maven.server.Maven3ServerEmbedderImpl.resolve(Maven3ServerEmbedderImpl.java:637)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
 at sun.rmi.transport.Transport$1.run(Transport.java:177)
 at sun.rmi.transport.Transport$1.run(Transport.java:174)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:744)

0
2 comments
Avatar
Permanently deleted user

Hi Serge,

Indeed it look identical: snapshots, artifactory etc Thanks for the pointer!

I got it to work:

  1. I changed the repo settings to use unique versions
  2. Deploy the artifacts again
  3. but is not enough to make a difference.!
  4. you must delete de previously downloaded artifacts and metadata
    1. basically delete the content of snapshot dir


Hope this can help others

Regards,

Johan

0

Please sign in to leave a comment.