I have a JavaEE simple HelloWorld project developed using Netbeans. If I debug it or run it it works as expected in these situations (at least):
1) Netbeans 8.2 + Wildfly 12
2) Netbeans 10 + Wildfly 12
3) Netbeans 11 + Wildfly 12
but it fails (at least):
1) Netbeans 8.2 + Wildfly 15
2) Netbeans 10 + Wildfly 15
3) Netbeans 11 + Wildfly 15
The error shown when I try to run or debug using Wildfly 15 is:
Browsing: http://localhost:8080undefined/
java.net.MalformedURLException: For input string: "8080undefined"
at java.net.URL.<init>(URL.java:627)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:67)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
Caused by: java.lang.NumberFormatException: For input string: "8080undefined"
If I go deeper in the problem, it seems to be caused by wrong interpretation of ${client.url} on build-impl.xml, but I cannot figure out how to solve it.
A workaround could be to add
<target if="do.display.browser.debug" name="debug-display-browser">
<nbbrowse context="" url="http://localhost:8080/" urlPath="${client.urlPart}"/>
</target>
at the end of build.xml on the project root, but I would like to know how to fix the origin of the problem.
I have to say that the error is not blocking, that means that the project is successfully deployed, but the browser is not opened, what is somehow annoying. If I manually open the browser and write down the URL then everythings goes right.
Kind regards