Previous Contents Index Next |
Sun Java System Application Server Standard and Enterprise Edition 7 2004Q2 Update 2 Troubleshooting Guide

> ## Appendix B
> Frequently Asked Questions (FAQs)

> These frequently-asked-questions (FAQs) in this appendix are sorted into the following sections:

> - Installation and Access
> - Licensing
> - Platform Support
> - Functional Support
> - General Administration
> - High-Availability
> - Server Configuration and Control
> - Application Programming
> - Application Debugging
> - Upgrade/Migration

> ##

> Installation and Access

> This section addresses the following questions:

> - How to tell which version of the application server is running?
> - How to determine the build date and version?
> - Where else is version information available?
> - How do I access the sample applications?

> ### How to tell which version of the application server is running?

> Execute the following command:

> asadmin version

> ### How to determine the build date and version?

> To get the application server version, you use this command:

> asadmin version

> To get the build date, use this variation:

> asadmin version --verbose

> The build date appears in parentheses, like this:

> ... (build A021926-226218)

> The field before the hyphen contains the date, and the field after the hyphen contains the time. The following examples show ho to extract the date and time from those fields.

> To extract the date from “A021926”:

> - The first 2 digits in the field (02) are the last two digits of the year (2002).
> - Subtract 11 from the next two digist (19) to get the month (8, or August).
> - Subract 11 from the last two digits (26) to get the day (15).

> Here, the build date is 08/15/2002.

> To extract the time from “226218”

> - Subract 11 from the first two digits (22) to get the hour (11).
> - Subtract 11 from the next two digits (62) to get the minutes (51).
> - Subtract 11 from the last two digits (18) to get the seconds (7).

> So the build time in this example is 11:51:07.

> ### Where else is version information available?

> In the Administration interface, click the server instance name in the left panel and select the General tab. The Install Version information appears in the right panel.

> At the command line, use the asadmin version command:

> version [--user admin_user] [--password admin_password] [--host localhost] [--port 4848] [--local=false] [--verbose=false]

> You can also check the /var/sadm/install/productregistry XML file for the Application Server.

> ### How do I access the sample applications?

> You can tour the features of the Sun Java System Application Server by running the sample applications. Access the start page here:

> install_dir/samples/index.html

> ##

> Licensing

> This section addresses the following questions:

> - How do I renew an expired evaluation license?
> - Can I upgrade from an evaluation license to a full Sun Java System Application Server 7 license?
> - In a media package, how do I get the license key?
> - How can I get an evaluation license for Enterprise Edition?

> ### How do I renew an expired evaluation license?

> Update the license using the asadmin install-license command.

> Instructions are contained in the Licensing appendix of the Sun Java System Application Server Installation Guide

> ### Can I upgrade from an evaluation license to a full Sun Java System Application Server 7 license?

> Maybe. Follow these steps:

> 1. Go to the Application Server’s home directory.
> 2. Go to the /bin dir.
> 3. Run the asadmin command.

> This starts a new session with the prompt asadmin>

> 4. Enter the command display-licence.

> The licence details are displayed.

> 5. Check whether you have unlimited licence. If you don’t, you cannot upgrade.
> 6. Enter the install-licence command.

> You will be prompted for your key.

> 7. Copy and paste the key from the following location:

> http://edist.central/

> ### In a media package, how do I get the license key?

> The software license key, also known as the activation code, is on the welcome card in the media package.

> ### How can I get an evaluation license for Enterprise Edition?

> there isn’t one

> ##

> Platform Support

> Most questions about supported platforms for Sun Java System Application Server 7 can be found in the Platform Summary documents for the various releases here:

> http://docs.sun.com/db/prod/s1.asse

> This section addresses the following questions:

> - What’s the difference between Standard Edition and Enterprise Edition?
> - What Sun ONE Message Queue versions are supported?
> - What J2SE versions are supported?
> - What database drivers are supported?
> - Is JADO supported for Sun Java System Application Server 7?
> - Does Sun Java System Application Server 7 have a JCA connector to talk to SAP R3?
> - Are custom authorization providers supported?

> ### What’s the difference between Standard Edition and Enterprise Edition?

> The Enterprise Edition (EE) provides the High Availability features like load balancing (LB) and Session Persistence (SP), in addition to all SE functionality. Please check the release notes of the EE version for specific details of LB and SP.

> ### What Sun ONE Message Queue versions are supported?

> Which versions of Sun ONE Message Queue are supported with which versions of Sun Java System Application Server?

> - Sun Java System Application Server 7.1 is bundled with Sun ONE Message Queue 3.5 SP1.

