3 Replies Latest reply on Jul 18, 2012 9:20 AM by Steven Hawkins

    Getting NullPointer Exception from VDBMetadataParser.marshell() with Teiid 8.0

    Manoj Agarwal Newbie

      Hi,

       

      I am upgrading my application from Teiid 7.7.0 to Teiid 8.0.0(along with Jboss AS 7). In this process i found out the below mentioned peice of code not working and i updated it as per Teiid 8.0.0 classes.

       

      My old code :-

       

      final JAXBContext jaxbContext = JAXBContext.newInstance(VDBMetaData.class);

       

      My new code :-

       

      final OutputStream output = new FileOutputStream("C:\\data\\vdb-text.txt");

      VDBMetadataParser.marshell(result.vdbMetaData, output);

       

      Now i get this exception...

       

      ava.lang.NullPointerException: java.lang.NullPointerException

          at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:493)

          at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:228)

          at org.teiid.adminapi.impl.VDBMetadataParser.writeTranslator(VDBMetadataParser.java:433) [teiid-admin-8.0.0.Final.jar:8.0.0.Final]

          at org.teiid.adminapi.impl.VDBMetadataParser.marshell(VDBMetadataParser.java:369) [teiid-admin-8.0.0.Final.jar:8.0.0.Final]

          at com.aca.xyz.server.teiid.bootstrap.TeiidBootstrap.run(TeiidBootstrap.java:263) [teiid-bootstrap-3.0.0-SNAPSHOT.jar:]

      .........................................

      .........................................

       

       

      As its a Nullpointer, so not sure if it's a bug.