Showing posts with label WebSphere. Show all posts
Showing posts with label WebSphere. Show all posts

Wednesday, November 5, 2014

WebSphere Application Server - Quick How To


A quick list of "Good to Knows":
  • What is the default URL of the admin console: https://$hostname:10003/ibm/console/logon.jsp
  • What are the default ports: HTTP: 8080, HTTPS: 443.
  • How to locate the logs: Logs can be found under$install_root/profiles/$profile_name/logs/$server_name. The default profile name is AppSrv01 and the default server name is server1. Example:/usr/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1. SystemOut.log is the file containing everything that was logged to standard out. Logs can also be viewed from the admin console by navigating to Troubleshooting/Logging and Tracing/server_name/Runtime.
  • How to start/stop a server: If you're dealing with a "Network Deployment" type of installation (multiple application servers running under the control of the "deployment manager"), your can start/stop a server from the console (Server/Server Types/WebSphere application servers). Otherwise you have to do it from command line. Go to install_root/bin and run./startServer.sh server_name, e.g., ./startServer.sh server1 (this assumes that your installation has only one profile defined, otherwise you may need to "cd" to the profile_name/bindirectory). Make sure that you run all commands using the appropriate system account. To stop the server, run ./stopServer.sh server_name -username user_name -password password. user_name and password is the credentials of an admin account, typically the same one you use to login to the console.
  • How to deploy an application: In admin console, navigate to Applications/Application Types/WebSphere enterprise applications, click on "Install new application", select "Fast path", accept all the defaults except that on "step 2" make sure that you targeted correct servers (if you have multiple servers/clusters in your environment). Note that you can deploy a WAR file directly, you don't have to build an EAR. In this case, make sure that you set a context root on "step 4" screen of the wizard.
  • How to change context root of a Web application: Go to Applications/Application Types/WebSphere enterprise applications/application_name/Context Root For Web Modules in the console. Re-start the application after the change.
  • How to change the order of classloaders: If you're getting a ClassNotFoundException when you're starting the app, changing the order of classloaders is the first thing you may want to try. Go to Applications/Application Types/WebSphere enterprise applications/application_name/Manage Modules/module_name and make the appropriate selection in the "Class loader order" drop-down (this assumes you're doing it for a WAR module).
  • How to enable dynamic class reloading: If you need to frequently update your deployed application (e.g., you use a local WAS installation for development), enabling dynamic reloading could be a huge time saver. Go to your application in the console, "Class loading and update detection", set "Override class reloading settings ..." and set polling interval to 2 seconds. See this post for more details on how to configure your development environment to support class reloading.
  • How to find a host name and a port of the server: Go to Server/Server Types/WebSphere application servers. You'll find the host name in the Host Name column. To find a port, click on your server, and expand Ports. WC_defaulthost is the HTTP port and WC_defaulthost_secure is the HTTPS port.
  • How to kill a JVM: If the normal "stop" routine failed to stop the server in a reasonable amount of time, you may need to kill it. In a "Network Deployment" environment, simply navigate to the list of servers, select the server and click "Terminate". A node agent will kill the JVM for you. To achieve the same from command line (the only option if you're running standalone), cd toinstall_root/profiles/profile_name/logs/server_name, and kill the process ID contained in the file server_name.pid. On Unix, you can simply do kill -9 `cat server1.pid` (assumingserver1 is your server name). Use task manager or taskkill /PID on Windows.
  • How to browse JMS messages: Go to Buses/Your bus name/Destinations/Your destination/Queue points/Your queue point/Runtime/Messages.
  • Where to find configuration files: WAS has many configuration files, most of them are in XML/XMI format. The files are located under$install_root/profiles/$profile_name/config/cells/$cell_name.

Sunday, September 14, 2014

Installation of CF03 on Portal 8.0 may fail with exception

When trying to install CF03 on Portal 8.0, Installation fails with below error:

opt/IBM/Rendering/PortalServer/installer/wp.config/config/includes/wp_cluster_cfg.xml:1436: Detected single app deployment time greater than 5 minutes.

Check the \wp_profile\ConfigEngine\log\ConfigTrace.log log file for the following error:-
/opt/IBM/Rendering/PortalServer/installer/wp.config/config/includes/wp_cluster_cfg.xml:1436: Detected single app deployment time greater than 5 minutes at  com.ibm.wplc.deploy.tasks.impl.ClusterWaitForSyncToCompleteImpl.execute(ClusterWaitForSyncToCompleteImpl.java:289) at  com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeBean(AbstractBaseAdminTask.java:541) at com.ibm.wplc.deploy.tasks.AbstractBaseAdminTask.executeTask(AbstractBaseAdminTask.java:525)  at com.ibm.wplc.deploy.tasks.AbstractBaseWsAdminWrapperTask.executeTask(Abs
tractBaseWsAdminWrapperTask.java:376)

In addition to that you will see error like below:
[wplc-wait-for-sync-to-complete] Distribution of AJAX Proxy Configuration not complete.
[wplc-wait-for-sync-to-complete] Distribution of Dojo_Resources not complete.

Workaround 1:

1. Try to increase maxAppTimeToWait="5" to 15 min. in wp_cluster_cfg.xml and run the installation again.
If doesn't work and you notice that wp_cluster_cfg.xml parameter revert back to lower value, then try the workaround below:

Workaround 2:

1. Edit the PortalServer/wps.properties file and remove the lines for:
ProfileName
ProfileDirectory

Do not just comment them out; remove them completely.

2. Install CF03. It should go through successfully this time. It will NOT update the profile so it should skip the failing script.
3. Make the same timeout changes to wp_cluster_cfg.xml again.
4. Add ProfileName and ProfileDirectory back to wps.properties.
5. Execute this ConfigEngine script to update the profile:
./ConfigEngine.sh CONFIG-WP-PTF-CF -DWasPassword= -DPortalAdminPwd=

If doesn't work, continue to next step.

Workaround 3:

1 Edit the Installation Manager configuration file, found at /opt/IBM/InstallationManager/eclipse/configuration/config.ini
2. Add the following line to this file: WP_UPDATE_SKIP_CONFIG=true
3. Save the file and run the portal installation again. You will need to run ./ConfigEngine.sh CONFIG-WP-PTF-CF -DWasPassword= -DPortalAdminPwd= to finish update.

Technote reference : http://www-01.ibm.com/support/docview.wss?uid=swg21622946


Wednesday, November 27, 2013

How to generate a thread dump and heap dump in WebSphere 7 on UNIX/LINUX/AIX

So you want to manually invoke a heapdump?
  1. SSH/Telnet to the box.
  2. Get to your WebSphere 7 AppServer/bin directory, e.g. /opt/Was7/AppServer/bin.
  3. Run ./wsadmin.sh -profileName myProfileName -user wasadmin -password adminpassword (substitute your WAS profile name, user and password of course).
  4. This will give you a prompt where you can enter commands.
  5. First, we set a substitution variable with the full name of the object representing our app server:
    set jvm [$AdminControl completeObjectName type=JVM,process=MyServerName,*]
  6. Next, we can invoke the dumpThreads and/or generateHeapDump methods of that object:
    $AdminControl invoke $jvm dumpThreads
    $AdminControl invoke $jvm generateHeapDump

  7. By default, the commands above will place the dump files in the root directory for your application profile, e.g. /opt/Was70/AppServer/profiles/myAppProfile.
And you are done :-)

Thursday, October 31, 2013

WAS 8 and 8.5 Training Labs have been Released

Hi my fellow WebSpherians

Don't forget to visit the WebSphere Application Server version 8 and 8.5 training labs.

Attached the URLS :


http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.was_v8/was/8.0/Labs.html

http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/index.jsp?topic=/com.ibm.iea.was_v8/was/8.5/Labs.html

Your in WebSphere
Jerome

Tuesday, October 8, 2013

Wpcollector tool, new in WebSphere Portal 7.0 and 8.0

Wpcollector is a new command line tool that automates the collection of portal logs and configuration files and optionally assists the customer with sending those files to IBM Support, saving valuable time. Using automated log collection early in the PMR life cycle can greatly reduce the number of doc requests that are made by Support. Wpcollector is an excellent tool for those customers that are not able to download and install ISA Lite in their portal environment.

Wpcollector is delivered with WebSphere Portal beginning with the 7.0 release. A significant difference between wpcollector and ISA Lite is that ISA Lite will automatically enable the correct traceString and collect the appropriate files based on the problem type selected in the ISA Lite GUI. Wpcollector, however, does not currently have a mechanism for the user to specify the problem type. Therefore, if tracing is required for the problem, the customer must manually enable traceStrings and recreate the problem PRIOR to running wpcollector. Similarly, because wpcollector consists of only 1 script, it collects all of the files for all of the various problem types each time the tool is run.

To run wpcollector, please follow the steps, below:

  • If IBM Support has requested tracing, enable it as instructed by the L2 Support Engineer and then recreate the problem. If no tracing is requested, proceed to the step, below:

  • If using Microsoft Windows, Unix/Linux, or IBM i, run the following script from the /PortalServer/bin/ directory to begin the collection:

      Windows: wpcollector.bat
      Unix/Linux: wpcollector.sh
      i: wpcollector.sh
      Tip: To specify the option for automatically sending the collection to IBM Support via FTP, use the "pmr" parameter. This will associate the collection with the PMR (Problem Management Record) specified. Be sure to format the number using either periods or commas. For example:
      wpcollector.bat -Dpmr=nnnnn.bbb.ccc (nnnnn=PMR number, bbb=branch, ccc=country code)
      Tip: To specify the option for collecting files for the Deployment Manager profile, use the "dmgr.root" parameter. For example:
      wpcollector.bat -Ddmgr.root=/opt/IBM/WebSphere/profiles/dmgr_profile
  • If using IBM z/OS, proceed as follows:

      Start the WebSphere Portal Customization Dialog.
      In the Portal configuration panel, select Collect Diagnostics.
      Follow the Customization Dialog instructions for submitting the Collect Diagnostics job (EJPSLOGS).
      Tip: To specify the option for automatically sending the collection to IBM Support via FTP, respond to the "Transmit PMR Data" prompt with "Y" in the ISPF panel as follows:
      Transmit PMR data to IBM .................................: Y
      Tip: To collect data from the Deployment Manager, the only requirement is to submit the job from the system where the Deployment Manager is installed (i.e. so it can access the files). There is no prompt in the ISPF panel for this.

  • If the automatic send/FTP option was not specified, a manual transfer of the collection to IBM will be necessary. Locate the wp.mustgather-.zip file or the -wp.mustgather-.zip file in the <wp_profile_root>/filesForAutoPD/ directory and follow the instructions in "Exchanging information with IBM Technical Support for problem determination" to manually FTP the collection to IBM. If using z/OS, there may be additional z/OS-specific files required, such as WebSphere Portal servant region or controller region joblogs. Wpcollector currently does not collect these files. Your L2 Support Engineer will inform you in the event these files are needed and provide instructions for collecting them. 
Do not underestimate this tool as when raising a PMR it is best to ensure that IBM support have all the information they need.

Happy Trails
Jerome Slinger


Monday, July 8, 2013

WCM page and authoring portlet may not display after migration

Greetings Fellow WebSpherians

I am posting this one in response to a few queries that were mailed to me and here's to it being helpful :


After migrating to IBM WebSphere Portal V7.0, you may not be able to navigate to or display the Web Content Manager (WCM) out-of-box page or the authoring portlet. In addition, some related functions in the user interface might not work or might generate exceptions when accessed. Clicking buttons in the authoring portlet may generate the following error in the log:
    IWKAP0009E: Servlet not enabled.
If this occurs, you must re-enable these features manually after migration.


Cause


The migration process can disable some new out-of-the-box features if the feature did not exist in the previous release or if it was updated. In particular, the Portal page required for the reserved authoring portlet is missing and the permissions on the AJAX proxy servlet are not set correctly.

Resolving the problem


To re-enable the affected features manually after migration, do the following:

1. Make sure that the page on which the WCM authoring portlet is installed uses a theme with client-side rendering such as the Page Builder theme.

2. Deploy the hidden Portal page on which the reserved authoring portlet is installed.
3. Run the following task from the wp_profile_root / Config Engine directory.
    Cluster note: Run this task on the primary node in a V7 clustered environment.
    Windows:
    ConfigEngine.bat install-wcm-hidden-authoring-page -DWasPassword=password

    UNIX:
    ./ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password

    i/System:
    ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password

    z/OS (run from the UNIX shell) :
    ./ConfigEngine.sh install-wcm-hidden-authoring-page -DWasPassword=password
No restart of the Portal server is required. 

Thursday, February 14, 2013

How to retrieve a file name stored in WCM library file resource component using the API ReferenceComponent


finds the document id of the content items that match by name 
DocumentIdIterator docIdIterator = ws.findByName(DocumentTypes.Content, "testcontent");
DocumentId docId;
Content currentContent; 


loops through the document id's found in the iterator
while(docIdIterator.hasNext()) 
{
docId = (DocumentId)docIdIterator.next();

get the current content item
currentContent = (Content)ws.getById(docId); 

standard out log message
System.out.println("Log: Testing WCM API: Retrieved content name = " 
+ (String)currentContent.getName());

get the content's component reference element by name
ContentComponent myCmpnt = 
(ContentComponent) currentContent.getComponent("MyComponent");

standard out log message
System.out.println("Log: Testing WCM API: My Component getName = " 
+ (String)myCmpnt.getName());

Typecast using ReferenceComponent in order to access the library component 
stored in the content's component reference element

ReferenceComponent myRefCmpnt;
myRefCmpnt = (ReferenceComponent)myCmpnt;

Get the LibraryComponent which your content is referencing 
LibraryComponent myLibCmpnt = myRefCmpnt.getComponentRef() ;

standard out log message
System.out.println("Log: Testing WCM API: My Library Component name = " 
+ myLibCmpnt.getName());

Use the instanceof method to confirm the library component type. 
For example, this checks if your component is a Library File Component.

if (myLibCmpnt instanceof LibraryFileComponent)
{

In this example, the component reference holds a LibraryFileComponent. 
This will get the file name of the file stored in the LibraryFileComponent.
LibraryFileComponent fileCmpnt;
fileCmpnt= (LibraryFileComponent)myLibCmpnt;

standard out log message
System.out.println("Log: Testing WCM API: My Library File Component: File name = " 
+ fileCmpnt.getFileName() );
} end if statement

Saturday, December 8, 2012

Installing WebSphere Application Server version 8 web components

This topic provides instructions for installing new instances of IBM WebSphere Application Server version 8 for use with the RequisiteWeb application server in Rational® RequisitePro® version 7.1.3.1 or later.

About this task

WebSphere Application Server and IBM HTTP Server are installed using IBM Installation Manager. You must install WebSphere and HTTP Server first, and then install Rational RequisitePro web components.
Note: WebSphere Application Server version 8 is not compatible with Rational RequisitePro version 7.1.3.0 or earlier.
You can obtain WebSphere Application Server and HTTP Server V8 from IBM Passport Advantage at http://www.ibm.com/software/passportadvantage. Fixpacks are available from IBM Support Fix Central at http://www.ibm.com/support/fixcentral/.
Here is an overview of the steps you will use to install web server components for Rational ClearCase, Rational ClearQuest, and Rational RequisitePro:
  1. Using Installation Manager, install the following products and components:
    • IBM WebSphere Application Server
    • IBM HTTP Server for WebSphere Application Server
    • Web Server Plug-ins for IBM WebSphere Application Server
    • WebSphere Customization Toolbox
  2. Run the Web Server Plug-ins Configuration Tool, which is part of the Toolbox, to configure the web server to communicate with the application server.
  3. Install or upgrade Rational RequisitePro, including web server components.
Restrictions
Before you begin an installation of WebSphere Application Server version 8, review the following restrictions:
  • Prepare your operating system for WebSphere and IBM HTTP Server.
  • Refer to technote 1573966 "Known issues and limitations found while installing or configuring WebSphere Application Server and IBM HTTP Server v8.0 to work with IBM Rational ClearCase 8.0.0.1, IBM Rational ClearQuest 8.0.0.1 or IBM Rational RequisitePro 7.1.3.1".
  • Do not use symbolic links as the destination directory. Symbolic links are not supported.
  • Do not use a semicolon in the directory name. WebSphere Application Server cannot install properly if the target directory includes a semicolon. A semicolon is the character used to construct the class path on Windows systems.
  • The maximum path length for the installation location on the Windows Server 2008, Windows Vista, and Windows 7 operating systems is 60 characters.
  • Deleting the default target location and leaving an installation-directory field empty prevents you from continuing.

Procedure

To install WebSphere Application Server components:
  1. Launch Installation Manager.
  2. Select File > Preferences and add the installation repository for WebSphere Application Server in the Repositories section on the Preferences panel.
    Tip: In Installation Manager, select Search service repositories during installation and updates on the Installation Manager Repository preference page. Then, if you are connected to the Internet while you install, you can click Check for Other Versions and Extensions to search for updates in the default update repositories for the selected packages. In this case, you do not need to add the specific service-repository URL to the Installation Manager Repository preference page. Select the fixes to install. Any recommended fixes are selected by default. If there are recommended fixes, you can select the option to show only recommended fixes and hide non-recommended fixes.
  3. Click Install at the main Installation Manager screen.
  4. At the Install Packages panel, select the following packages to install, and then click Next to continue the installation.
    • IBM HTTP Server for WebSphere Application Server, Version 8.0.0.0 (or later)
    • IBM WebSphere Application Server, Version 8.0.0.0 (or later)
    • Web Server Plug-ins for IBM WebSphere Application Server, Version 8.0.0.0 (or later)
    • WebSphere Customization Toolbox, Version 8.0.0.0 (or later)
  5. If you want to install a fix pack for WebSphere Application Server and IBM HTTP Server, such as version 8.0.0.1, select the Check all versions and Check for Other Versions and Extensions check boxes. The fix pack versions are displayed in the list of packages. If they do not appear then the required repository is not included in the preferences; in this case, see Installation Manager tip in step 2. If package list is correct, click Next.
  6. If there are any fixes available, you are prompted to choose which ones to install. You should install all listed fixes. Choose the fixes to install and click Next.
  7. Accept the license agreement and click Next.
  8. At the next panel, you can change the default installation directory by selecting a package group name and specifying a new pathname in the Installation Directory field. Click Next.
    Note: If you change the install location of either the AppServer, Plug-ins, or Toolbox, you might need to make the same change for the others. Do not use locations that are already in use by another version of WebSphere Application Server and IBM HTTP Server on the same machine.
  9. Select your translation choices and click Next.
  10. At the Select the features to install panel, verify that IBM HTTP Server, IBM WebSphere Application Server, Web Server Plug-ins, and WebSphere Customization Toolbox are selected. Accept default selections. Click Next.
  11. On the Configuration for IBM HTTP Server panel, specify your web server configuration.
  12. Specify a port number on which IBM HTTP Server will communicate. Use the default port 80, unless you must use an alternate port to avoid a conflict.
  13. Choose whether to run the IBM HTTP Server as a Windows service. You can configure the service to run as local system account or a user ID that you specify. The user ID requires the following advanced user rights:
    • Act as part of the operating system.
    • Log on as a service
  14. Choose startup type Automatic.
    Important: If you do not select Run IBM HTTP Server as a Windows Service, this instance of IBM HTTP Server cannot be stopped or started by the WebSphere Application Server administrative console. At any time after installation, you can create a new service by running the following command: ihs_root/bin/httpd.exe -n new_service_name -k install and then update the web server definition in the administrative console to reflect the new service name.
  15. Click Next. Review the summary information and click Install. When the install completes successfully, you typically see a choice of post-installation tools:
    • WebSphere Customization Toolbox. You need this tool to configure the HTTP plug-ins. This tool must be run on Windows as built-in Administrator or as a local user in the Administrator group. For details, see APAR PM46369.
    • Profile Management Tool. You can use this tool to create a WebSphere Application Server profile if a web component will be deployed into an existing profile.
  16. Choose the WebSphere Customization Toolbox to configure the plug-in and click Finish.
    Note: If you do not see an option to run the WebSphere Customization Toolbox, click the Windows Start menu: All Programs > IBM WebSphere > WebSphere Customization Toolbox V8.0 > Tools > WebSphere Plug-ins Configuration Tool.

Wednesday, October 31, 2012

IBM Customer Experience Suite, IBM WebSphere Portal, and IBM Web Content Manager V8.0

Hey WebSpherians!

So I have decided to venture into the WCM and Portal 8 Realm.Don't forget that I will still be responding to all the WCM/Portal 6 and 7 questions that get submitted.

I decided to add this article plus the source as it does provide some interesting information about my next adventure.

Source :https://www.ibm.com/developerworks/mydeveloperworks/blogs/WebSpherePortal/?lang=en 


Take a look at the latest updates available with the IBM Customer Experience Suite, WebSphere Portal and Web Content Manager Beta Two release. 

This beta release operates on WebSphere Application Server Version 8, and includes updates that can provide your users with a more social, mobile and integrated experience.
Version 8.0 Beta two highlights include
Access the details, Beta software, documentation and support forum here: 
 We look forward to your impressions and experiences with the latest updates.

Generate reports from Opportunities using a Visualforce Page in Salesforce

  Step 1: Create a Visualforce Page Go to the Setup menu in Salesforce. Search for "Visualforce Pages" in the Quick Find box and c...