This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 248553

Summary: java.net.MalformedURLException: no protocol: ${client.url}
Product: javaee Reporter: KonradZuse
Component: ServletAssignee: dbtech8
Status: NEW ---    
Severity: normal CC: dbtech8
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Similar problem in NetBeans IDE 8.2 on Debian 8 Linux

Description KonradZuse 2014-11-10 21:07:08 UTC
Hello all,

I saw another issue that was like mine that had to do with not setting the "relative Path" when using google chrome connector.  Turning it off stopped the error.

I have been working on a web app for about 5 months with no issues. My suspicion which seems to have come true, is that I just included JQuerySVG, a sampleSVG.html file, to my project.  At first it was 4 new files, but I tried moving 1 by itself and that didn't fix it, but if I moved the other 3 together to another project I could run my sampleSVG on that project, as well as running any file on the first project which was giving me the error.

I will have to move one at a time to see what's going on, but so far not cool.

Last night I was able to move these files back to the original project with no issues, but starting up Netbeans again now is giving me these results again.

Edit: So apparently after moving everything back glassfish had to start again and the error happened again.  I tried moving everything and instead of trying a plan on another project I tried one in the initial project and sure enough error is there...  So it seems like I can run another project then run the second one right away and it will work.

Edit2: Apparently now that Glassfish has started the app wont work at all... What is going on :'(.

Edit3: Tried resetting Netebans, error still persists, tried running 2 apps together when starting, nothing, Idk how I got it fixed before, but now it's not working...

I'm about to just start another project because this is clearly not due to what I thought it was originally.

Hopefully it can be resolved, thanks :)

Edit4:  I tried adding a random path and got the error again, then I did a clean/build and it works.

Removing the relative path still allows it to work, and when doing another clean/build it also works.

I also added back the other classes and everything seems to be working... Weird

Will keep this updated as I go along to see if the error comes back...  Thanks!

Build after adding relative Path, most likely the same as the other builds:
ant -f C:\\Users\\Konrad\\Documents\\NetBeansProjects\\WebViewer -Dnb.internal.action.name=run.single -Ddirectory.deployment.supported=true -Djavac.jsp.includes=org/apache/jsp/viewer_jsp.java -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=C:\\Users\\Konrad\\Documents\\NetBeansProjects\\WebViewer\\web\\viewer.jsp -Djsp.includes=C:\\Users\\Konrad\\Documents\\NetBeansProjects\\WebViewer\\build\\web\\viewer.jsp -Dclient.urlPart=/viewer.jsp run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Created dir: C:\Users\Konrad\Documents\NetBeansProjects\WebViewer\build\generated\src
Created dir: C:\Users\Konrad\Documents\NetBeansProjects\WebViewer\build\generated\classes
Compiling 1 source file to C:\Users\Konrad\Documents\NetBeansProjects\WebViewer\build\generated\classes
In-place deployment at C:\Users\Konrad\Documents\NetBeansProjects\WebViewer\build\web
run-deploy:
Browsing: http://localhost:8080/viewer.jsp
run-display-browser:
run:
BUILD SUCCESSFUL (total time: 19 seconds)


System Specs:

Product Version: NetBeans IDE 8.0.1 (Build 201408251540)
Updates: Updates available to version NetBeans 8.0.1 Patch 1.1
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\Konrad\AppData\Roaming\NetBeans\8.0
Cache directory: C:\Users\Konrad\AppData\Local\NetBeans\Cache\8.0


Initial Error:
ant -f C:\\Users\\Konrad\\Documents\\NetBeansProjects\\WebViewer -Dnb.internal.action.name=run.single -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=C:\\Users\\Konrad\\Documents\\NetBeansProjects\\WebViewer\\web\\svgBasic.html -Dclient.urlPart=/svgBasic.html run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Incrementally deploying WebViewer
Completed incremental distribution of WebViewer
run-deploy:
Browsing: ${client.url}
C:\Users\Konrad\Documents\NetBeansProjects\WebViewer\nbproject\build-impl.xml:1097: 
java.net.MalformedURLException: no protocol: ${client.url}
	at java.net.URL.<init>(URL.java:586)
	at java.net.URL.<init>(URL.java:483)
	at java.net.URL.<init>(URL.java:432)
	at org.netbeans.modules.ant.browsetask.NbBrowse.execute(NbBrowse.java:92)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
	at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:435)
	at org.apache.tools.ant.Target.performTasks(Target.java:456)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
BUILD FAILED (total time: 1 second)
Comment 1 KonradZuse 2014-11-29 23:27:57 UTC
AS an addition to this issue I basically get this error every time I restart the IDE.

I do a Clean and Build and everything is fine...

I wonder if this will crap out my application now and then....

I am going to take all of my files and create a new application when the time is right... I have a ton of extra files I don't need so.....


Hopefully this can be fixed for people in the future, but it's not a horrible issue (yet).  I have not deployed yet, so we shall see....


Thanks Team!
Comment 2 dbtech8 2017-06-05 16:24:34 UTC
Created attachment 164469 [details]
Similar problem in NetBeans IDE 8.2 on Debian 8 Linux

Product Version: NetBeans IDE 8.2 (Build 201609300101)
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 1
Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_111-b14
System: Linux version 3.16.0-4-amd64 running on amd64; UTF-8; en_US (nb)
User directory: /home/dbtech/.netbeans/8.2
Cache directory: /home/dbtech/.cache/netbeans/8.2
GlassFish Server Open Source Edition 5.0 (build 3)

Application:
Trying to run Java EE appl of CMT transaction 
compiled and deployed successfully.
The web client project start by index.html followed by 2 JSP pages.
The client project is built and deployed successfully(?), but run fails on
  java.net.MalformedURLException: no protocol: ${client.url}