users@jaxb.java.net

jaxb 1.0->1.01: unmarshalling VerifyError

From: Laura Ferguson <allenderl_at_acm.org>
Date: Mon, 16 Jun 2003 10:38:09 -0400

We've encountered a VerifyError while unmarshalling xml files with jaxb
1.1. We've tried a couple different files, all of which were generated
with jaxb and several of which opened with the same code under jaxb 1.0.
The xml was validated before it was marshalled. Then when we try to
unmarshal we get the following error. Any ideas? Is this a bug in our
code? Or a problem with the JAXB unmarshaller?

The error we are getting is:
java.lang.VerifyError: (class:
org/nwu/sesp/pdl/impl/TemplateImpl$Unmarshaller, method: <init> signature:
(Lorg/nwu/sesp/pdl/impl/TemplateImpl;Lorg/nwu/sesp/pdl/impl/runtime/UnmarshallingContext;I)V)

Expecting to find object/array on stack
-----------------------
Our unmarshal code looks like this:
/**
          * Reads a JAXB object from an InputStream.
          */
         public static Object unmarshal (InputStream in)
                 throws IOException, JAXBException, ValidationException
         {
                 Object unmarshalledObject = null;

                 try {
                         JAXBContext jc =
JAXBContext.newInstance("org.nwu.sesp.pdl");
                 Unmarshaller u = jc.createUnmarshaller();
                 File f = new File(System.getProperty("user.dir")
+ File.separatorChar
                 + "sampleUser" + File.separatorChar + "1myWork9.xml");
                 if (!f.exists()) {
                                 throw new IOException("couldn't find file
" +f.getAbsolutePath());
                 }
             FileInputStream fis = new FileInputStream(f);
             unmarshalledObject = u.unmarshal(fis);
         } catch( JAXBException je ) {
             je.printStackTrace();
         } catch( IOException ioe ) {
             ioe.printStackTrace();
         }

                 return unmarshalledObject;
         // return(unmarshaller.unmarshal(in));
  }