I used {{hibernate.transform_hbm_xml.enabled}} to convert a legacy {{.hbm.xml}} to the modern format and then tried to dump it as XML to standard output.
I used {{org.glassfish.jaxb:jaxb-runtime:4.0.2}}
{code:java}JaxbEntityMappings obj = ... jaxbContext = JAXBContext.newInstance(JaxbEntityMappings.class); final Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.marshal(obj, System.out);{code}
Got this error:
{ \{noformat} } Caused by: java.lang.NullPointerException at org.hibernate.boot.jaxb.mapping.marshall.AccessTypeMarshalling.toXml(AccessTypeMarshalling.java:22) at org.hibernate.boot.jaxb.mapping.Adapter1.marshal(Adapter1.java:17) at org.hibernate.boot.jaxb.mapping.Adapter1.marshal(Adapter1.java:7) at org.glassfish.jaxb.runtime.v2.runtime.reflect.AdaptedAccessor.get(AdaptedAccessor.java:46) ... 23 more { \{noformat} }
Same problem with the class {{FetchTypeMarshalling}}
I think a null check is needed in {{toXml()}} |
|