Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
1.3
-
None
-
None
-
Websphere with jdk 1.4.2 / local XP machine with java5
Description
I get the following error if I have defined -Dhttp.nonProxyHosts=yyy|mbfq0202|*.epu.mycorp.com:
java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
*.epu.mycorp.com
^
at java.util.regex.Pattern.error(Pattern.java:1650)
at java.util.regex.Pattern.sequence(Pattern.java:1787)
at java.util.regex.Pattern.expr(Pattern.java:1687)
at java.util.regex.Pattern.compile(Pattern.java:1397)
at java.util.regex.Pattern.<init>(Pattern.java:1124)
at java.util.regex.Pattern.compile(Pattern.java:817)
at java.util.regex.Pattern.matches(Pattern.java:919)
at java.lang.String.matches(String.java:1921)
at org.apache.axis2.transport.http.ProxyConfiguration.validateNonProxyHosts(ProxyConfiguration.java:261)
at org.apache.axis2.transport.http.ProxyConfiguration.isProxyEnabled(ProxyConfiguration.java:223)
at org.apache.axis2.transport.http.AbstractHTTPSender.getHostConfiguration(AbstractHTTPSender.java:271)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:502)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
...
the problem is Axis2 does a String.match on ".epu.mycorp.com" in ProxyConfiguration.validateNonProxyHosts. This must fail because ".epu.mycorp.com" is a valid entry for http.nonProxyHosts, but it is not a valid regexp.
I suggest to add
for (int i=0; i<nonProxyHostsArray.length; i++) {
if (nonProxyHostsArray[i].startsWith("*"))
}
after
String[] nonProxyHostsArray = nonProxyHosts.split("
|");
Bernd
Attachments
Issue Links
- is part of
-
AXIS2-3453 java.util.regex.PatternSyntaxException in org.apache.axis2.transport.http.ProxyConfiguration
- Resolved