Showing posts with label WebSphere-Application-Server. Show all posts
Showing posts with label WebSphere-Application-Server. 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 portsHTTP: 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 filesWAS 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.

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 :-)

Monday, November 4, 2013

WAS 7 ND - INSTCONFFAILED : NONROOT_INSTALL_DISALLOWED

Error located in the installation log (/ihslogs/) file for a WAS 7ND installation using a response file.

(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, ********************************************************************************
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Starting a new installation or uninstallation procedure.
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, ********************************************************************************
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Java Install Path: /opt/IBM/ITM/WebSphere/installs/WAS70/JDK/jre.pak/repository/package.java.jre/java/jre
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Name: AIX
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Architecture: ppc64
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Version: 6.1
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current User ID: wasadmin
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current User Home: /home/wasadmin
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current Working Directory: /opt/IBM/ITM/WebSphere/installs/WAS70/WAS
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.PopulateTitleBarAction, msg1, IBM WebSphere Application Server 7.0
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPFileDeleteAction, msg1, Deleting file: Source: /tmp/.aix_ISMP_lock____
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPWarningDialogAction, wrn, INSTCONFFAILED : NONROOT_INSTALL_DISALLOWED : Set the non-root install allowed setting to true in the response file before installing.
Correct the specification to proceed.
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.SettleNIFRegistryAction, msg1, Current install/uninstall process failed.
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=1
(04-Nov-2013 13:05:17), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFFAILED



Solving the Problem:

Edit your reponse file and add the follownig entry

-OPT allowNonRootSilentInstall=”true

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

Friday, October 4, 2013

Installing WebSphere Application Server Version 8 or later

Before you begin

If Installation Manager is running, stop it.

About this task

You can install IBM WebSphere Application Server, version 8.0 at the same time that you install Rational® Software Architect, version 8.0 or by itself. Unlike the other WebSphere Application Server test environment extensions, WebSphere Application Server, version 8.0 does not share the same installation location and package group as Rational Software Architect, version 8.0.

Procedure

  1. If Rational Software Architect is running, stop the software.
  2. Depending on your user ID, complete one of the following steps:
    • If you are installing as an Admin:
      1. Start the launchpad.
      2. Click Install IBM Rational Software Architect.
    • If you are installing as a non-Admin: Start the installation from the Setup disk by running the userinst program.
  3. Install or update IBM Installation Manager.
    1. On the first page of the Install Packages wizard, click Check for Other Versions and Extensions to install the latest available version. If a newer version is available, it is automatically selected for installation. Click Next.
    2. On the Licenses page, read the license agreements for IBM Installation Manager. If you agree to the terms of all of the license agreements, click I accept the terms in the license agreements and then click Next.
    3. If Installation Manager is not already installed: On the location page, in the Installation Manager Directory field, type the path type the path for the directory where you want to install Installation Manager or accept the default path and then click Next.
    4. On the Summary page, review your choices before starting the installation process. If you want to change your selections, click Back to return to the previous pages. When you are satisfied with your selections, click Install.
    5. When the installation process completes, click Restart Installation Manager. Installation Manager closes and restarts.
  4. In the IBM Installation Manager window, click Install. The Install Packages wizard opens.
  5. On the first page of the Install Packages wizard, select Application Server 8.0.0.0 and then click Next.
  6. You can install updates at the same time that you install the base product package. To search for updates to the packages, click Check for Other Versions and Extensions. Installation Manager searches for updates at the predefined IBM update repository for the product package. It also searches any repository locations that you have set.
  7. To learn more about the packages that you can install, click the package name. A description of the package is displayed in the Details pane. If additional information about the package is available, a More info link is included at the end of the description text. Click the link to display the additional information in a browser.
  8. Click Next.
  9. On the Licenses page, read the license agreements for the selected packages. On the left-hand side of the License page, click each package version to display its license agreement.
    1. If you agree to the terms of all of the license agreements, click I accept the terms of the license agreements.
    2. Click Next to continue.
  10. Depending on whether you have already used Installation Manager to install software, you might have to select the shared resources directory on the Location page. Type the path for the in the Shared Resources Directory field, or accept the default path and then click Next to continue. If you are installing on Linux, ensure that you do not include any spaces in the directory path. The shared resources directory contains resources that can be shared by one or more package groups.
    Important: You can specify the shared resources directory only at the time that install Installation Manager. Use your disk with the most available space for this to help ensure adequate space for the shared resources of future packages. You cannot change the directory location unless you uninstall all packages.
  11. On the Location page, type the path for the installation directory for the package group and then click Next. (If you are installing on Linux, ensure that you do not include any spaces in the directory path.) The name for the package group is created automatically.
    Important: If you are installing as with a non-Admin user ID on Microsoft Windows Vista, Windows 7, or Windows Server 2008: You must choose an installation location the product that is not in the Program Files path (C:\Program Files) if you want to be able to run the application as a non-Admin user.
    If you select an installation directory that is in the Program Files path, then you must run the application as the administrator. To run as administrator, right-click the program shortcut and click Run as administrator.
  12. On the Features page, select the features that you want to install. Click the feature to see more information about it in the Details section of the page. When you are finished, click Next.
  13. On the Summary page, review your choices before installing the product package. If you want to change the choices that you made on previous pages, click Back, and make your changes. When you are satisfied with your installation choices, click Install to install the package. A progress indicator shows the percentage of the installation completed.
  14. When the installation process completes, select to star Profile Management Tool and then click Finish.

What to do next

  • Create a developer profile for WebSphere Application Server, version 8.0.
  • If not installed already, install IBM Rational Software Architect, version 8.0. Ensure that you select the WebSphere Application Server, version 8.0 development tools feature.
Reference : http://pic.dhe.ibm.com/infocenter/rsahelp/v8/index.jsp?topic=%2Fcom.ibm.xtools.installation.rsaws.doc%2Ftopics%2Ft_install_was8.html

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...