You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Fredrik Wangel (JIRA)" <ji...@apache.org> on 2018/08/29 13:39:00 UTC

[jira] [Commented] (CXF-7830) java2ws command too long

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

Fredrik Wangel commented on CXF-7830:
-------------------------------------

In a local clone of the repository, this issue has been solved by making changes to JavaUtils.java (adding checks for Jdk11+) and Java2WSMojo.java to store the classpath as an environment variable instead of having it part of the command line as an argument, and then executing using ProcessBuilder instead.

 

Preparing a pull request for this.

> java2ws command too long
> ------------------------
>
>                 Key: CXF-7830
>                 URL: https://issues.apache.org/jira/browse/CXF-7830
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 3.2.6
>         Environment: Windows 10
> JDK 9, 10 and 11
>            Reporter: Fredrik Wangel
>            Priority: Critical
>              Labels: CLASSPATH, jdk10, jdk11, wsdl
>
> Using the cxf-java2ws-plugin from a Maven project using JDK 9+ (10 and 11 release candidate) on Windows 10, it fails to run because the generated command line is too long.
> In our case, the generated classpath was more than 75000 characters long – Yes, it is a big project. It used to work on JDK 8.
> {{[ERROR] Failed to execute goal org.apache.cxf:cxf-java2ws-plugin:3.2.6:java2ws (_EXECUTIONNAME_) on project _PROJECTNAME_: Error while executing process.: Cannot run program "cmd.exe" (in directory "C:\opt\dev\...\_PROJECTNAME_\target"): CreateProcess error=206, The filename or extension is too long -> [Help 1]}}
>  
> The current code base (3.3.0-SNAPSHOT) does not work at all with JDK 10 or 11.
> The problem is that the classpath is part of the command line and on Windows it seems to be limited to around 8000 characters.



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