I am trying to create some xml content in my web application.
For that i have used JAXB.
JAXBContext jaxbContext = JAXBContext.newInstance(QueryRequest.class);
XMLInputFactory xif = XMLInputFactory.newInstance();
xif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, false);
StreamSource source = new StreamSource(new ByteArrayInputStream(
queryRequestXml.getBytes()));
XMLStreamReader xsr = xif.createXMLStreamReader(source);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
QueryRequest queryRequest = (QueryRequest) jaxbUnmarshaller
.unmarshal(xsr);
The problem i am facing is that in JBOSS,Tomcat it works fine.But as soon as i move my application to Weblogic i get xif.createXMLStreamReader(source); as null.
Any idea on how to get this fixed.