Hi Ali,

What class is getting returned?

Try extending, or modifying,
org.exolab.castor.xml.util.ClassDescriptorResolverImpl to get some debug
information as to what's happening.

You can put some System.out print statements in the resolve methods to
see how Castor is resolving the classes.

You can then set this as such:

Unmarshaller unm = new
Unmarshaller(metadatabrowser.userconfig.Userconfig.class);
unm.setResolver(myClassDescriptorResolver);
unm.unmarshal(reader);

NOTE: make sure that the unmarshal() method you use only takes one
argument otherwise you'll be using one of the static unmarshal methods
and the ClassDescriptorResolver that you set will be unavailable.

--Keith


> Ali Kaplan wrote:
> 
> Hi Peter,
> Thanks for your reply, but I still have the same problem.
> I updated all my castor library jar files with the new one (0.9.4.1),
> but nothing changed.
> The worst thing about problem is there is no exception messages. Here
> is my code:
> 
> public static metadatabrowser.userconfig.Userconfig
> unmarshal(java.io.Reader reader)
>         throws org.exolab.castor.xml.MarshalException,
>         org.exolab.castor.xml.ValidationException {
>         System.out.println("I am inside Tomcat and before
> Userconfig.unmarshal(java.io.Reader reader)");
> 
> (!!!!!!!Problematic line!!!!!!)
> metadatabrowser.userconfig.Userconfig uc =
> (metadatabrowser.userconfig.Userconfig)
> Unmarshaller.unmarshal(metadatabrowser.userconfig.Userconfig.class,reader);
> 
>         if (uc != null) {
>             System.out.println("Object is null");
>         } else {
>             System.out.println("Every thing is successful");
>         }
> 
>         return uc;
> }
> 
> Nothing is displayed after problematic line. I guess all other lines
> null")  or other system.out does not excetue.
> 
> 
> ----- Original Message -----
> From: "Peter Kasson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, January 07, 2003 10:56 AM
> Subject: Re: [castor-dev] castor and Tomcat 4.1.18 problem
> 
> Ali,
> 
> I noticed similar results with simply outdated jar's being referenced.
> 
> JB has a lib directory containing the castor jar, verify that the
> latest one
> that you need is there, or apply it to the Tomcat env. separately.
> 
> One way to do that would be to reference the proper version of Castor
> (if
> not the one in JBx) by creating the library reference in JB and
> including
> that in the build for Tomcat.
> 
> Once you have your WAR, verify that the  proper jar is in there.
> 
> Regards,
> 
> Peter
> 
> >From: "Ali Kaplan" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: [EMAIL PROTECTED]
> >Subject: [castor-dev] castor and Tomcat 4.1.18 problem
> >Date: Mon, 6 Jan 2003 11:41:12 -0500
> >
> >Hi,
> >I am using castor which is embedded in Jbuilder 7 (8). My problem is
> that
> >Unmarshaller.unmarshal(class, reader) has problem with Tomcat 4.1.18.
> >Unmarshal method
> >does not return proper java object, however, it does not throw any
> >exception
> >either.
> >The same application is working with previous versions of Tomcat
> 4.1.12,
> >etc..
> >Does anyone have this problem before? All suggestions are welcome.
> >
> >Thanks,
> >
> >--ak
> >
> >-----------------------------------------------------------
> >If you wish to unsubscribe from this mailing, send mail to
> >[EMAIL PROTECTED] with a subject of:
> > unsubscribe castor-dev
> 
> _________________________________________________________________
> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
> 
> -----------------------------------------------------------
> 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

Reply via email to