Hello spyder71,
I think this is more a question for the spring dev list... However, try
checking the following:

1) Is the resource *really* in the jar? open the jar and look for the
resource and check its location.
2) Try to load the resource yourself as a test:

 
this.getClass().getClassLoader().getResourceAsStream("spring/applicationContext.xml")
will throw an exception if the resource is not found.
If this works, then consider using the constructor signature that takes a
Class as parameter, pass it 'this'

PS: Consider posting your question to the spring forum board instead [1],
you'll get a better chance of reply.

HTH,
--w
[1] http://forum.springsource.org/index.php


On Thu, Nov 20, 2008 at 5:13 PM, spyder71 <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I am writting a Mojo that should use Spring fwk.
> But when i a run the Mojo, it cannot find the spring beans config file
> (which is packaged into the mojo jar).
>
> I use ClassPathXmlApplicationContext to resolve the config file, but no
> success
>
> Error is the following :
>
> Embedded error: IOException parsing XML document from class path resource
> [spring/applicationContext.xml];
> nested exception is java.io.FileNotFoundException: class path resource
> [spring/applicationContext.xml] cannot be opened because it does not exist
>
> Has any one any hints ?
>
> tx !
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Mojo-and-Spring-tp20604693p20604693.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to