You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Paul Benedict <pa...@yahoo.com> on 2006/06/13 05:59:03 UTC

Re: Cannot find sqlmap in jar - new bug [RESOLVED]

Thanks everyone for your help. The problem is resolved.

1) You cannot put sqlmapconfig in WEB-INF but your sqlmap files in jars. This splits the classloader and so one will be found but not the other. Either put them all in your classpath or in WEB-INF

2) Do not start with a /

Paul

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Cannot find sqlmap in jar - new bug [RESOLVED]

Posted by Clinton Begin <cl...@gmail.com>.
Of course, that's all app server dependent.  It should work as you
describe.  Here's the silly thing about some classloaders:  if your resource
is loaded with the local classloader (thread or via known class), you can
start with a slash ("/"), but if it's loaded by the system classloader, you
can't start with a slash.  When you put your SQL Maps in a JAR, it's likely
they'll be loaded by the system classloader.  So putting the slash in front
of the SqlMapConfig.xml when in the web-inf, but not for each of the
resources in the JAR may work.

Classloaders are messed up.

Clinton

On 6/12/06, Paul Benedict <pa...@yahoo.com> wrote:
>
> Thanks everyone for your help. The problem is resolved.
>
> 1) You cannot put sqlmapconfig in WEB-INF but your sqlmap files in jars.
> This splits the classloader and so one will be found but not the other.
> Either put them all in your classpath or in WEB-INF
>
> 2) Do not start with a /
>
> Paul
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>