You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by xbranko <xb...@netscape.net> on 2009/02/04 03:02:15 UTC

NullPointerException in JAXBEncoderDecoder.marshallException

CXF: 2.0.9:

I am getting a NPE at line 270 in JAXBEncoderDecoder, method
marshallException. SchemaInfo sch is being accessed without a check if it is
null, hence NPE:

            SchemaInfo sch =
part.getMessageInfo().getOperation().getInterface()
                .getService().getSchema(namespace);
            if (!sch.isElementFormQualified()) { // <== NPE
                namespace = null;
            }

Would anyone know if this is a bug, or am I missing something?
-- 
View this message in context: http://www.nabble.com/NullPointerException-in-JAXBEncoderDecoder.marshallException-tp21823060p21823060.html
Sent from the cxf-user mailing list archive at Nabble.com.


RE: NullPointerException in JAXBEncoderDecoder.marshallException

Posted by xbranko <xb...@netscape.net>.

Sean O'Callaghan wrote:
> 
> Can you attach a small testcase, which shows the problem, to the JIRA?
> 

I've done as requested. The test case is an eclipse project (only none of
the jars were included due to size constraints). If you'd like a zip file of
the project with all jars, I'd be happy to e-mail you that to you directly.


-- 
View this message in context: http://www.nabble.com/NullPointerException-in-JAXBEncoderDecoder.marshallException-tp21823060p21839440.html
Sent from the cxf-user mailing list archive at Nabble.com.


RE: NullPointerException in JAXBEncoderDecoder.marshallException

Posted by Sean O'Callaghan <SE...@progress.com>.
Hi,

Well there certainly shouldn't be a NullPointerException being thrown, so that is a bug, I've raised a JIRA on it: https://issues.apache.org/jira/browse/CXF-2022

However there may be an issue with your application which is causing the return of null instead of an expected schema.

Can you attach a small testcase, which shows the problem, to the JIRA?

Thanks,

Seán.



-----Original Message-----
From: xbranko [mailto:xbranko@netscape.net] 
Sent: 04 February 2009 02:02
To: users@cxf.apache.org
Subject: NullPointerException in JAXBEncoderDecoder.marshallException


CXF: 2.0.9:

I am getting a NPE at line 270 in JAXBEncoderDecoder, method
marshallException. SchemaInfo sch is being accessed without a check if it is
null, hence NPE:

            SchemaInfo sch =
part.getMessageInfo().getOperation().getInterface()
                .getService().getSchema(namespace);
            if (!sch.isElementFormQualified()) { // <== NPE
                namespace = null;
            }

Would anyone know if this is a bug, or am I missing something?
-- 
View this message in context: http://www.nabble.com/NullPointerException-in-JAXBEncoderDecoder.marshallException-tp21823060p21823060.html
Sent from the cxf-user mailing list archive at Nabble.com.