You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Mikael Petterson <mi...@ericsson.com.INVALID> on 2022/03/21 13:53:16 UTC

Upgrading from xmlbeans 4.0.0 --> 5.0.3

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



Re: Upgrading from xmlbeans 4.0.0 --> 5.0.3

Posted by PJ Fanning <fa...@yahoo.com.INVALID>.
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 <mi...@ericsson.com.invalid> 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



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org