| JDT is not picking up indirectly referenced classes at build time? [message #198131] | 
Wed, 09 March 2005 15:54  | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
Here's my scenario... I have two plug-ins: org.apache.axis and org.uddi4j. 
 
org.apache.axis has no code in it, it's a place holder for a few jar files: 
 
<runtime> 
    <library name="lib/axis.jar"> 
        <export name="*"/> 
    </library> 
    <library name="lib/axis-ant.jar"> 
        <export name="*"/> 
    </library> 
    <library name="lib/jaxrpc.jar"> 
    </library> 
</runtime> 
 
jaxrpc.jar contains a class call javax.xml.rpc.Call. However, this class is 
not exposed to other plugins because I do not want to set <export name="*"/> 
for this jar. 
axis.jar contains a class call org.apache.axis.client.Call, which implements 
the javax.xml.rpc.Call interface. 
 
Now in the org.uddi4j plug-in, the following code does not compile: 
 
   org.apache.axis.client.Service service = new 
org.apache.axis.client.Service(); 
   call = (org.apache.axis.client.Call) service.createCall(); 
 
There are two error messages: 
 
1. The project was not built since its build path is incomplete. Cannot find 
the class file for javax.xml.rpc.Call. Fix the build path then try building 
this project 
2. The type javax.xml.rpc.Call cannot be resolved. It is indirectly 
referenced from required .class files 
 
Initially, I thought the reason why I got compile errors is because the 
signature of service.createCall() returns javax.xml.rpc.Call. However, I 
tried to add <export name="*"/> to jaxrpc.jar, but that didn't work. I have 
to explicitly add jaxrpc.jar to the plug-in's Java build path in order to 
get things compile (right click on plug-in -> properties -> Java Build 
Path -> Libraries -> Add JARs...). My questions is why do I need to do that? 
AFAIK, the Java Build Path is used during build time and is never used 
during run time. And the above code works at run time (I did not have to 
modify anything and I did not have to "expose" jaxrpc.jar or add it the 
org.uddi4j plug-in). So why is the compiler flagging this as an error at 
build time? Is this a bug? Any help would be appreciated. 
 
Thanks, 
 
Jeff
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.02813 seconds