What does 'URI has an authority component' mean?
I am attempting to build a Java web project on NetBeans 6.8, but I get get the following error:
The module has not been deployed.
It points to my build-impl.xml
file, line 577:
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
The GlassFish v3 error log says:
SEVERE: Exception in command execution : java.lang.IllegalArgumentException: URI has an authority component
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(File.java:368)`..., etc.
What does "URI has an authority component" mean?
An authority is a portion of a URI. Your error suggests that it was not expecting one. The authority section is shown below, it is what is known as the website part of the url.
From RFC3986 on URIs:
The following is an example URI and its component parts:
foo://example.com:8042/over/there?name=ferret#nose
\_/ \______________/\_________/ \_________/ \__/
| | | | |
scheme authority path query fragment
| _____________________|__
/ \ / \
urn:example:animal:ferret:nose
So there are two formats, one with an authority and one not. Regarding slashes:
"When authority is not present, the path cannot begin with two slash
characters ("//")."
Source: https://tools.ietf.org/rfc/rfc3986.txt (search for text 'authority is not present, the path cannot begin with two slash')
The solution was simply that the URI was malformed (because the location of my project was over a "\\" UNC path). This issue was fixed when I used a local workspace.
Flip over to the GlassFish output tab, it'll give you better info. Netbeans gives you that generic error, but Glassfish gives you the details. When I get this it's usually a typo in one of my JSP or XML files...