users
[Top] [All Lists]

Loading Spring Application Context Bean Factory from inside a jar file.

To: users@xxxxxxxxxx
Subject: Loading Spring Application Context Bean Factory from inside a jar file.
From: John Olmstead <jolmstead2k@xxxxxxxxx>
Date: Wed, 14 Dec 2005 12:46:53 -0800 (PST)
Delivered-to: mailing list users@cinjug.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=usIqJ80dBD/gTaNcKpBjuWyFp/30dtbp37/Wyo8a1K0DmUPtql4OQi2f5++adM+b+tNWHJHcDNsSUQUofYjUNbm0Y0Ar+I46sCCQOQoz8lTn2uVmd2H0slz4j95oMhRmp/bblXvROiy+hKPlV/x0/vETTZPWr+7jdrpIWINCERo= ;
Mailing-list: contact users-help@cinjug.org; run by ezmlm
Gentlemen;

I have developed a standalone java app that uses Spring for its persistence 
management layer. 
The classloader will not load the application context using Springs
ClassPathXmlApplicationContext class intended for this purpose. All of the unit 
tests
performed on this app pass.  I have tried multiple variations of the following:

ApplicationContext

ctx = new 
ClassPathXmlApplicationContext("classpath*:conf/applicationContext.xml");  
//This
loads the context with 0 bean definitions.

String[] paths = {"/conf/applicationContext.xml"};
or
paths = {"/applicationContext.xml"};  
ctx = new ClassPathXmlApplicationContext(paths); //This results in a 
FileNotFound Exception
thrown and occurs whether or not I place the resource in the root or a sub 
directory.

I'm stumped.  Don't know what else to try.  Any suggestions would be 
appreciated and my
apologies if I missed something trivial.

By the way, the resource xml file is correctly bundled in the jar.

Thanks;

John Olmstead




John Olmstead
jolmstead2k@xxxxxxxxx

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

<Prev in Thread] Current Thread [Next in Thread>