DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Eclipse RCP App can't find non-Java file
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2009
Unhappy Eclipse RCP App can't find non-Java file - 07-30-2009, 05:19 PM

I'm working on a very simple Eclipse RCP application and attempting to use iBATIS with it. I've got the iBATIS SqlMapConfig.xml file in my classpath but when I launch the RCP Application it complains that it can't be found. Any ideas ... been searching the web for 2hrs straight looking for a solution.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2009
Default 07-30-2009, 05:57 PM

Okay, of course I'd find the answer minutes after posting the message above. I'll post it here in case someone hits this in a Google search someday.

I had wrapped iBATIS in it's own plug-in and then made my RCP application (plug-in) depend on that iBATIS plug-in. But, because these two plug-ins have thier own classloader, when I executed the iBATIS method to load the SqlMapConfig.xml from my RCP applicaion it couldn't find it (because it's restricted to searching only within it's own classpath). To fix the problem I had to add the following to my iBATIS plug-in's MANIFEST.MF file:

Eclipse-BuddyPolicy: registered

And also add the following to my RCP apps MANIFEST.MF file:

Eclipse-RegisterBuddy: org.apache.ibatis

In both cases I just appended to the end of the MANIFEXT.MF. This extends the search path across classloaders and everything worked! A much more detailed explaination cand be reviewed here:

EclipseZone - Eclipse - a tale of two VMs (and many classloaders)

Cheers,
Steve
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Nov 2009
Default eclipse has his own classloader mechanism - Yesterday, 12:40 AM

eclipse has his own classloader mechanisam,you can refer to this link
深入剖析 Eclipse 类装入器
Reply With Quote
Reply

Tags
eclipse rcp, ibatis

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javac error when using jar file : cannot find symbol powah Java 10 09-21-2009 03:36 AM
Where can I find the unit testcase code of eclipse ? zjffdu Eclipse 0 07-05-2009 12:24 PM
Need Help About .Java File in Module jaypaul Java 1 05-26-2009 03:12 AM
how to read file .docx with java youssef.kaaouachi Java 9 04-25-2009 01:43 PM
Opening Java Window/file BarryC Java 1 04-16-2008 10:45 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com