[ 
https://issues.apache.org/jira/browse/AXIS2-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465915
 ] 

Dennis Sosnoski commented on AXIS2-1996:
----------------------------------------

I've posted an updated axis2-jibx-1.1.1a.jar (not in any way an official Apache 
Axis2 release, but just intended to help people encountering this problem) at 
http://www.sosnoski.com/jibx-wiki/space/axis2-jibx Please try this out to 
verify the fix.

> JiBXDataSource.getReader always throws NullPointerException
> -----------------------------------------------------------
>
>                 Key: AXIS2-1996
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1996
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1.1
>            Reporter: Peter Hornig
>         Assigned To: Dennis Sosnoski
>
> JiBXDataSource.getReader  always throws a Null Pointer Exception due to 
> following Code
> ---------------------
>   public XMLStreamReader getReader() throws XMLStreamException {
>         ByteArrayOutputStream bos = new ByteArrayOutputStream();
>         serialize(bos, null);
>         return StAXUtils.createXMLStreamReader(new 
> ByteArrayInputStream(bos.toByteArray()));
>     }
>  /* (non-Javadoc)
>      * @see org.apache.axiom.om.OMDataSource#serialize(java.io.OutputStream, 
> org.apache.axiom.om.OMOutputFormat)
>      */
>     public void serialize(OutputStream output, OMOutputFormat format) throws 
> XMLStreamException {
>         try {
>             IMarshallingContext ctx = 
> bindingFactory.createMarshallingContext();
>             ctx.setOutput(output, format.getCharSetEncoding());
>             marshal(ctx);
>         } catch (JiBXException e) {
>             throw new XMLStreamException("Error in JiBX marshalling", e);
>         }
>     }
> ----------------------
> serialize is called with NULL as a format and serialize uses 
> format.getCharSetEncoding());
> ---------------------------
> The Null Pointer Exception happens when  using axis2 with rampart 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to