Java Mailing List Archive

Home » user.castor »

Re: [castor-user] Question about Spring FactoryBeans for Castor XML

Zachariah Young


Replies: Find Java Web Hosting

Author LoginPost Reply
Thanks for the feedback I will update my project to Spring 3 and Castor 1.3.1.

On Wed, Feb 17, 2010 at 2:30 AM, Werner Guttmann <> wrote:

On 17.02.2010 04:16, Zachariah Young wrote:
In your Castor 1.3.1 and Spring combination does your spring xml context
file have a bean like the following?

<bean id="xmlContext" class="org.castor.spring.xml.XMLContextFactoryBean" />

Let me clean up a few things here: a few month *before* the Spring-WS project decided to implement an abstraction layer for XML data binders (named spring-oxm) (such as Castor XML, JAXB, ....), we here at Castor came up with our own solution, the spring-xml package.

Since then, spring-oxm has progressed a lot, and as a result, we really do not maintain the spring-xml package any more here at Castor.

There's a few other things to notice:

a) spring-oxm, as part of the Spring 3.0 release, has been moved into Spring core. Before, it happened to be packaged and maintained within the Spring-WS project.

b) spring-oxm as packaged within the spring-ws 1.x releases happens to have a few issues with Castor and its advanced features, that have already been resolved with the new spring-oxm in Spring 3.0. As far as I know, those fixes will not be back-ported to spring-ws (aka spring-oxm 1.x.

I hope this helps you a bit to demystify your problem(s).


If so where should XMLContextFactoryBean come from?



On Tue, Feb 16, 2010 at 9:11 PM, Akihito Nakamura<>  wrote:

The following article is a good introduction.

 Meet the Object/XML mapping support in Spring

Castor 1.3.1, in combination with Spring 3.0.0, works successfully.

*Subject: [castor-user] Question about Spring FactoryBeans for Castor XML
*From: Zachariah Young<>
*Date: Tue, 16 Feb 2010 20:54:08 -0600

I'm trying to wire up Castor with Spring.  I have read but I'm getting and error
when I
run my app.  I'm getting the following error.

Cannot find class [org.castor.spring.xml.XMLContextFactoryBean]

I have tried both Java 1.5 and 1.6. and Spring 2.5.6 and Spring 3.  I'm
trying to use Castor 1.3.1

I found the snapshot for Spring-xml and tried that but the package name
not the same.

Then I found this little gem by doing a google search  But I'm not
to find a 1.3.1 version.

Since the documentation does not state that I should include an
jar file I just assumed that I was in one of the core jar files.

Also in my search I have discovered that Spring has Castor so should I be
using that instead.

If someone could post a good blog post on how to set this up that would

Zachariah Young


To unsubscribe from this list, please visit:

Zachariah Young
President of NW Arkansas .Net User Group
Co-Founder of Virtual ALT.NET
(479) 966-9169
©2008 - Jax Systems, LLC, U.S.A.