> ### What J2SE versions are supported?

> - Sun Java System Application Server 7.1 is bundled with J2SE 1.4.2_04.

> ### What database drivers are supported?

> The Application Server 7 product is designed to support connectivity to any database management system with a corresponding JDBC driver. Refer to the Sun Java System Application Server Platform Summary for a list of the components that Sun has tested and found to be acceptable for constructing J2EE-compatible database configurations.

> Additional driver have been tested to meet the JDBC requirements of the J2EE 1.3 platform with the following JDBC Driver Certification Program:

> http://java.sun.com/products/jdbc/certification.html

> These drivers can be used for JDBC connectivity with the Application Server. Although Sun offers no product support for these drivers, we will support the use of these drivers with the Application Server.

> ### Is JADO supported for Sun Java System Application Server 7?

> Answer: Java Data Objects (JADO) is used under the covers for the container-managed persistence (CMP) engine. JDO is not exposed/supported.

> ### Does Sun Java System Application Server 7 have a JCA connector to talk to SAP R3?

> Our ISV partners for JCA connectors are Insevo, Attachmate, iWay, and Seagull. They have ported to Sun Java System Application Server 7.

> ### Are custom authorization providers supported?

> As a J2EE 1.3 product, Sun Java System Application Server 7 does not support custom authorization providers. Custom authorization plug-in support is defined by JSR-115 (JACC) which was only introduced in J2EE 1.4. This will be supported in a future release.

> ### How is load balancing supported?

> The web connector on a web server that fronts the Application Server cannot do load balancing at all. However, a load distribution capability is enabled. The connector can interrogate the URI in the request and determine which of several Sun Java System Application Server instances is to service the request. The mapping of the URI to an application server instance is a fixed 1:1 relationship. That is, requests sent to http://www.abc.com./xyz/... will always be distributed to the single Sun Java System Application Server instance that services the xyx URI.

> You can have authentic load balancing by using a third-party product to front the web server or the actual application server instances themselves. If HttpSession is used in the application, you will want to turn on sticky load balancing based upon embedded tags or cookies. Before a session is established, the third-party load balancer could use techniques like round robin and weighted round robin load balancing to direct traffic to any of the Sun Java System Application Server instances. Thereafter, with sticky enabled, the load balancer will stick all subsequent processing to the application server instance that created the original session.

> ##

> Functional Support

> - How do you run a CMP application with a different database?
> - Can remote EJB clients use something other than RMI over IIOP, or is that the only support protocol?
> - Is sticky load balancing supported?
> - Are multiple JVMs for hosting components supported?

> ### How do you run a CMP application with a different database?

> Assume you already have a CMP ear file using dbschema in oracle. In order to run the same cmp application file with Sybase, MS SQL, or other databases, perform the following operations:

> 1. Create the necessary tables required by the CMP application in the new database.
> 2. Register a JDBC resource, connection pool, and a persistence manager for the new database.

> This procedure saves time by creating the dbschema for the new database.

> ### Can remote EJB clients use something other than RMI over IIOP, or is that the only support protocol?

> According to the J2EE spec, RMI/IIOP is the proposed way of remotely interacting directly with an enterprise bean inside an EJB container. However, you can wrap that bean as a web service and access it using SOAP/HTTP (SOAP over HTTP). You can also use a MOM approach using JMS destinations (queues and topics) as another way of interacting with the functionality of the bean.

> ### Is sticky load balancing supported?

> It is supported for SE, but no failovers occur.

> Yes for EE. Sun Java System Application Server 7, Enterprise Edition load balancer uses a sticky round robin algorithm to load balance incoming HTTP and HTTPS requests. The load balancer plug-in uses the following methods to determine session stickiness:

> - Cookie-based method—The load balancer plug-in uses a separate cookie to record the route information. The browser must support cookies.
> - Explicit URL rewriting method—Sticky information is appended to the URL. Works even if the browser does not support cookies.

> ### Are multiple JVMs for hosting components supported?

> With both PE and SE, you can create multiple application server instances for a given product installation. By default, the first server instance will be named server1. You can then use the Administration interface to create a second instance called, for example, server2. Once started, both server1 and server2 will have their own separate JVMs. However, a given instance (such as server1) has one and only one JVM. Instances do not share JVMs.

> ##

> General Administration

> This section addresses the following questions:

> - How do I logout from the Admin Console?
> - How do I give limited admin privileges to a user?

> ### How do I logout from the Admin Console?

