[
https://issues.apache.org/jira/browse/NETBEANS-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17355049#comment-17355049
]
Roberto Cisternino edited comment on NETBEANS-2275 at 6/1/21, 1:22 PM:
-----------------------------------------------------------------------
The error "Exception in thread "main" java.lang.NoClassDefFoundError:
com/sun/tools/xjc/api/util/ToolsJarNotFoundException" is present also using JDK
8.212 and Netbeans 12.4 but in Netbeans 12.0 it worked as expected.
The issue is due to the fact that Netbeans 12.4 contains JAXB 2.3.3 which is
not including the above class.
One of the latest version of JAXB containing the ToolsJarNorFoundException
class seems to be the jaxb 2.2.6 included into NB 12.0.
The workaround is to use the JAXB version required by ANT, so I retrieved the
relevant libraries from NB 12.0 and copied into the folder
C:\Program Files\NetBeans-12.4\netbeans\java\ant\extra
...then I added the two jars in the ANT classpath as follows, and after a
rebuild of the project it worked flowless.
!image-2021-06-01-15-16-02-832.png!
was (Author: cistox):
The error "Exception in thread "main" java.lang.NoClassDefFoundError:
com/sun/tools/xjc/api/util/ToolsJarNotFoundException" is present also using JDK
8.212 and Netbeans 12.4 but in Netbeans 12.0 it worked as expected.
The issue is due to the fact that Netbeans 12.4 contains JAXB 2.3.3 which is
not including the above class.
The latest version of JAXB containing the ToolsJarNorFoundException class seems
to be the jaxb-xjc-2.2.8-b01.jar
The workaround is to use the JAXB version required by ANT, so I retrieved the
relevant libraries from NB 12.0 and copied into the folder
C:\Program Files\NetBeans-12.4\netbeans\java\ant\extra
...then I added the two jars in the ANT classpath as follows, and after a
rebuild of the project it worked flowless.
!image-2021-06-01-15-16-02-832.png!
> Importing WSDL on Java Application, error during compile
> --------------------------------------------------------
>
> Key: NETBEANS-2275
> URL: https://issues.apache.org/jira/browse/NETBEANS-2275
> Project: NetBeans
> Issue Type: Bug
> Components: java - Project
> Affects Versions: 9.0, 11.0, 12.0, 12.4
> Environment: Windows 10, macOS 10.15
> Reporter: David Baldo
> Assignee: Roberto Cisternino
> Priority: Major
> Attachments: image-2021-06-01-15-16-02-832.png
>
>
> I've an error while trying to create a new WSDL Client in Java Application
> project
> Steps to reproduce:
> # Create a new Java Application project
> # Create new WSDL Client
> # find a WSDL source (tried with my internal wsdl and
> [http://www.dneonline.com/calculator.asmx?WSDL)]
> # Have this error: ant -f
> C:\\Users\\David\\Desktop\\Lavoro\\RedEvo\\redevoclients\\Calculator
> wsimport-client-calculator
> init:
> wsimport-init:
> Created dir:
> C:\Users\David\Desktop\Lavoro\RedEvo\redevoclients\Calculator\build\generated-sources\jax-ws
> C:\Users\David\Desktop\Lavoro\RedEvo\redevoclients\Calculator\nbproject\jaxws-build.xml:15:
> taskdef A class needed by class com.sun.tools.ws.ant.WsImport cannot be
> found: com/sun/istack/tools/ProtectedTask
> using the classloader
> AntClassLoader[C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\FastInfoset.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\gmbal-api-only.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\ha-api.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\javax.mail_1.4.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\jaxws-rt.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\saaj-impl.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\stax2-api.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\woodstox-core-asl.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\stax-ex.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\streambuffer.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\policy.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\management-api.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\jaxws-tools.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\mimepull.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\api\jaxws-api.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\api\jsr181-api.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\api\javax.annotation.jar;C:\netbeans-apache\netbeans9\java\modules\ext\jaxws22\api\saaj-api.jar;C:\netbeans-apache\netbeans9\ide\modules\ext\jaxb\activation.jar;C:\netbeans-apache\netbeans9\ide\modules\ext\jaxb\api\jaxb-api.jar]
> BUILD FAILED (total time: 0 seconds)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists