You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Ryan.White" <Ry...@internationalmining.com.au> on 2006/08/30 06:14:18 UTC

Loading Ibatis resources within James

Im parsing incoming email with an instance of the Apache James mail server.

Im having trouble getting ibatis to pick up the config files as resources...

I can run a whole bunch of test cases and create the Reader class needed to
run the buildDaoManager method, by using the url method and file:/// and by
creating the file input stream directly... but I simply cannot get the
getResourceAsReader method to find anything.

And then the dao cannot find the sqlmap config unless i define it is a URL
not a resource....

So, I can get them both to work using the url methods but not with any of
the resource methods... which isnt so bad at least it works, but i really
would rather use the resource way not the url way as its a kin to hard
coding...

Is this a classloading issue or something? does anyone know both James and
Ibatis?

If I use a relative file path location when building the file input stream,
I notice that im actually in the context of avalons build directory... which
doesnt seem right?

James runs from with in avalon but my app is written with the james api
shouldnt it be in context of james? if james had a classloader could I set
the Resource to use the james classloader?

sorry i guess this is more of a james query... but im feeling a bit out of
depth here.

Ryan.





-- 
View this message in context: http://www.nabble.com/Loading-Ibatis-resources-within-James-tf2187699.html#a6052149
Sent from the iBATIS - User - Java forum at Nabble.com.