Fibre Channel (SAN)

Reply
Contributor
Posts: 28
Registered: ‎02-21-2007

Launch of Webtools from within BNA failing due to invalid jnlp file

We just upgraded BNA to 12.3.4, and now, when we try to launch the webtools, from within BNA, for any of our san directors/switches, we are getting a failure in java, where it says it could not launch the application.

 

Looking at the detail exception information, I see the following:

 

JNLParseException[ Could not parse launch file. Error at line 0.]
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

 

 

The launch file it's trying to run is:

 

<%@page contentType="application/x-java-jnlp-file" info="JNLP Client" %>
<%@page import="com.brocade.dcm.system.Version"%>
<%@page import="com.brocade.dcm.system.SystemPropertiesUtil" %>
<%@page import="java.util.Map" %>

<%
StringBuilder uri = new StringBuilder(request.getScheme());
uri.append("://").append(request.getServerName());
if (request.getServerPort() != (!request.isSecure() ? 80 : 443)) {
uri.append(':').append(request.getServerPort());
}
String homepage = uri.toString();
String docroot = uri + request.getContextPath();
String jnlppath = request.getRequestURI();
String codebase = homepage + jnlppath.substring(0, jnlppath.indexOf("wtproxy.jnlp"));

String initHeap = "64m";
String maxHeap = System.getProperty("webtools.jvm.maxheap.size", "512m");

String server = request.getServerName();
String sslenabled = "false";
if(request.isSecure()) {
sslenabled = "true";
}
String switchname = request.getParameter("switchname");
String switchip = request.getParameter("switchip");
String wtpage = request.getParameter("wtpage");
String token = request.getParameter("token");
String sessionId = request.getParameter("sessionId");

String task = request.getParameter("task");
String taskParameters = request.getParameter("taskParameters");

String wthtmlpage = "/switchexplorer.html";
String wtmainclass = "com.brocade.web.switchview.SwitchExplorerApplet";
String wtsubtitle = "Switch Explorer";
if ("PORT_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.port.view.PortAdminApplet" ;
wthtmlpage = "/portadmin.html";
wtsubtitle = "Port Admin";
} else if ("ADMIN_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.admin.SwitchAdminApplet" ;
wthtmlpage = "/admin.html";
wtsubtitle = "Switch Admin";
} else if ("FCR_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.fcr.views.FCRAdminApplet" ;
wthtmlpage = "/fcradmin.html";
wtsubtitle = "FCR Admin";
} else if ("PERF_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.newperf.PerfMonitorApplet" ;
wthtmlpage = "/performancemonitor.html";
wtsubtitle = "Performance Monitor";
} else if ("FW_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.newfw.FabricWatchApplet" ;
wthtmlpage = "/fabricwatch.html";
wtsubtitle = "Fabric Watch";
} else if ("NS_PAGE".equals(wtpage)) {
wtmainclass = "com.brocade.web.zoning.NameServerApplet_SS" ;
wthtmlpage = "/NSTableShow.html";
wtsubtitle = "Name Server";
}


int port = Integer.getInteger("jboss.remoting.connector.port", 24600);

Version version = Version.getInstance();
StringBuilder product = new StringBuilder("Web Tools");
product.append(' ').append(version.getMajor()).append('.').append(version.getMinor());
String oemDisplayName = version.getProperty("product." + version.getBuildOem() + ".displayname");

String defaultProtocol = "http";
String connectorProtocol = "0";
int defaultPort = 80;
try {
Map<String, String> systemProps = SystemPropertiesUtil.getHttpConnectorProperties();
boolean isHttpsEnabled = false;
int httpPort = 80;
int httpsPort = 443;
for (String key : systemProps.keySet()) {
String value = systemProps.get(key);
if (key.equalsIgnoreCase("connector.http.enabled")) {
isHttpsEnabled = value.equals("0");
} else if (key.equalsIgnoreCase("connector.http.port")) {
httpPort = Integer.parseInt(value);
} else if (key.equalsIgnoreCase("connector.http.ssl.enabled")) {
isHttpsEnabled = value.equals("1");
} else if (key.equalsIgnoreCase("connector.http.ssl.port")) {
httpsPort = Integer.parseInt(value);
} else if (key.equalsIgnoreCase("discovery.connector.protocol")) {
connectorProtocol = value;
}
}
if (connectorProtocol.equals("0")) {
defaultProtocol = "http";
defaultPort = httpPort;
} else {
defaultProtocol = "https";
defaultPort = httpsPort;
}
String protocol = SystemPropertiesUtil.getProtocolForIp(switchip);
if(protocol != null) {
defaultProtocol = protocol;
if(defaultProtocol.equals("http")) {
defaultPort = httpPort;
} else {
defaultPort = httpsPort;
}
}
} catch (Exception e) {
}

