[ 
https://issues.apache.org/jira/browse/GROOVY-8047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Gromov updated GROOVY-8047:
---------------------------------
    Description: 
Suppose that you have a.jar containing class-file for the following class
{code:title=A.java}
package xxx;
public class A {}
{code}
and b.jar containing class-file for the following class
{code:title=B.java}
package xxx;
public class B extends A {
}
{code}
If you add only b.jar to the classpath and refer to 'B' in your Groovy file:
{code:title=Gr.groovy}
import xxx.B
class Gr {
    B b
}
{code}
Compilation will fail with the following error:
> unable to resolve class xxx.B
It isn't evident that you need to add a.jar to the classpath to fix the problem.

Reported as 
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000008644-Error-28-1-Groovyc-unable-to-resolve-class-com-jetbrains-nodejs-mocha-execution-MochaRunConfiguration?page=1#community_comment_115000031384
 and  https://youtrack.jetbrains.com/issue/IDEA-166303

  was:
Suppose that you have a.jar containing class-file for the following class
{code:title=A.java}
package xxx;
public class A {}
{code}
and b.jar containing class-file for the following class
{code:title=B.java}
package xxx;
public class B extends A {
}
{code}
If you add only b.jar to the classpath and refer to 'B' in your Groovy file:
{code:title=Gr.groovy}
import xxx.B
class Gr {
    B b
}
{code}
Compilation will fail with the following error:
> unable to resolve class xxx.B
It isn't evident that you need to add a.jar to the classpath to fix the problem.


> Unclear "unable to resolve" message due to classloader resolution
> -----------------------------------------------------------------
>
>                 Key: GROOVY-8047
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8047
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Peter Gromov
>
> Suppose that you have a.jar containing class-file for the following class
> {code:title=A.java}
> package xxx;
> public class A {}
> {code}
> and b.jar containing class-file for the following class
> {code:title=B.java}
> package xxx;
> public class B extends A {
> }
> {code}
> If you add only b.jar to the classpath and refer to 'B' in your Groovy file:
> {code:title=Gr.groovy}
> import xxx.B
> class Gr {
>     B b
> }
> {code}
> Compilation will fail with the following error:
> > unable to resolve class xxx.B
> It isn't evident that you need to add a.jar to the classpath to fix the 
> problem.
> Reported as 
> https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000008644-Error-28-1-Groovyc-unable-to-resolve-class-com-jetbrains-nodejs-mocha-execution-MochaRunConfiguration?page=1#community_comment_115000031384
>  and  https://youtrack.jetbrains.com/issue/IDEA-166303



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to