Re: Upgrading from xmlbeans 4.0.0 --> 5.0.3

PJ Fanning <[email protected]> Mon, 21 Mar 2022 14:09:38 +0000 (UTC)
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <[email protected]>
Check that you don't have 2 copies of xmlbeans on your classpath (ones with different versions). You may also need to rebuild your generated classes. XMLBeans 5 is a major upgrade. There is no guarantee that class files generated with XMLBeans 4 will compile with XMLBeans 5.






On Monday 21 March 2022, 14:53:31 GMT+1, Mikael Petterson <[email protected]> wrote: 





Hi,

We have a generated java bean files using xsd.

Now we want to upgrade from 4 --> 5. I switched depdency in my pom.xml for the project and I get the following error message in multiple places in Eclipse.

Example:

HelloDocument helloDocument = HelloDocument.Factory.newInstance();

Error message in Eclipse:

Type mismatch: cannot convert from XmlObject to HelloDocument

The HelloDocument is an XmlObject

public abstract interface x0.ietfParamsXmlNsNetconfBase1.HelloDocument extends org.apache.xmlbeans.XmlObject {

}


  1.  Any ideas why I get this in version 5?
  2.  Is there a remedy for this?
  3.  Is there a change in the factory?


Br,

//mike