String tlsProtocol = System.getProperty("tls.protocol.version", "TLSv1.2");
%>

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="6.0" codebase="<%= codebase %>">

<information>
<title><%= switchname %>: WebTools: <%= wtsubtitle %></title>
<vendor> <%= oemDisplayName %> </vendor>
<homepage href="<%= homepage %>"/>
<description>Web Tools</description>
</information>

<application-desc main-class="com.brocade.efcm.wtproxy.client.WTProxyLauncher" >
<argument><%= switchip %></argument>
<argument><%= wtmainclass %></argument>
</application-desc>

<offline-allowed/>

<resources>

<j2se version="1.6+" initial-heap-size="<%=initHeap%>" max-heap-size="<%=maxHeap%>"/>
<!-- TODO Jar names also need to be parameterised. We can do this after backend provides a more structured wtjars.html ~sk -->
<jar href="wt-app.jar" download=" eager"/>
<jar href="wt-thirdparty.jar" download=" eager"/>
<extension name="wtproxy-client" href="<%= docroot %>/wtproxy-client.jnlp" />

<property name="jnlp.packEnabled" value="true"/>
<property name="jnlp.wt.dcfm.launch" value="true"/>
<property name="jnlp.wt.dcfm.server.name" value="<%=server%>"/>
<property name="jnlp.wt.dcfm.server.port" value="<%=port%>"/>
<property name="jnlp.wt.dcfm.ssl.enabled" value="<%=sslenabled%>"/>
<property name="jnlp.wt.dcfm.switch.name" value="<%=switchname%>"/>
<property name="jnlp.wt.dcfm.switch.ip" value="<%=switchip%>"/>
<property name="jnlp.wt.dcfm.sessionid" value="<%=sessionId%>"/>
<property name="jnlp.wt.dcfm.wtproxy.classname" value="com.brocade.efcm.wtproxy.client.WtProxyClient"/>
<property name="jnlp.wt.dcfm.wtproxy.methodname" value="handleProxyRequest"/>

<property name="jnlp.wt.token" value="<%=token%>" />
<property name="jnlp.wt.authenticated" value="0" />
<property name="jnlp.wt.urlProtocol" value="<%=defaultProtocol%>" />
<property name="jnlp.wt.urlPort" value="<%=defaultPort%>" />
<property name="jnlp.wt.dcm.dcmrealm.password" value="jP6gyHn8DTty9oyf93Rujw=="/>
<property name="jnlp.wt.tls.protocol.version" value="<%=tlsProtocol%>"/>
<property name="jnlp.wt.tls.discovery.connector.protocol" value="<%=connectorProtocol%>"/>

<%
if (task != null && task.trim().length() > 0) {
out.println("<property name=\"jnlp.wt.task\" value=\"" + task + "\" />");
}
if (taskParameters != null && taskParameters.trim().length() > 0) {
out.println("<property name=\"jnlp.wt.taskParameters\" value=\"" + taskParameters + "\" />");
}
%>

</resources>

<security>
<all-permissions/>
</security>

</jnlp>

 

Peter

Occasional Contributor
Posts: 13
Registered: ‎06-27-2014

Re: Launch of Webtools from within BNA failing due to invalid jnlp file

[ Edited ]

Hi Peter,

 

Did you managed to solve this issue?

I having the same issue, can you please share if you had found the solution?

 

Thank you.

 

 

Regards,

Liem

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.

Download FREE NVMe eBook