Skip to Main Content

General Development Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Overriding the Eclipse runtime classpath

byrne_wayneSep 26 2011 — edited Oct 19 2011
Hi All,

We have been playing about with connectors to Exchange from within OpenScript (as one does on a Monday afternoon). When I compose a standalone java program my example works really well, but when I run this in OpenScript i get the following exception:

java.lang.NoSuchMethodError: org.jdom.output.XMLOutputter .......

Now, I have done some searching on this and the outcome is that the wrong jdom.jar is being referenced. So I went searching for these naughty files and found the following installed as part of OATS.

G:\oracle\OATS93\agent\plugins\oracle.oats.jagent.lib3rdparty_2.6.0.0272\lib\jdom.jar
G:\oracle\OATS93\lib\jdom.jar
G:\oracle\OATS93\openScript\plugins\oracle.oats.jagent.lib3rdparty_2.6.0.0272\lib\jdom.jar
G:\oracle\OATS93\openScript\plugins\oracle.oats.scripting.modules.webService.lib3rdparty_2.6.0.0272\jdom.jar

Now I have my own jdom.jar file located in h:\JEC\bin. So I add this as a script asset, and the above exception still occurs.

So I do a little digging with procmon.exe (from sysinternals....don't leave home without them), and notice that both jdom.jar from above are reference i.e:

G:\oracle\OATS93\openScript\plugins\oracle.oats.jagent.lib3rdparty_2.6.0.0272\lib\jdom.jar
G:\oracle\OATS93\openScript\plugins\oracle.oats.scripting.modules.webService.lib3rdparty_2.6.0.0272\jdom.jar

when I run the script, which I find a little perculiar, as it also touches my own jar file.


So, just to satisfy my own curiosty, I back up the openscript jdom.jar and replace them with my own jdom.jar, and hey presto my sciript works, but openscript starts behaving very strangely.

So, my question is how do you override the runtime classpath settings from OpenScript to include my Jar file first, and not what is needed for OpenScript?

Any insight would be greatly appreciated.

Wayne

Edited by: byrne_wayne on Sep 26, 2011 5:49 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 16 2011
Added on Sep 26 2011
5 comments
416 views