Thanks for the reply, Keith.
But in my application I have 5 -6 classes that I am specifying in the mapping file. How do I get the class loaders for all of these and connect them to the same Mapping?? the Mapping class constructot takes only one argument.
I tried several combinations but i am still missing something and cannot get it to work.
Any further pointers, please??
Thanks,
Shalaka.
>From: Keith Visco <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [castor-dev] castor properties file and servlets
>Date: Fri, 10 May 2002 15:01:58 -0500
>
>
>Shalaka,
>
>When running castor inside a Servlet or AppServer environment it is
>typically needed to pass the appropriate ClassLoader to Castor.
>
>Take one of the classes you have specified in the mapping file and get
>the ClassLoader from it as such:
>
>Mapping mapping = new Mapping(Foo.class.getClassLoader());
>
>Hope that helps.
>
>--Keith
>
>
>Shalaka Chaudhari wrote:
> >
> > Hi Dave,
> >
> > You helped me a lot in the problem related to the JDO
> > configuration setup in servlets. I could not get it to work
> > with Apache JServ. So, as suggested by you, I switched to Tomcat.
> >
> > In Tomcat, I have stored all my .xml files in the WEB-INF folder of my
> > application and the class files as a .jar in the WEB-INF/lib folder.
> > It contains all the classes that the marsahller / unmarshaller and the
> > JDO will use. The servlet classes are in the WEB-INF/classes folder.
> >
> > Now, when i try to run my application it reads the mapping file and
> > gives an error saying NoClassDefinitionFound. It lists the classes
> > that have been mapped using the mapping file.
> > So it does not find the classes. How do the classes need to be
> > specified in the mapping file? I am not using any package statement so
> > I haven't qualified the classes (like myapp.Customer)and they just
> > appear by their name in the mapping file (like Customer) ?
> >
> > Also, since the servlet is getting loaded on startup what will
> > be the correct way to set the mapping files into the classes that
> > use them?
> >
> > PLEASE HELP.
> >
> > Regards,
> > Shalaka.
> >
> > ----------------------------------------------------------------------
> > MSN Photos is the easiest way to share and print your photos: Click
> > Here
> > ----------------------------------------------------------- If you
> > wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev