Hi,

Jay SenSharma

Jay SenSharma

Many times while deploying and running our applications on Containers we find the following kind of excception, specially in case of Production Environments where we have many firewall restrictions:


####<Mar 25, 2010 11:18:54 AM EDT> <Warning> <HTTP> <MAL0700739> <AdminServer> <[ACTIVE] ExecuteThread: ‘6’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <1269530334500> <BEA-101196> <[efc]: Error while parsing the Tag Library Descriptor at “C:OracleMiddlewareuser_projectsdomainsbase_domainserversAdminServertmp_WL_userefcru63o8warWEB-INFlibspring-webmvc.jar!/META-INF/spring.tld”.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,134]
Message: Tried all: ‘1’ addresses, but could not connect over HTTP to server: ‘java.sun.com’, port: ’80’
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:545)
at weblogic.servlet.internal.TldCacheHelper$TldIOHelper.parseXML(TldCacheHelper.java:132)
at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:380)

To get rid of this kind of issues:

you need to use the following flags …in your Servers’s startScript (JAVA_OPTIONS) to by pass the the request through proxy..

(WINDOWS) set JAVA_OPTIONS= %JAVA_OPTIONS%   -Dhttp.proxyHost=HostName -Dhttp.proxyPort=9999
(UNIX Based OS) JAVA_OPTIONS= ${JAVA_OPTIONS}   -Dhttp.proxyHost=HostName -Dhttp.proxyPort=9999

Here “HostName” will be your Proxy Hostname which you use to interact to the World behind the Firewall…similarly… “proxyPort” is the port of your Proxy …
Usually we can see these settings in our InternetExplorer….”Tools”—>”Internet Options”—>”Connections”(Tab)—->”LAN Setting”

Or better we can confirm these values for “proxyHostName” & “proxyPort” from the N/w administrators of your organization.

Better first Test with this simple program…. then apply the Settings on the Server.

———————

Testing Without involving the WebLogic or any other container:

import java.net.*;
public ProxyTestClasss
{
public public static void main(String ar[]) throws Exception
{
////// System.setProperty("http.proxyHost", "yourProxyHost");
/////System.setProperty("http.proxyPort", "7676");              //your ProxyPort
URL url = new URL("http://java.sun.com:80");       //Try to accesss this URL with &amp; without proxy settings...
}
}

.
.
See which one you are able to access….and working…(Run this program from the same machine where your Server is was running with issue)
javac -d . ProxyTestClass.java

Observation-1). java ProxyTestClass

Observation-2). java -Dhttp.proxyHost=HostName -Dhttp.proxyPort=9999 ProxyTestClass


NOTE: If you have services that don’t need to go through the proxy But some services and Applications need to go through Proxy, you will need to add the JVM argument -Dhttp.nonProxyHosts and stipulate the hosts/IP addresses that do not go through the proxy.

Example:

If we will use only “-Dhttp.proxyHost=ProxyHostName -Dhttp.proxyPort=9999”  options then Managed server will started realy its services on proxy server and will not able to contact Admin server ..which is running on local hosts. In these Scenarios we need to set -Dhttp.nonProxyHostst as well in Managed Server StartScript.

.

.

Thanks

Jay SenSharma

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.