Summary: | Indirectly referenced classes not being picked up | ||
---|---|---|---|
Product: | [Eclipse Project] PDE | Reporter: | Jeffrey Liu <jeffliu> |
Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | philippe_mulet |
Version: | 3.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Jeffrey Liu
2005-03-10 11:16:34 EST
Does org.uddi4j plugin require org.apache.axis plugin? Yes. Here's a snippet of code from org.uddi4j's plugin.xml: <runtime> <library name="lib/uddi4j.jar"> <export name="*"/> </library> </runtime> <requires> <import plugin="org.apache.axis"/> </requires> Classes from org.uddi4j directly use classes from axis.jar and axis-ant.jar. And in turn, classes from axis.jar and axis-ant.jar use classes from jaxrpc.jar. Issue likely resides in PDE land (container resolution?) Short version: The issue comes from the fact that lib/jaxrpc.jar is not exported. If you mark it as exported, then everything will be fine whether the plugin is in the workspace or in the target platform. Long version: PDE is certainly more lenient when it comes to plugins in the target platform. If org.apache.axis is not in the workspace, even if jaxrpc is not exported, we still put it on your org.uddi4j's classpath, as if it were exported. this keeps JDT happy and is able to resolve all classes. When you import org.apache.axis into your workspace, PDE respects the (lack of) the exported flag in the plugin.xml and does not make jaxrpc.jar to clients. In this case, JDT is unable to resolve certain calls properly and hence the compilation errors. This inconsistency in the treatment will very shortly be addressed by PDE when we start supporting access restrictions. If the library is not exported, we will not make it directly available to clients, no matter if the plugin is in the workspace or not. However, fixing this inconsistency would leave us in a state where your plugin will not compile whether org.apache.axis is in the workspace or not. This defect then becomes a duplicate of bug 73957. *** This bug has been marked as a duplicate of 73957 *** Thanks for the explaination. I have a follow up question... So at build time,
org.uddi4j will not compile. Let's for the moment, assume I added jaxrpc.jar
to org.uddi4j's build time classpath (right click on project -> properties -
> ...), then things should compile again. Next, I dumped both org.apache.axis
and org.uddi4j to another Eclipse instance's plugins directory and launched it
(assume this Eclipse instance is a completely different install). What's the
run time behavior of org.uddi4j. Will I get a ClassNotFoundException at run
time? Even though
service.createCall();
returns a javax.xml.rpc.Call object that org.uddi4j does not have access to.
It's really the org.apache.axis's classloader that needs to construct this
object. I thought because I'm down-casting the returned object to
org.apache.axis.client.Call immediately, org.uddi4j's classloader does not
need to know about javax.xml.rpc.Call at run time... Is this how things work
at run time? This is still a learning process for me, can you shed some light
on this. Your help is really appreciated. Thanks!
|