nek4life opened a new issue, #22756: URL: https://github.com/apache/beam/issues/22756
### What happened? ### What happened? I'm trying to use the XmlIO SDK to parse XML and receiving the following error Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/ValidationEventHandler I'm using Java 17 as it says I can use Java 17 here on the quickstart page https://beam.apache.org/get-started/quickstart-java/ > Download and install the [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html) version 8, 11, or 17. Verify that the [JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html) environment variable is set and points to your JDK installation. I've added the Jakarta dependencies in order to use jaxb ``` <dependency> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> <version>4.0.0</version> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>4.0.0</version> <scope>runtime</scope> </dependency> ``` I believe the error is because the XmlIO SDK has not been updated to include the Jakarta dependancies since they have been moved to. Here is an example of my pipeline ``` public class OrdersToBigQuery { public interface OrdersToBigQueryOptions extends PipelineOptions { @Description("File input path") @Default.String("order.xml") String getInputPath(); void setInputPath(String value); } public static void main(String[] args) { PipelineOptionsFactory.register(OrdersToBigQueryOptions.class); OrdersToBigQueryOptions options = PipelineOptionsFactory.fromArgs(args).as(OrdersToBigQueryOptions.class); Pipeline p = Pipeline.create(options); p.apply("Read XML", XmlIO.<ComplexTypeOrder>read() .from(options.getInputPath()) .withRootElement("orders") .withRecordElement("order") .withRecordClass(ComplexTypeOrder.class) ); } } ``` ### Issue Priority Priority: 2 ### Issue Component Component: io-java-xml ### Issue Priority Priority: 2 ### Issue Component Component: io-java-xml -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
