>>Q. L. Nguyen wrote:
>> I cannot catch ValidationExceptions. I get the following error messages:
>> 
>> Incompatible Types:
>> found: org.exolab.castor.xml.ValidationException
>> required: java.lang.throwable
>> 
>> XMLException are also denounced as not throwable.

>Odd. What are you trying to do ? In other words, can you how us a code
>fragment that highlights your environment ?

I use the Java Platform "JDK 1.6" and the IDE "Netbeans IDE 6.5". I am
programming a
Rich Client Application based on the Framework "Netbeans Platform". The
error message above occurs when
I try to throw or catch ValidationExceptions and MarshalExceptions from the
following methods:

Validator.validate(java.lang.Object object)

Marshaller.marshal(java.lang.Object object, org.xml.sax.ContentHandler
handler) 

Marshaller.marshal(java.lang.Object object, java.io.Writer out) 

unmarshal(java.lang.Class c, java.io.Reader reader) 

Here are few examples:

public void marshal(org.xml.sax.ContentHandler handler)
        throws java.io.IOException, org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
    {   
        Marshaller.marshal(this, handler);
    }



public boolean isValid()
    {
        try {
            validate();
        }
        catch (org.exolab.castor.xml.ValidationException vex) {
            return false;
        }
        return true;
    }



>> It is strange as the Netbeans IDE shows that CastorException extends
>> Exception. The sources look also okay on the first view.
>> 
>> 
>> ---Just another question---
>> 
>> Is it possible to specify custom Castor XML properties with Castor 1.2 ?

>No, this is not possible. But out of curiosity, what are you trying to
>achieve ?

Oh, I am sorry as I forgot one single significant word. I just want to
specify the location of my custom
Castor XML properties file and not the file itself. Can I do that with
Castor 1.2 by using the system property
"org.castor.user.properties.location"?

Regards
-- 
View this message in context: 
http://www.nabble.com/Castor-1.3---XMLException-not-throwable-tp23296128p23311645.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to