9 Replies Latest reply on Oct 10, 2011 5:11 AM by Max Andersen

    Crazy Behavior After Adding a Dependency

    Rob Williams Newbie

      This may not be a JBoss Tools problem at all, may be an m2Eclipse problem, but I figured I would post here since I did see JBoss Tools errors several times.

       

      Basically, when I add the 1.9.1 version of Amazon's aws java api as a dependency in my project, the environment goes totally nuts. It rambles along for a long time trying to build then fails saying it was unable to read the Artifact Descriptor of the guava project (a transitive dependency of aws). When I comment out the dependency in the pom, it builds fine. (Version info in tags.)

        • 1. Re: Crazy Behavior After Adding a Dependency
          Max Andersen Master

          "saying it was unable to read the artifact descriptor"

           

          Got a screenshot/stacktrace for that ?

           

          Just wondering "who" does it.

          • 2. Re: Crazy Behavior After Adding a Dependency
            Rob Williams Newbie

            Hi Max,

             

            I have a whole bunch of screenshots. What's the best way to post them. Lemme show you the error:

             

            ArtifactDescriptorException: Failed to read artifact descriptor for commons-httpclient:commons-httpclient:jar:3.1-jbossorg-1: ArtifactResolutionException: Failure to transfer commons-httpclient:commons-httpclient:pom:3.1-jbossorg-1 from https://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced. Original error: Could not transfer artifact commons-httpclient:commons-httpclient:pom:3.1-jbossorg-1 from/to jboss-public-repository-group (https://repository.jboss.org/nexus/content/groups/public/): Error transferring file: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

             

            Wait, so I guess maybe this is a repository error. I couldn't see this before because there is no stack trace in the Problems pane. You have to bring up the Properties dialog and clip it out.

             

            This does not happen at the command line. Bizarre...

            • 3. Re: Crazy Behavior After Adding a Dependency
              Rob Williams Newbie

              The reason I said crazy was the first time I changed this eclipse literally went into drone mode and lumbered along for around an hour... then spit out these errors..

              • 4. Re: Crazy Behavior After Adding a Dependency
                Max Andersen Master

                Rob, yes - the error you show is some problem with mvn repository resolution and it seems to be concerning certificate for repository.jboss.org - I know there have been changes to the certificates on jboss.org recently but that is a month or longer ago so weird you should just have that problem now ?

                 

                Any chance you have had your eclipse running for weeks without a restart and it might have cached old info ? (reaching for straws here

                 

                The reason for eclipse becoming a drone could be caused by m2e or maven core going haywire about the missing certificate but could also be that it triggers some constant updates to the workspace resources and then trigger all eclipse builders making the situation worse since it tries building the world ...

                 

                I know it sounds insance, but have you tried restarting eclipse to see the problem continues ?

                • 5. Re: Crazy Behavior After Adding a Dependency
                  Rob Williams Newbie

                  Hey Max: I didn't need this dependency right away so I dropped this for a while. Went back to it. I figured out what's going on here, but not what to do about it. The aws java sdk pulls in a transitive dependency called jackson core. When it tries to pull it in, it goes off into the weeds. When I run maven from the command line it works. It downloads the dependencies and compiles.

                   

                  What I think I figured out is that the problem is that our corporate repo is going through Nexus now. Was all working fine before upgrading to Indigo and White Rabbit.

                   

                  Still looking around.. drag is that the comamnd line compiling doesn't make the project work in eclipse.

                  • 6. Re: Crazy Behavior After Adding a Dependency
                    Chris Beams Newbie

                    Hi Max,

                     

                    I just ran into this same SSL error today when trying to resolve artifacts from repository.jboss.org via my own artifact manager.  Is there someone you can contact to look into the certificate situation?

                     

                    At a glance, the cert does look okay, but yet the problem persists.  Thanks for whatever you can do!

                     

                    Screen Shot 2011-10-07 at 12.53.52 AM.png

                    • 7. Re: Crazy Behavior After Adding a Dependency
                      Max Andersen Master

                      Your browser is doing it right, but my guess is your artifact manager is not using/reading/caching the proper certiifcate.

                       

                      Maybe clear out its certificates/refresh it or ?

                      • 8. Re: Crazy Behavior After Adding a Dependency
                        Chris Beams Newbie

                        Thanks, Max.  This was indeed it.  We imported the cert into the trusted keystore on our side and all is well.

                        • 9. Re: Crazy Behavior After Adding a Dependency
                          Max Andersen Master

                          Phew - I wasn't crazy after all

                           

                          Thanks for coming back and verify that was indeed the case and others can benefit from this thread in the future.