> There is no explicit logout button in the Admin Console. To logout , close the browser you are using to access the console. Also, close other instances of the same browser that may be running on your machine. For example, if you are using Netscape 4.79 to login and access the Admin Console, you need to close all instances of Netscape 4.79 running on your machine. That action will log you out of the admin GUI.

> ### How do I give limited admin privileges to a user?

> Use the following procedure to give admin privileges to another user for a particular instance of the server.

> 1. Stop the appserver instance (server1)
> 2. Make sure that the imq broker instance is also stopped (ps -ef | grep imq).
> 3. Change Owner recursively for all the directories and subdirectories including server1 under /domains/domain1 (so that the new user is now the owner of those directories), using a command like this: chown -R s1as server1
> 4. Change the Group recursively for all the directories and subdirectories including server1 under /domains/domain1 (so that the group is now changed to the group under which the new user is a member of), using a command like this: chgrp -R appserver server1
> 5. Go to /domains/domain1/server1/config
> 6. In the init.conf file, change the user name from root to the new user.
> 7. Make sure that these changes are reflected, using asadmin reconfig
> 8. Repeat steps 4 and 5 for the iMQ instance also. This instance is found under /var/imq/instances. The user and group name should now be changed for all the directories and sub-directories including domain1_server1.
> 9. Start the appserver instance (server1) by logging in as the new user.
> 10. Deploy an application into this server instance.

> The owner of this application is now the user.

> ##

> High-Availability

> This section addresses the following questions:

> - Where are the load balancer files?
> - How do I enable the health checker?

> ### Where are the load balancer files?

> The load balancer configuration files, sun-loadbalancer_1_0.dtd and loadbalancer.xml, should be in the following locations:

> - For Sun ONE Web Server—webserver_install_dir/webserver_instance/config
> - For Apache Web Server—webserver_install_dir/webserver_instance/conf

> ### How do I enable the health checker?

> To enable the health checker for the load balancer, edit the following properties int the loadbalancer.xml file:

> - url—Specify the URL of the listener that the load balancer will check.
> - interval-in-seconds—Specify the interval at which health checking will occur. Default is 30 seconds.
> - timeout-in-seconds—Specify the timeout interval for a response to be received from a healthy listener. Default is 10 seconds.

> ##

> Server Configuration and Control

> This section addresses the following questions:

> - Is instance restart the same as stop/start?
> - How to supply password for automated startup or unattended restart?
> - How do you specify an XA DataSource in a jdbc-connection-pool?
> - How do you setup a hosts virtual server?
> - How do you disable batch insert and update?
> - How do you add a new user and password?
> - How do you set the JVM heap size?
> - How do you start a single application server instance rather than all the instances in a domain?
> - What is the ‘Apply Changes Required’ message about?
> - Why are multiple IIOP listeners useful and how many listeners are allowed?
> - Does an application server instance have to be running in order to deploy to it?
> - Does the Admin Server need to be running to run my application?
> - Can I configure the application server to run as non-root?
> - Where is the secondary storage area for stateful session beans?

> ### Is instance restart the same as stop/start?

> No. There is a significant difference between issuing the restart command, and issuing consecutive commands to stop and then start an instance.

> The restart can be used to restart an instance on the same JVM with the same security environment. So restarting an instance will not change JVM configuration parameters (like Debug=on/off) or security parameters (like security-enabled ). To make such changes effective, you must stop the instance and then start it again.

> The restart command is convenient, in that it allows an admin to restart a server without re-typing security passwords. So it is useful for changing the instance configuration. It also lets a server instance be started by a manager who knows the security passwords, while allowing it to be restarted by an admin.

> ### How to supply password for automated startup or unattended restart?

> By default, the Application Server prompts the administrator for the SSL key database password before starting up. To allow unattended restart, create a filed called password.conf in the instance/config directory, andinsert the following information:

> internal:<adminPassword>

> Unattended restart is then enabled, and the instance/bin/startserv script can then be used to to start the server.

> Note | Make sure that your system is adequately protected so that this file and the key databases are not compromised.

> ### How do you specify an XA DataSource in a jdbc-connection-pool?

> To use an XA DataSource, set res-type="javax.sql.XADataSource". For example:

> <jdbc-connection-pool name="myPool"
> ... res-type="javax.sql.XADataSource">

> If this attribute is not set, the pool will default to non-xa if the class also implements DataSource. Otherwise, an exception is thrown.

> ### How do you setup a hosts virtual server?

> The Application Server has two types of virtual servers: hosts and ip virtual server. To setup a hosts virtual server, use one of the following procedures:

