WebSphere Portlet Factory uses the WebSphere JMX client to publish projects to WebSphere AppServer and WebSphere Portal. This article describes how to diagnose problems publishing from WebSphere Portlet Factory.
The following steps apply to WebSphere Portlet Factory 7.0 and earlier:
The first step to diagnosing publishing problems with WebSphere Portlet Factory is to restart the Designer using some additional command line arguments. Modify the command line or your launch shortcut to include the following command line arguments: -debug -consolelog. For example:
eclipse.exe -debug -consolelog
If your existing command line contains a -vmargs argument, the -debug and -consolelog arguments must appear BEFORE the -vmargs argument. For example:
eclipse.exe -debug -consolelog -vmargs -Xmx384m
If your version of Eclipse has an eclipsec.exe executable, then use eclipsec.exe rather than eclipse.exe.
After restarting the WebSphere Portlet Factory Designer, you should see that Eclipse is logging data to the console window where the Designer was launched from. When Eclipse is restarted, make note of the -vm parameter echoed in the console window. If the -vm parameter points to a javaw executable, like this:
-vm C:\IBM\SDP\jdk\jre\bin\javaw.exe
Then you will need to also add a -vm argument to the command line to specify that Eclipse should use java instead of javaw. For example:
eclipsec.exe -debug -consolelog -vm C:\IBM\SDP\jdk\jre\bin\java.exe -vmargs -Xmx384m
Now, re-try the publish operation and examine the data that Eclipse logs to the console.
Web Experience Factory 7.0.1 and newer does not require any re-configuration. Publish results are automatically logged to a log file in WebContent/WEB-INF/logs in your project. Look for a log file named publish_.log.
Some common problems are:
You see an exception with the following message:
Caused by: java.net.UnknownHostException: myhost.ibm.com
This indicates that you have some name resolution issues. In the WebSphere Portlet Factory Designer you enter the connection details using an IP address or hostname for the remote server. WebSphere Portlet Factory then uses this IP address or hostname to make the initial connection to the remote server. Any problem with this IP address or hostname here will show up when using the Test Connection button in the configuration dialog. However, during the publishing process, once the initial connection has been made, the WebSphere server requests that the JMX client (WebSphere Portlet Factory Designer) use a different hostname to communicate with the server. If this alternate hostname returned by the WebSphere server cannot be resolved on the client, or resolves to a different IP address, then publishing will fail.
To see the hostname that WebSphere is requesting that the JMX client use, you can look in your app server's profile/config/cells/cellname/nodes/nodename/serverindex.xml file. Locate the serverEntries tag for your target server. Under this serverEntries tag, there should be a specialEndpoints tag for the SOAP_CONNECTOR_ADDRESS endpoint. The host defined under this tag is the hostname that WebSphere will request that the JMX client use for all subsequent communication. For example:
<serverEntries xmi:id="ServerEntry_1270442010323" serverName="WebSphere_Portal" serverType="APPLICATION_SERVER">
...
<specialEndpoints xmi:id="NamedEndPoint_1270442010324" endPointName="SOAP_CONNECTOR_ADDRESS">
<endPoint xmi:id="EndPoint_1270442010324" host="myhost.ibm.com" port="10033"/>
</specialEndpoints>
...
Make sure that your machine (where WebSphere Portlet Factory is installed) can resolve this hostname and that it resolves it to the same IP address that you're using in the deployment configuration panel. If not, then you'll need to add it to your operating system's hosts file. On windows, you can add this to c:\windows\system32\drivers\etc\hosts. On linux, you can add this to /etc/hosts.
You see an exception with the following message:
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket:
java.net.SocketException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.SocketException: java.lang.ClassNotFoundException: com.ibm.websphere.ssl.protocol.SSLSocketFactory]
This indicates that the JRE that Eclipse is using is not an IBM JRE. Only an IBM JRE can properly load the SSL classes required for secure communication with the WebSphere AppServer. Restart the WebSphere Portlet Factory Designer using an IBM JRE. WebSphere Portlet Factory ships with a compatible IBM JRE which can be used.
You see an exception with the following message:
javax.management.InstanceNotFoundException: WebSphere:process=WebSphere_Portal,type=ConfigService,*
This indicates that you are attempting to publish to a WebSphere cluster. WebSphere Portlet Factory does not support publishing to a WebSphere cluster for development.