Gen Web View application shows blank page/window after deployment
search cancel

Gen Web View application shows blank page/window after deployment

book

Article ID: 204630

calendar_today

Updated On:

Products

Gen

Issue/Introduction

Gen 8.6 Web View application.
Used Gen Studio Construction Configuration to both generate a cooperative client for Web View and launch the Build Tool to build the application.
After running the BT Assemble step for WebSphere Application Server (WAS) and deploy to WAS, when loading the application page it shows a blank page/window.
Also if open the html file direct from model.ief\WebViewUI folder it also shows a blank page/window.
The Toolset Window design is as follows:

Environment

Release : 8.6
Component : ECLIPSE WEB VIEW

Resolution

1a. Support recreated the reported behaviour with the supplied model MYAPP using WAS 9.0.5.5 environment.
On loading the application page it shows a blank window without the expected design/objects (http://lvntest014852:9080/Myapp/COOP.WMAN01.LM.html)
Using the browser in Developer mode shows error 500 (Internal Server Error):



b. The WAS SystemOut.log file also showed the corresponding exception:
===
[12/8/20 4:26:36:281 PST] 0000012c WebServiceExc E org.apache.axis2.jaxws.WebServiceExceptionLogger log A java.lang.NoClassDefFoundError throwable was caught. The detail message is: at com.ca.gen.webview.session.Session.(Unknown Source)
at com.ca.gen.webview.json.session.JSONSession.(Unknown Source)
at com.ca.gen.webview.rest.RestfulSession.(Unknown Source)
at com.ca.gen.webview.soap.SOAPServiceSessionFactory.getSession(Unknown Source)
at com.ca.gen.webview.soap.SOAPNewSessionRequest.processRequest(Unknown Source)
at com.ca.gen.webview.soap.requests.RequestHandler.processRequest(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher.invokeTargetOperation(JavaDispatcher.java:120)
...
Caused by: java.lang.ClassNotFoundException: com.ca.gen.abrt.GlobData
...
... 42 more
===

b. It was noticed that the user's Assemble steps did not have "Package runtime in EAR" enabled and the Myapp.ear file did not contain the genrt.jar file.
Without generating or rebuilding the application, Support just re-ran the Assemble step with option "Package runtime in EAR" enabled to create a new ear file:



The application MYAPP in WAS with updated with the new ear file.
After reloading the application page the window then displays the expected design/objects:




2. Customer later advised also using incorrect URL i.e.
"Correct URL.PNG" shows "COOP.WMAN01.LM.html" being used and the page displays successfully
"Error URL Capture.PNG" shows "NA01.html" (where NA01 is the name of the Window) and displays a blank page.
Web View uses a specific URL format (different to Web Generation) which is documented here:
Gen™ 8.6 > Developing > Designing > Use Gen Studio > Work with Web View > Deploy the Web View Application
===
Format for Load Module and Trancode Filenames
The Web View generator generates startup files for each load module and trancode is defined in the window and cooperative packaging. These HTML files are used to start the application.

For load modules, the filenames are suffixed with '.LM'.
 Example
If the packaging is Windows and the load module name is X, the load module HTML file is generated as 'WIN.X.LM.html'.

For trancodes, the filename contains the trancode name that is suffixed with '.TC’.
 Example
If the packaging is cooperative and the trancode name is X, the trancode HTML file is generated as 'COOP.X.TC.html'.
===
In contrast, Web Generation URL format simply uses the Window Manager name or trancode (both lowercase) and do not add .html (.jsp can be added) e.g. e.g. all these are valid for the Myapp Window Manager WMAN01 and trancode PR01:
http://hostname:9080/Myapp/wman01
http://hostname:9080/Myapp/wman01.jsp
http://hostname:9080/Myapp/pr01
http://hostname:9080/Myapp/pr01.jsp
Relevant doc page here: (see "Run Web Generation")
Gen™ 8.6 > Distributed Processing > Working With Web Generation > Building and Running a Web Generation Application

3. For Web Generation can simply open the <window>.html file in the model.ief\html folder in a browser and the page will display the expected Window design/objects.
However for Web View the generated <window>.html in the model.ief\WebViewUI folder contains "visibility:hidden" by default so when open it in a browser nothing is displayed on the browser page, so that is probably it was thought the Web View generated html was empty/had a problem. If in the html file "visibility:hidden" is temporarily changed to "visibility:visible" then the Window objects will be seen when the file is opened (although the layout is not as it would be at runtime):



That visibility option is changed dynamically by the Gen Java runtime once the page is loaded in an Application Server.

Additional Information

Gen™ 8.6 > Developing > Designing > Use Gen Studio > Work with Web View
Gen™ 8.6 > Tutorial > Build the Tutorial Model as a Web View Application in CA Gen Studio