Open pellcorp opened 5 years ago
java.lang.NoClassDefFoundError: com/sun/tools/javac/code/Type$ClassType at at.ac.tuwien.infosys.jaxb.XmlSchemaEnhancer.getAnnotationOfProperty(XmlSchemaEnhancer.java:943) at at.ac.tuwien.infosys.jaxb.XmlSchemaEnhancer.getFacetsAnnotation(XmlSchemaEnhancer.java:871) at at.ac.tuwien.infosys.jaxb.XmlSchemaEnhancer.hasFacets(XmlSchemaEnhancer.java:206) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace$2.write(XmlSchemaGenerator.java:1163) at com.sun.xml.bind.v2.schemagen.TreeWrapper.write(TreeWrapper.java:90) at com.sun.xml.bind.v2.schemagen.Tree$Group.write(Tree.java:255) at com.sun.xml.bind.v2.schemagen.Tree.write(Tree.java:138) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeClass(XmlSchemaGenerator.java:1039) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.writeTo(XmlSchemaGenerator.java:721) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator$Namespace.access$800(XmlSchemaGenerator.java:519) at com.sun.xml.bind.v2.schemagen.XmlSchemaGenerator.write(XmlSchemaGenerator.java:501) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.generateSchema(JAXBContextImpl.java:832) at org.apache.cxf.common.jaxb.JAXBUtils.generateJaxbSchemas(JAXBUtils.java:824) at
Seems to have been introduced as part of: https://github.com/whummer/jaxb-facets/commit/9b83ec423635042828602d68424e6e16f67af9f9
Actually seems this class is contained in the jsr308 jar, but that causes issues for java 8 deployments and for the couple of lines of code where its used and seems to be only relevant to cli schemagen, would be good to make it optional.
It seems as though the XmlSchemaEnhancer depends on either tools.jar or a JDK to execute correctly. It won't work if running in a JRE unless tools.jar is in the class path.
I am wondering if it was possible to fix this so that jaxb-facets could run without tools.jar dependency?