> - Use the Admin Console:
> 1. Launch a browser window from the machine you want to add the hosts virtual server on.
> 2. Use that browser to access the Admin Console.
> 3. Select server1 -> HTTP Server -> Virtual Servers.
> 4. Click New and set the following values:
> - Id: vs1
> - Hosts: abc.com
> - HTTP listeners: Select the default listener (http-listener-1) or specify a new listener

> Note:
> A remote browser can’t be used to set up "abc.com" unless it is lauched from the remote machine -- because the admin console can only add a hosts virtual server into its own /etc/hosts environment.

> - On aUnix platform:
> 1. Login as root user.
> 2. Open /etc/hosts and add the following line:

> 192.18.12.165 abc.com

> - On a Windows platform:
> 1. Login as administrator.
> 2. Open c:/winnt/system32/drivers/etc/hosts and add the following:

> 192.18.12.165 abc.com

> ### How do you disable batch insert and update?

> The cmp solution uses batched inserts and updates to optimize performance. This is a standard JDBC feature. However, there might be some database drivers that do not implement or fully support this feature correctly.

> To disable batched inserts and updates, please define following in the java-config section of the server.xml file:

> <jvm-options>
> -Dcom.sun.jdo.spi.persistence.support.sqlstore.USE_BATCH=false
> </jvm-options>

> ### How do you add a new user and password?

> Use the admin console to add a new user and password to the key file for asecurity application. Access the admin console at http://localhost:<admin_port>, andperform the following operations:

> 1. Expand the server instance (for example, server1).
> 2. Expand Security.
> 3. Expand Realms.
> 4. Open File.
> 5. Click Manage Users.
> 6. Click New and enter the required information (User ID, Password, Retype Password, Group List).
> 7. Click OK.
> 8. Click the server instance again.
> 9. Apply changes and restart the instance.
> 10. Go to the ~/config/keyfile and verify that the entry was added.

> ### How do you set the JVM heap size?

> Use the jvm-options element in thejava-config section of the server.xml file as follows:

> <jvm-options> -Xms104857600 -Xmx454857600 </jvm-options>

> For a list of options, see java -help and java -X.

> ### How do you start a single application server instance rather than all the instances in a domain?

> To start individual instances in the default domain (domain1), use the asadmin start-instance command as follows:

> start-instance server3

> To start all instances in the default domain (domain 1), use the asadmin start-appserver command.

> ### What is the ‘Apply Changes Required’ message about?

> What is happening when I receive the Apply Changes Required message in the Administration interface? I made my changes and pressed the Save button. Why do I have to also Apply Changes?

> When you make your changes to a configuration setting for an instance and click Save, the update is written to a temporary file called server.xml.changes in a backup subdirectory under the /config directory. The actual server.xml file, stored in the main /config directory, represents the current configuration of the server. This file has yet to be updated. When you "Apply Changes" as prompted, the contents of the server.xml.changes file are applied to the server.xml file in the main /config directory. When the update is successful, the server.xml.changes file is deleted from the /config/backup directory.

> This is a good feature because it allows you to make a number of configuration changes without needing to apply them to the running server one at a time. It is essentially a batch update feature.

> Note | The Administration interface tries to determine what configuration changes require a server restart. If you have changed several configuration settings that require a server instance restart, Apply Changes allows you to apply them all at once, requiring only one server restart.

> ### Why are multiple IIOP listeners useful and how many listeners are allowed?

> When configuring the ORB in the Admin Console, you can have multiple IIOP Listeners. The intention is to support an administrator's desire to have an application server instance support one port for “plain” IIOP and another port for IIOP/SSL. The Administration interface lets you configure as many IIOP Listeners as you want, but only two can be enabled (Listener Enabled toggled on) at the same time. If you try to have more than two enabled at once, the Administration interface displays an error.

> ### Does an application server instance have to be running in order to deploy to it?

> No, the instance need not be running, but the Admin Server that controls the instance needs to be up and running. If the Admin Server is running, you can either use its Deploy feature in the Administration interface or the asadmin deploy command to deploy a module or an application to an instance regardless of whether or not the instance is up and running.

> ### Does the Admin Server need to be running to run my application?

> No. You can exercise an application server instance without the Admin Server process running. However, to utilize the SNMP capabilities for monitoring the HTTP server, you need to have the Sun Java System Application Server administration process up and running due to its role in interacting with the SNMP master agent.

> Tip | After you add an HTTP listener to an application server instance, you must restart the SNMP monitoring subagent. If you do not, it’s possible that information about the new listener will not be available through the SNMP monitoring subagent.

> ### Can I configure the application server to run as non-root?

