On 1/9/2017 11:35 AM, Shashank Pedamallu wrote:
> I’m Shashank. I’m new to Solr and was trying to use amazon-aws sdk
> along with Solr. I added amazon-aws.jar and its third party
> dependencies under /solr-6.3.0/server/solr/lib folder. Even after I
> add all required dependencies, I keep getting NoClassDefinitionError
> and NoSuchMethod Errors. I see that some of the third party jars such
> as jackson-core, jackson-mapper-asl libraries are part of
> /solr-6.3.0/server/solr/solr-webapp/WEB-INF/lib, but of different
> versions. The classes in these jars are the ones causing the issue.
> Could someone help me with loading these dependencies (amazon-aws
> third party libs) appropriately to not cause issue with the rest of
> the jars.

The first thing to try would be to simply use the dependencies already
present in Solr.  If the component you are using can't work with the
older version of a third-party library that already exists in Solr, then
you will have to upgrade the third-party libraries in Solr.  This means
replacing those jars in the WEB-INF/lib directory, not adding them to
the user lib directory.  Having multiple versions of any library causes
problems.

Note that if you do upgrade jars in WEB-INF/lib, Solr itself may stop
working correctly.  It's *usually* pretty safe to upgrade an internal
Solr dependency as long as you're not upgrading to a new major version,
but it doesn't always work.

Sometimes it is simply not possible to combine Java projects in the way
you want, because each of them use a dependency in ways that are not
compatible with each other.  Here's an example of something that just
won't work because of problems with a dependency:

https://issues.apache.org/jira/browse/SOLR-5582

Thanks,
Shawn

Reply via email to