[ 
https://issues.apache.org/jira/browse/CXFXJC-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677870#comment-16677870
 ] 

member sound commented on CXFXJC-29:
------------------------------------

I'm getting the same exception with your project. So this must be clearly a jdk 
version issue.

As it works for you with latest GA version, this issue may probably be closed.

> ClassNotFoundException: XSDToJavaRunner
> ---------------------------------------
>
>                 Key: CXFXJC-29
>                 URL: https://issues.apache.org/jira/browse/CXFXJC-29
>             Project: CXF XJC Utils
>          Issue Type: Bug
>          Components: Maven Plugin
>    Affects Versions: 3.2.2
>            Reporter: member sound
>            Assignee: Freeman Fang
>            Priority: Blocker
>         Attachments: CXFXJC-29.tar
>
>
> I'm trying to set up a simple project that should generate {{xsdtojava}} 
> using {{cxf-xjc-plugin}}. The project also uses {{spring-boot}}.
> Result during mvn package:
> {code:java}
> [INFO] Building jar: /tmp/cxf-xjc-plugin3386923426289303800.jar
> [DEBUG] Error: Could not find or load main class 
> org.apache.cxf.maven_plugin.XSDToJavaRunner
> [DEBUG] Caused by: java.lang.ClassNotFoundException: 
> org.apache.cxf.maven_plugin.XSDToJavaRunner
> {code}
> This is strange, because on classpath I can clearly see the 
> {{XSDToJavaRunner.class}}.
> My java project dir is: {{javaExecutable = 
> /usr/lib/jvm/java-11-openjdk-amd64/bin/java}}, and
> java -version shows: {{OpenJDK 64-Bit Server VM (build 
> 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)}}
> I tried throwing the cxf-xjc-plugin, several jaxb-* libraries into 
> <dependency> maven node as follows, but the error remains the same. What am I 
> missing here?
> {code:xml}
>     <?xml version="1.0" encoding="UTF-8"?>
>     <project xmlns="http://maven.apache.org/POM/4.0.0";
>              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>              xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>         <modelVersion>4.0.0</modelVersion>
>     
>         <groupId>com.test</groupId>
>         <artifactId>cxfxjc-test</artifactId>
>         <version>1.0.0</version>
>     
>         <parent>
>            <groupId>org.springframework.boot</groupId>
>            <artifactId>spring-boot-starter-parent</artifactId>
>            <version>2.1.0.RELEASE</version>
>         </parent>
>     
>         <dependencies>
>             <dependency>
>                 <groupId>javax.xml.bind</groupId>
>                 <artifactId>jaxb-api</artifactId>
>                 <version>2.2.11</version>
>             </dependency>
>             <dependency>
>                 <groupId>com.sun.xml.bind</groupId>
>                 <artifactId>jaxb-core</artifactId>
>                 <version>2.2.11</version>
>             </dependency>
>             <dependency>
>                 <groupId>com.sun.xml.bind</groupId>
>                 <artifactId>jaxb-impl</artifactId>
>                 <version>2.2.11</version>
>             </dependency>
>     
>             <dependency>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf-core</artifactId>
>                 <version>3.2.6</version>
>             </dependency>
>     
>             <dependency>
>                 <groupId>org.apache.cxf</groupId>
>                 <artifactId>cxf-xjc-plugin</artifactId>
>                 <version>3.2.2</version>
>             </dependency>
>             <dependency>
>                   <groupId>org.glassfish.jaxb</groupId> 
>                   <artifactId>jaxb-runtime</artifactId>
>             </dependency>
>         </dependencies>
>     
>         <build>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.cxf</groupId>
>                     <artifactId>cxf-xjc-plugin</artifactId>
>                     <version>3.2.2</version>
>                     <executions>
>                         <execution>
>                             <id>generate-sources</id>
>                             <phase>generate-sources</phase>
>                             <goals>
>                                 <goal>xsdtojava</goal>
>                             </goals>
>                             <configuration>
>                                 <xsdOptions>
>                                     <xsdOption>
>                                         <xsd>src/main/resources/test.xsd</xsd>
>                                     </xsdOption>
>                                 </xsdOptions>
>                             </configuration>
>                         </execution>
>                     </executions>
>     
>                     <dependencies>
>                         <dependency>
>                             <groupId>org.apache.cxf</groupId>
>                             <artifactId>cxf-xjc-plugin</artifactId>
>                             <version>3.2.2</version>
>                         </dependency>
>                     </dependencies>
>                 </plugin>
>             </plugins>
>         </build>
>     </project>
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to