> Instructions for setting up administration for a non-root user are contained in the Sun Java System Application Server Installation Guide.

> ### Where is the secondary storage area for stateful session beans?

> In an Entity bean the passivation process has to be considered as a simple notification that the instance is going to be dissociated from the object. Saving the bean state (synchronizing it with the database), on an entity bean, is something that is done through ejbStore().

> For stateful session beans, the passivation process of a bean saves the state of the bean in a secondary storage. The database is considered to be the primary storage area. The stateful container’s own storage area (memory, a cache, or the disk) is the secondary storage area.

> To find the secondary storage area on the Application Server from the Admin Console:

> - Click the instance server on the left frame, for example the default instance, server1.
> - From right frame, click Advanced.
> - An element called Session Store Location contains the file system location of the secondary storage area for stateful session bean. (You can also change the directory here, but after doing so, you need to apply changes and restart the instance server.)

> When you deploy a J2EE application on the instance server, a directory with the application name is created under "Session Store Location"/ejb/j2ee-apps. Under this application name directory, a sub directory with full qualified bean class name is created. If you deploy an ejb module, the same directory structure is created under "Session Store Location"/ejb/j2ee-modules.

> Refer to the Application Server developer guide to find out how a stateful session bean is eligible for passivation, and refer to sun-ejb-jar_2_0-0.dtd to find out how to customize bean-cache properties.

> When the stateful bean is passivated, stateful container will write out the serialized state of the bean into a file under secondary storage area. This file will be kept on disk until the next call comes in with same session id. The file will be removed if user calls ejb.remove() on this bean, or it will be removed by the stateful container when <removal-timeout-in-seconds> is reached. If you restart the instance server, all objects in the secondary storage will be cleaned up.

> ##

> Application Programming

> This section addresses the following questions:

> - How does an application implement transaction timeouts?
> - How do I use Xerces versions of JAXP in my application?
> - How do I get an instanceTransactionManager?

> ### How does an application implement transaction timeouts?

> In the current release there is no way to set a transaction time out for container managed transactions. The default is no time out. To time out transactions, use bean managed transactions. Modify server.xml to change the default transaction time out value for all beans:

> transaction-service timeout-in-seconds="0"

> ### How do I use Xerces versions of JAXP in my application?

> Version 7 of the application server relies on the Crimson version of the XML parser (JAXP 1.1) that is built into the JVM. The Xerces versions are included in the installation at <install_dir>/lib/endorsed, but they can’t be used as an endorsed standard.

> Typically, a JAXPapplication sets the endorsed.dirs system property to override the libraries found on the boot class path. But that technique does not work for a Version 7 server application, because doing so would break the container.

> Tthe Xerces versions of the JAXP libraries are included in the server’s classpath, however. To access them, the application must configure the JAXP factory using the following property names and associated values:

> property: “javax.xml.parsers.DocumentBuilderFactory”, value: "org.apache.xerces.jaxp.JAXPDocumentBuilderFactoryImpl"

> property: “javax.xml.parsers.SAXParserFactory”,
> value: "org.apache.xerces.jaxp.SAXParserFactoryImpl"

> ### How do I get an instanceTransactionManager?

> The TransactionManager is a privileged interface. Applications should only use UserTransaction, and not TransactionManager.

> ##

> Application Debugging

> This section addresses the following questions:

> - Can I modify roles in the web or EJB deployment descriptors without restarting the application server?

> ### Can I modify roles in the web or EJB deployment descriptors without restarting the application server?

> Changes to application deployment descriptors require a redeploy (not necessarily a restart, if you are using dynamic redeployment).

> However, changing application roles dynamically is not really the best approach. The application roles in J2EE are intended as design-time groupings. Instead, look into dynamically changing the mapping of particular users to these roles. You can do this by mapping the J2EE application role to a group (or groups) and altering the membership of these groups as needed.

> ##

> Upgrade/Migration

> This section addresses the following questions:

> - Can I upgrade from other versions of Sun Java System Application Server 7 to Enterprise Edition?
> - Can I migrate from other application servers?

> ### Can I upgrade from other versions of Sun Java System Application Server 7 to Enterprise Edition?

> Yes. You can use the automatic upgrade tool to do so.

> Note:
> Only one version of Sun Java System Application Server can be on a single machine, so if you have an existing version 7 installation, you must first uninstall your existing version using the uninstallation program, then install Enterprise Edition.

> ### Can I migrate from other application servers?

> Yes. You can use the automatic migration tool to do so.

> Previous Contents Index Next

> Copyright 2005Sun Microsystems, Inc. All rights reserved.