You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Stig Rohde Døssing <sr...@apache.org> on 2019/08/29 19:51:19 UTC

Re: Unable to locate classes which are coming from shaded jar

Hi Prashant,

You don't need to send emails to me personally, I check the Storm mailing
lists regularly. Several of the addresses you used don't belong to me
either.

Did you click the update icon in the Maven project window (the two circling
arrows in the right part of your screenshot)?

If that doesn't help, maybe other people using IntelliJ can share how they
are getting IntelliJ to find shaded classes?

Den tor. 29. aug. 2019 kl. 01.24 skrev Prashant Bhardwaj <
amu.prashant@gmail.com>:

> Hi Stig Rohde,
>
> I activated IntelliJ maven profile. Still, it didn't help. Am I missing
> anything?
>
>
> [image: image.png]
>
> Thanks & regards
>
> *Prashant Bhardwaj*
>
> +44 74247 18513 (UK),
> +91 92894 36265 (India)
>
>
>
> On Mon, Aug 26, 2019 at 10:09 PM Prashant Bhardwaj <am...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I am in the process of my first contribution to Apache Storm. I was
>> writing an example for a combination of Storm, Cassandra and Storm + how to
>> test this combo using Storm's Testing classes.
>>
>> I found some of the classes are using shaded classes, for example -
>> ConfigUtils class is using
>> org.apache.storm.shade.com.google.common.collect.Maps.
>>
>> In my InteliiJ setup, ConfigUtils is unable to find this import.
>>
>> I have run mvn clean install which was executed successfully and saw
>> apache-storm-shaded jar was created. Even I looked inside that jar and all
>> the referred classes are part of this jar.
>>
>> Could you please suggest how to fix this issue because I am unable to run
>> my tests, these are failing on these compilations errors in other classes?
>>
>> [image: image.png]
>>
>> Thanks & regards
>>
>> *Prashant Bhardwaj*
>>
>

Re: Unable to locate classes which are coming from shaded jar

Posted by Ethan Li <et...@gmail.com>.
Intellij is not intelligent enough to find the shaded jars. Here is a work around:

https://youtrack.jetbrains.com/issue/IDEA-126596#focus=streamItem-27-757181.0-0 <https://youtrack.jetbrains.com/issue/IDEA-126596#focus=streamItem-27-757181.0-0>


Keep in mind that with this work around, those jars being used are from mvn local repo (i.e. ~/.m2). 

> On Aug 29, 2019, at 2:51 PM, Stig Rohde Døssing <sr...@apache.org> wrote:
> 
> Hi Prashant,
> 
> You don't need to send emails to me personally, I check the Storm mailing lists regularly. Several of the addresses you used don't belong to me either.
> 
> Did you click the update icon in the Maven project window (the two circling arrows in the right part of your screenshot)?
> 
> If that doesn't help, maybe other people using IntelliJ can share how they are getting IntelliJ to find shaded classes?
> 
> Den tor. 29. aug. 2019 kl. 01.24 skrev Prashant Bhardwaj <amu.prashant@gmail.com <ma...@gmail.com>>:
> Hi Stig Rohde,
> 
> I activated IntelliJ maven profile. Still, it didn't help. Am I missing anything?
> 
> 
> 
> 
> Thanks & regards
> 
> Prashant Bhardwaj
> 
> +44 74247 18513 (UK), 
> +91 92894 36265 (India)
> 
> 
> 
> On Mon, Aug 26, 2019 at 10:09 PM Prashant Bhardwaj <amu.prashant@gmail.com <ma...@gmail.com>> wrote:
> Hi,
> 
> I am in the process of my first contribution to Apache Storm. I was writing an example for a combination of Storm, Cassandra and Storm + how to test this combo using Storm's Testing classes. 
> 
> I found some of the classes are using shaded classes, for example - ConfigUtils class is using org.apache.storm.shade.com.google.common.collect.Maps.
> 
> In my InteliiJ setup, ConfigUtils is unable to find this import. 
> 
> I have run mvn clean install which was executed successfully and saw apache-storm-shaded jar was created. Even I looked inside that jar and all the referred classes are part of this jar.
> 
> Could you please suggest how to fix this issue because I am unable to run my tests, these are failing on these compilations errors in other classes?
> 
> 
> 
> Thanks & regards
> 
> Prashant Bhardwaj