Sun GlassFish Communications Server 1.5 Release Notes

Chapter 4 Sun GlassFish Enterprise Server Known Issues and Limitations

This chapter describes known problems and associated workarounds for the Sun GlassFish Enterprise Server 1.5 software. These problems specifically also affect Communications Server, which is built on top of Sun GlassFish Enterprise Server 2.1. If a summary statement does not specify a particular platform, the problem applies to all platforms. This information is organized into the following sections:

Administration

This section describes known administration issues and associated solutions.

Failed to Deploy Generic RA Resource Adapter against IBM MQ (Issue 6605)

Description

Deployment of a generic RA adapter against IBM Message Queue product fails. The permissions granted in the server.policy file is as follows.


grant {
      permission java.util.logging.LoggingPermission "control";
      permission java.util.PropertyPermission "*", "read,write";
      }

Solution

Change the permissions in the server.policy file as follows:


grant codeBase
"file:${com.sun.aas.installRoot}/lib/install/applications/adminapp/-" {
  permission java.util.logging.LoggingPermission "control";
 };

Stand-alone instances sometimes obtain files from other instances (6698604)

Description

In some circumstances, files installed on the DAS intending to be synchronized with a specific instance actually get sent to additional instances.

Solution

No known solution.

Startup Message from the start-cluster command are too verbose (6728317)

Description

The asadmin start-cluster command shows too many messages even when non-critical components fail during startup. See the following example command output when non-critical elements (related to the instances in the cluster) fail:


./asadmin start-cluster --port 9898 cluster1
Please enter the admin user name>admin
Please enter the admin password>
The clustered instance, instance2, was successfully started.
error 0 [#|2008-07-17T14:58:16.496+0200|WARNING|sun-appserver9.1|javax.jms|
_ThreadID=10;_ThreadName=main;
_RequestID=90bbbe3a-d654-4480-b295-7e317d945a4a;|[C4003]: 
Error occurred on connection creation [localhost:37676]. - cause: 
java.net.ConnectException: Connection refused|#]


error 1 [#|2008-07-17T14:58:17.517+0200|WARNING|sun-appserver9.1|javax.jms|
_ThreadID=10;_ThreadName=main;
_RequestID=90bbbe3a-d654-4480-b295-7e317d945a4a;|[C4003]: 
Error occurred on connection creation [localhost:37676]. - cause: 
java.net.ConnectException: Connection refused|#]


error 2 [#|2008-07-17T14:58:30.596+0200|WARNING|sun-appserver9.1|
javax.enterprise.system.container.ejb|
_ThreadID=13;_ThreadName=pool-1-thread-4;TimerBean;
_RequestID=5954a044-df06-4a3e-902a-0c40b4b6cddb;
|EJB5108:Unable to initialize EJB Timer Service. 
The likely cause is the database has not been 
started or the timer database table has not been created.|#]


error 3 [#|2008-07-17T14:58:32.512+0200|WARNING|sun-appserver9.1|
javax.enterprise.resource.resourceadapter|_ThreadID=10;_ThreadName=main;
__CallFlowPool;_RequestID=90bbbe3a-d654-4480-b295-7e317d945a4a;|
RAR5005:Error in accessing XA resource with JNDI name [__CallFlowPool] for recovery|#]


The clustered instance, instance1, was successfully started.
error 0 [#|2008-07-17T14:58:21.117+0200|WARNING|sun-appserver9.1|
javax.enterprise.system.container.ejb|
_ThreadID=13;_ThreadName=pool-1-thread-4;TimerBean;
_RequestID=30827d9a-72ac-4854-b216-06494b6a9fb5;
|EJB5108:Unable to initialize EJB Timer Service. The likely cause is the database has 
not been started or the timer database table has not been created.|#]


error 1 [#|2008-07-17T14:58:23.106+0200|WARNING|sun-appserver9.1|
javax.enterprise.resource.resourceadapter|
_ThreadID=10;_ThreadName=main;__CallFlowPool;
_RequestID=b41d76fa-0203-49f7-a2ae-83bf242d3e7a;
|RAR5005:Error in accessing XA resource with JNDI name [__CallFlowPool] for recovery|#]


Command start-cluster executed successfully.

Solution

No known solution. These (exceptions) messages can be ignored.

The package-appclient script does not work if domain1 is not present (6171458)

Description

By default, there is a hard-coded value in as-install/lib/package-appclient.xml for the AS_ACC_CONFIG variable for domain1 that is pointed to by asenv.conf. If domain1 is deleted and a new domain created, the AS_ACC_CONFIG variable is not updated with the new domain name, which causes the package-appclient script to fail.

Solution

Do one of the following:

  1. Leave domain1 intact, and create your other domains around it.

  2. Remove domain1 and replace the hard-coded value for domain1 in as-install/lib/package-appclient.xml with the new domain name.

This will have to be done every time a new domain is created if domain1 is not present.

Starting Application Server with additional JMX Agent is not supported (6200011)

Description

J2SE 1.4.x, 5.0, or later can be configured on the Application Server. An integral feature of J2SE 5.0 platform is the ability to start a JMX agent. This is activated when you explicitly set system properties at the server startup.

Example values include:


name="com.sun.management.jmxremote" value="true"
name="com.sun.management.jmxremote.port" value="9999"
name="com.sun.management.jmxremote.authenticate" value="false"
name="com.sun.management.jmxremote.ssl" value="false"

After configuring JMX properties and starting the server, a new jmx-connector server is started within the Application Server Virtual Machine. An undesirable side-effect of this is that the administration functions are affected adversely, and the Application Server administration Console and command—line interface may produce unexpected results. The problem is that there are some conflicts between the built in jmx-connector server and the new jmx-connector server.

Solution

If using jconsole (or any other JMX-compliant client), consider reusing the standard JMX Connector Server that is started with Application Server startup.

When the server starts up, a line similar to the one shown below appears in the server.log. You can connect to the JMXService URL specified there and perform the same management/configuration operations after successfully providing the credentials; for example:


[#|2004-11-24T17:49:08.203-0800|INFO|sun-appserver-ee8.1|
javax.enterprise.system.tools.admin|_ThreadID=10;|ADM1501: 
Here is the JMXServiceURL for the JMXConnectorServer: 
[service:jmx:rmi:///jndi/rmi://hostname:8686/management/
rmi-jmx-connector]. This is where the remote administrative 
clients should connect using the JSR 160 JMX Connectors.|#]

For more information, refer to the Sun GlassFish Communications Server 1.5 Administration Guide.

.asadmintruststore file not described in the documentation (6315957)

Description

The .asadmintruststore file is not described in the documentation. If this file does not exist in the server administrator's home directory, you may experience serious bugs when upgrading certain applications hosted on the server.

Solution

Clustered instances fail to start due to a timeout in reaching the JMS broker (6523663)

Description

The default MQ integration mode for a Communications Server cluster instance is LOCAL. When Communications Server is installed in a location (PATH) that is long (read “not short”), imqbrokerscv.exe crashes when the cluster instance starts. The problem is a memory allocation problem in imqbrokersvc.

Solution

The JMS service type for the cluster instance must be changed from the default LOCAL to REMOTE. In this configuration, all the instances point back to the DAS broker. Follow the instructions below to configure a cluster in REMOTE mode.


Note –

When using REMOTE mode, all instances are using one broker (DAS) , and therefore no broker cluster is created when the Communications Server cluster starts up. See “Auto-clustering” in Section 4.1, Division iii of the one-pager at http://www.glassfishwiki.org/gfwiki/attach/OnePagersOrFunctionalSpecs/as-mq-integration-gfv2.txt for more information. The above functionality will not be available!


ProcedureUsing the command-line

Before You Begin

Modify the port and password file according to your environment. Note that in the instructions below, the cluster name is racluster, the DAS admin port is 5858, and the DAS JMS port is 7676.

  1. Modify the cluster configuration, changing the JMS type to REMOTE.


    as-install/bin/asadmin.bat set --port 5858 --user admin --passwordfile \
    as-install/bin/password_file racluster.jms-service.type=REMOTE
  2. Create a JMS host corresponding to the DAS JMS host.


    as-install/bin/asadmin.bat create-jms-host --port 5858 --user admin --passwordfile \
    as-install/bin/password_file --target racluster --mqhost localhost --mqport 7676 \
    --mquser admin --mqpassword admin dashost
  3. Set the default JMS host to be the DAS JMS host created in the previous step.


    as-install/bin/asadmin.bat set --port 5858 --user admin --passwordfile \
    as-install/bin/password_file racluster.jms-service.default-jms-host=dashost

ProcedureUsing the Admin GUI

  1. Go to Configurations->cluster-name-config->Java Message Service->JMS Hosts.

  2. Click New to create a new JMS host; name it dashost.

  3. Enter configuration settings corresponding to the JMS service for the DAS; defaults are as follows:

    • Hostname: localhost

    • Port: 7676

    • Admin user: admin

    • Password: admin

    Modify these settings as appropriate for your DAS JMS service.

  4. Navigate back to the Java Message Service tab, and change the JMS service type to REMOTE (default is LOCAL).

  5. Choose dashost from the default-jms-host drop-down list.

  6. Save the changes, and then start your node-agent or cluster.

Cannot display jmaki chart in Netscape 8.1.3, Mozilla 1.7 and Safari 2.0.4 browsers (6543014)

Description

When trying to display a chart from the Log Statistics Monitoring page using some unsupported browsers, the following error may be thrown:


Error loading jmaki.widgets.jmaki.charting.line.Widget : id=form1:jmaki_chart11
Script: http://easqelx5.red.iplanet.com:4848/resources/jmaki/charting/ \
line/component.js (line:5437).
Message: area.initialize is not a function

Solution

Use a supported browser. Refer to Browsers for a list of browsers supported by Communications Server.

The create-domain command fails with custom master password in AIX (6628170)

Description

On the AIX operating system, an attempt to create a domain with a custom master password fails with the following error:


keytool error (likely untranslated): java.lang.NullPointerException
 Enter keystore password:  New keystore password:

Application Client

This section describes known application client issues and associated solutions.

Library JAR packaged in Application Client Archive overwrites MANIFEST file (6193556)

Description

If you have a top level JAR file inside your client JAR (in this case, reporter.jar), when you deploy the client JAR, the MANIFEST file for that JAR overwrites the MANIFEST file for the client JAR.

Solution

None at this time.

ACC always tries to connect to localhost:3700 (6527987)

Description

The application client always tries to connect to localhost:3700. The problem is that several system properties need to be read before the client code is invoked.

Solution

Set the following as system properties (-D in your JAVA_CMD). Do not set them in your appclient code:


org.omg.CORBA.ORBInitialHost = server-instance-host
org.omg.CORBA.ORBInitialPort = server-instance-port

ASQuickStartup breaks SocketChannel.keyFor(), returning null instead of the SelectionKey (Issue Tracker 3027)

Description

When a SocketChannel is registered on several Selectors, doing socketChannel.keyFor(lastRegisteredSelector) returns null instead of the SelectionKey.

Solution

This is related to a JDK bug, 6562829, and is expected to be fixed in 6.0 U3. A workaround has been included in Communications Server, such that the selector is unwrapped before the keyFor API is called. This enables the keyFor to succeed until JDK bug is fixed.

Bundled Sun JDBC Drivers

This section describes known bundled Sun JDBC driver issues and associated solutions.

PreparedStatement errors (6170432)

Description 1

If an application generates more than 3000 PreparedStatement objects in one transaction, the following error may occur with DB2:

[sunm][DB2 JDBC Driver] No more available statements.Please recreate your package with a larger dynamicSections value.

Solution 1

Add following properties to the connection pool definition to get the driver to rebind DB2 packages with a larger dynamic sections value:

createDefaultPackage=true replacePackage=true dynamicSections=1000

See the Sun GlassFish Communications Server 1.5 Administration Guidefor details about configuring connection pools.

Description 2

Related to the PrepardStatement error above, another error message that may be thrown is:

[sunm][DB2 JDBC Driver][DB2]Virtual storage or database resource is not available.

Solution 2

Increase the DB2 server configuration parameter APPLHEAPSZ. A good value is 4096.

Description 3

Isolation level TRANSACTION_SERIALIZABLE. If your application uses isolation level TRANSACTION_SERIALIZABLE and uses one of the parameters suggested above, it might hang while obtaining a connection.

Solution 3

To set desired isolation level for a connection, the corresponding connection pool has to be created at that isolation level. See the Sun GlassFish Communications Server 1.5 Administration Guide for instructions.

Java DB is not started after machine reboot or Application Server start (6515124)

Description

The bundled Java DB database is not automatically restarted after a host system or Solaris zone reboot, or an Communications Server start. This is not a bug, but expected behavior for any bundled or third-party application. The problem is that the Java DB must be started before the Communications Server instance.

Solution

After rebooting the host machine or Solaris zone, be sure to start the Java DB before starting Communications Server; for example:


/opt/SUNWappserver/appserver/bin/asadmin start-database

Refer to Administration Tools in Sun GlassFish Communications Server 1.5 Quick Start Guide in the Sun GlassFish Communications Server 1.5 Quick Start Guide for more information about asadmin command options.

Deployment

Autodeployment fails on a cluster sometimes (6610527)

Description

Timing issues sometimes cause autodeployment to fail in domains that are configured to support clusters. The issue is not observed in domains that do not support clusters.

Solution

Use one of the following solutions:

Application specific classloader not used by JSP compilation (6693246)

Description

The application-specific classloader (applibs or --libraries) is not used by the JSP compilation. As a result, JSPs referencing these JARs will not compile.

Solution

No known solution.

Documentation

This section describes known documentation issues and associated solutions.

Javadoc Inconsistencies (various IDs)

The Javadoc for several AMX interfaces and methods is either missing or incorrect:

Bundled ANT throws java.lang.NoClassDefFoundError (6265624)

Description

The following exception is thrown in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher.

Solution

Use the bundled ANT for things outside the Communications Server is not recommended.

EJB

Resouce Injection does not work in HandlerChain (6750245)

Description

Resouce Injection does not work in HandlerChain due to EJB initialization order.

Solution

No known solution.

Installation

This section describes known installation issues and associated solutions.

Installation shutdown hanging on some Linux systems after clicking the "Finish" button (5009728)

Description

This problem has been observed on several Linux systems. It is most common on Java Desktop System 2 but has also been observed on Linux Red Hat distributions.

After clicking the "Finish" button on the last installer screen, the installer fails to launch a browser window containing the product About page or product registration page, and hangs indefinitely, not returning the command prompt.

Solution

Exit the installer by pressing Ctrl+C in the terminal window in which the installer was started. After doing this, browser window containing product About page or registration page will sometimes be launched, but if it does not show up, start the browser and enter following URL in order to review About page:


file://as-install/docs/about.html

If you also selected the installation option to register the product, follow the link to registration page available on product About page.

The start-domain Command Times Out on OpenSolaris 2008.11 (6820169 and 6741572)

Description

On OpenSolaris 2008.11, when you attempt to start the domain with the asadmin start-domain command, the following error message is displayed:


Timeout waiting for domain domain1 to go to starting state.
CLI156 Could not start the domain domain1.

Solution

The domain has started successfully. Correct the time and date after rebooting the machine.

On Windows, the imq directory needs to be created during installation (6199697)

Description

On Windows, immediately after installing Application Server Enterprise Edition, the Message Queue broker fails on startup with a message saying the directory drive:\as\domains\domain1\imq does not exist.

Note that if the broker is started after starting domain1, the directory will be created by the Application Server and the problem will not occur.

Solution

  1. Create the var_home_dir_location before creating the broker:


    $imqbrokerd -varhome var_home_dir_location
    

    For example:


    $imqbrokerd -varhome D:\as\domains\domain1\imq

Uninstall does not update productregistry file properly; unable to use silent mode to install (6571598)

Description

If the Communications Server productregistry file contains shared component configurations, an Communications Server uninstallation procedure does not update the productregistry file correctly, and you will not be able to use silent mode in a subsequent installation unless the productregistry file is renamed or removed. Leaving the shared components entries in the productregistry file intact is by design, but it leads to confusion with subsequent silent installs.

Solution

After a successful uninstallation is reported back through uninstall log files, delete the productregistry file prior to running a subsequent installation. To verify that a previous uninstallation has completed successfully, look for a appserv_uninstall.class file in as-install. This file will not be present if the uninstallation was successful.


Note –

Do not delete the productregistry if the uninstallation was not successful.


The productregistry file is located in /var/sadm/install on Solaris and /var/tmp on Linux.

Java EE Tutorial

When using the Administration Console to create any resource, use the Targets tab to specify the server as the target. If you use the command line or an asant target, the server is the default target, no further action is required.

Java Persistence

TopLink expects my Collection field/property to be cloneable (Issue Tracker 556)

Description

If the java.util.Arrays.asList() API is used to convert an Object[] to Collection, the JDK returns an implementation of java.util.ArrayList that is not cloneable. This results in the following exception:


The method invocation of the method [protected native java.lang.Object 
java.lang.Object.clone() throws java.lang.CloneNotSupportedException] on the object 
[[pkg.A id = xxx]], of class [class java.util.Arrays$ArrayList], triggered an 
exception. Internal Exception: java.lang.reflect.InvocationTargetException Target 
Invocation Exception: java.lang.CloneNotSupportedException: 
java.util.Arrays$ArrayList

This issue is tracked at https://glassfish.dev.java.net/issues/show_bug.cgi?id=556.

Solution

Create another collection using its constructor; for example:


myCollection = new ArrayList(java.util.Arrays.asList(a))

GenerationType.IDENTITY and DataDirect Driver with SyBase (Issue Tracker 2431)

Description

An attempt to insert an entity that uses GenerationType.IDENTITY fails when the DataDirect driver is used with SyBase. The attempt fails because the DataDirect driver creates a stored procedure for every parameterized prepared statement.

Solution

In the domain.xml file, set the property PrepareMethod=direct on the corresponding data source.

Lifecycle Management

This section describes known lifecycle management issues and associated solutions.

Setting ejb-timer-service property causes set command to fail (6193449)

Description

After setting the ejb-timer-service property minimum-delivery-interval to 9000, an attempt to set the ejb-timer-service property redelivery-interval-in-mills to 7000 causes the set command to fail with the following error:


[echo] Doing admin task set
[exec] [Attribute(id=redelivery-interval-internal-in-millis) : 
Redelivery-Interval (7,000) 
should be greater than or equal to Minimum-delivery-interval-
in-millis (9,000)]
[exec] CLI137 Command set failed.

The problem is that the logic that relates the redelivery interval property to the minimum delivery property is incorrect and prevents you from using the GUI or the CLI to set any value where the minimum delivery interval is greater than redelivery interval.

The minimum-delivery-interval-in-millis must always be set equal to or higher than ejb-timer-service property redelivery-interval-in-millis. The problem is that there is an erroneous validation check in the Application Server to verify that the value for redelivery-interval-in-millis is greater than the value for minimum-delivery-interval-in-millis.

Solution

Use the default values for these properties, as follows:


minimum-delivery-interval(default)=7000
redelivery-interval-in-millis(default)=5000

Values other than these defaults will generate an error.

Error thrown when list JMS physical destinations within non-DAS config (6532532)

Description

If you are trying to view the JMS Physical Destinations using the default-config, you will see an error message.

Solution

This is expected behavior. In Communications Server 1.5, default-config is a template of configuration information and hence JMS operations (such as list and create) cannot be executed for the default-config. These JMS operations can, however, be executed for the configurations of your cluster or standalone instances.

Win2003 only: Non-paged pool leak memory, breaking tcp stack and richaccess test (6575349)

Description

(Windows 2003 only) There are memory leaks on Windows 2003 systems when performing rich access functions. The problem occurs because the Win32 nonpaged pool keeps growing, eventually bringing down the entire TCP/IP stack. Once the failure happens, the TCP/IP stack is left in an recoverable state, and the only way restore it is by rebooting the Windows 2003 system.

Workaround

There are two workarounds to this issue:

Logging

This section describes known logging issues and solutions.

Setting debug statement for access,failure causes hang in Application Server startup (6180095)

Description

Setting the java.security.debug option for the JVM will cause the server instance startup to freeze with a deadlock; for example, setting the following in domain.xml causes the problem:


<jvm-options>-Djava.security.debug=access,failure</jvm-options>

Solution

None at this time. Please avoid setting this flag.

Message Queue

This section describes known Java message queue issues and associated solutions.

JMS reconnection does not successfully complete in certain cases that are timing dependent (6173308, 6189645, 6198481, 6199510, 6208728)

Description

Failures to reconnect in timing-dependent scenarios can be caused by several problems.

Solution

You can work around these problems by:

Server Does Not Start If MQ Broker is Not Started (6740797)

Description

If you configure JMS to be REMOTE, Enterprise Server fails to start if the MQ broker is not started.

Solution

Set the following JVM option as follows: com.sun.enterprise.jms.CONNECT_MQ_LAZILY=true. After setting this JVM option, you can start Communications Server if the MQ broker is not started. However, it is recommended that you start MQ before starting the server.

MQ broker fails to start with cluster profile on Linux (6524871)

Description

After creating a domain with a cluster profile on a Linux system, you may encounter a java.lang.OutOfMemoryError: Java heap space error, and the server instance may fail to restart because the MQ broker does not start. The system never recovers after this condition. The problem is a misconfigured /etc/hosts file; specifically, the server host name is pointing to the loopback address 127.0.0.1.

Solution

By design, an MQ broker cluster cannot start with the network device configured to point to the loopback address. This is not a bug. The solution is to make sure that the /etc/hosts file for the Communications Server host does not point to 127.0.0.1.

Mismatch of old and new classes is created when imqjmsra.jar is loaded before upgrade (6740794)

Description

During Application Server startup, the server checks the Message Queue version. If the Message Queue version is incorrect, then the server upgrades using the imqjmsra.jar. This upgrade JAR and its classes will not be available to the server until the next restart of Application Server. This situation only occurs if Message Queue is upgraded alone, or if Application Server is patched alone. A side effect of this situation is that sometimes Application Server does not start.

Solution

Both Message Queue and Application Server need to be maintained at the same patch level, or restart the Application Server.

Monitoring

This section describes known monitoring issues and associated solutions.

Some of the HTTP Service monitoring statistics do not present useful information and should be ignored (6174518)

Description

When viewing the monitoring statistics of some elements of the HTTP Service, some values presented do not correspond to current values or are always 0. Specifically, the following HTTP Service statistics do not present information applicable to the Application Server, and should be ignored:

Solution

These monitors will be removed in future releases and replaced with more appropriate information.

Open JNDI Browsing from Admin UI dumps a huge amount of exceptions in the server.log (6591734)

Description

Many exceptions are thrown when the JNDI browser is opened from the Admin GUI.

Solution

None at this time.

Security

This section describes known issues and associated solutions related to Communications Server and web application security and certificates.

OutofMemory Error in SSL Scenarios During Heavy Stress (JDK 6 Issue 23)

Description

A JDK bug (See: https://jdk6.dev.java.net/issues/show_bug.cgi?id=23) in JDK6 Sun PKCS11 Provider could cause an OutOfMemoryError when running certain SSL scenarios under heavy stress.

Solution

If you run into this issue, remove sun.security.pkcs11.SunPKCS11 provider from the java.security file in your JRE installation.

SSL termination is not working (6269102)

Description

SSL termination is not working; when Load Balancer (Hardware) is configured for SSL termination, the Communications Server changes the protocol from https to http during redirection.

Solution

Add a software load balancer between the hardware load balancer and the Communications Server.

Socket connection leak with SSL (6492477)

Description

Because of a JVM bug, there is a leak issue with some JDK versions when security-enabled is set to true on an HTTP listener. Specifically, the steps to reproduce this bug are as follows:

  1. Set security-enabled to true on the HTTP listener:


    <http-listener acceptor-threads="1" address="0.0.0.0" 
    blocking-enabled="false" default-virtual-server="server" enabled="true" 
    family="inet" id=" http-listener-1" port="8080" security-enabled="true" 
    server-name="" xpowered-by="true">
  2. Comment out stopping domain at the end of quicklook tests.

  3. Run quicklook tests.

  4. Check socket usage:


    netstat -an | grep 8080

    The following are shown to be in use:


    *.8080               *.*                0      0 49152      0 LISTEN
    *.8080               *.*                0      0 49152      0 BOUND

This issue is tracked on the GlassFish site at https://glassfish.dev.java.net/issues/show_bug.cgi?id=849.

Solution

Upgrade to the latest JDK version.

Web Container

This section describes known web container issues and associated solutions.

On Windows, deploying an application using --precompilejsp=true can lock JAR files in the application, causing later undeployment or redeployment to fail (5004315)

Description

If you request precompilation of JSPs when you deploy an application on Windows, later attempts to undeploy that application or to redeploy it (or any application with the same module ID) will not work as expected. The problem is that JSP precompilation opens JAR files in your application but does not close them, and Windows prevents the undeployment from deleting those files or the redeployment from overwriting them.

Note that undeployment succeeds to a point, in that the application is logically removed from the Application Server. Also note that no error message is returned by the asadmin utility, but the application's directory and the locked jar files remain on the server. The server's log file will contain messages describing the failure to delete the files and the application's directory.

Attempts to redeploy the application after undeploying fail because the server tries to remove the existing files and directory, and these attempts also fail. This can happen if you try to deploy any application that uses the same module ID as the originally deployed application, because the server uses the module ID in choosing a directory name to hold the application's files.

Attempts to redeploy the application without undeploying it first will fail for the same reasons.

Diagnostics

If you attempt to redeploy the application or deploy it after undeploying it, the asadmin utility returns an error similar to the one below.


An exception occurred while running the command. The exception 
message is: CLI171 Command deploy failed : Deploying application in 
domain failed; Cannot deploy. Module directory is locked and can't 
be deleted.

Solution

If you specify --precompilejsps=false (the default setting) when you deploy an application, then this problem will not occur. Be aware that the first use of the application will trigger the JSP compilation, so the response time to the first request will be longer than for later requests.

Note also that if you do precompile, you should stop and restart the server before undeploying or redeploying the application. The shutdown frees the locked JAR files so the undeployment or redeployment after the restart can succeed.

Unable to deploy WAR with Servlet 2.4-based web.xml that contains an empty <load-on-startup> element (6172006)

Description

The optional load-on-startup servlet element in a web.xml indicates that the associated servlet is to be loaded and initialized as part of the startup of the web application that declares it.

The optional content of this element is an integer indicating the order in which the servlet is to be loaded and initialized with respect to the web application's other servlets. An empty <load-on-startup> indicates that the order is irrelevant, as long as the servlet is loaded and initialized during the startup of its containing web application.

The Servlet 2.4 schema for web.xml no longer supports an empty <load-on-startup>, meaning that an integer must be specified when using a Servlet 2.4 based web.xml. If specifying an empty <load-on-startup>, as in <load-on-startup/>, the web.xml will fail validation against the Servlet 2.4 schema for web.xml, causing deployment of the web application to fail.

Backwards compatibility issue. Specifying an empty <load-on-startup> still works with Servlet 2.3 based web.xml.

Solution

Specify <load-on-startup>0</load-on-startup> when using a Servlet 2.4 based web.xml to indicate that servlet load order does not matter.

Unable to compile JSP page on resource constrained servers (6184122)

Description

The JSP page is accessed but fails to compile, and the server log contains the error message "Unable to execute command" with the following stack trace:


at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.
exec(Execute.java:655) at org.apache.tools.ant.taskdefs.Execute.
launch(Execute.java:416) 
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427) 
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.
executeExternalCompile(DefaultCompilerAdapter.java:448) 
at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute
(JavacExternal.java:81) 
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842) 
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682) 
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:396)

Solution

Set the JSP compilation switch "fork" to "false."

This can be done either of two ways:

Either setting will prevent ant from spawning a new process for javac compilation.

Web Services

This section describes known web container issues and associated solutions.

Ant task wsimport fails with Java EE SDK b33d (using JDK 1.6) with NoClassDefFoundError (6527842)

Description

You may encounter a problem when running the JAX—WS tests with the JDK 1.6 included with the Java EE SDK b33d. The tests immediately abort with the following message:


[wsimport] Exception in thread "main" java.lang.NoClassDefFoundError: \
com/sun/tools/ws/WsImport

This error occurs even though the webservices-tools.jar does contain com/sun/tools/ws/WsImport.class, com/sun/tools/ws/ant/WsImport.class, and com/sun/tools/ws/ant/WsImport2.class. Moreover, the same test workspace works without problem using the 1.5.0-10 JDK.

Solution

Copy the webservices-api.jar to $JAVA_HOME/jre/lib/endorsed before running the JAX-WS tests.

publish-to-registry commands fail in IFR EE builds (6602046)

Description

JAXR uses SAAJ to send soap messages to the registry. In the non-IFR case, the SAAJ impl classes are under lib/webservices-rt.jar. In the IFR case, the SAAJ classes are still under lib/webservices-rt.jar. In addition, saaj-impl.jar is located in the /usr/share/lib directory. This jar file is picked up by Communications Server and has precedence over classes from webservices-rt.jar. This jar file does not have the necessary security permissions to send soap messages to the Web services registry. The packaging should be modified to grant permissions to the jars under /usr/share/lib directory or not depend on the /usr/share/lib jars.

Solution

Add the following to the server.policy file:


grant codeBase "file:/usr/share/lib/saaj-impl.jar" {
   permission java.security.AllPermission;
};

wscompile fails with "package javax.xml.rpc does not exist" on JDK6 u4 b3 (6638567)

Description

The wscompile ant task fails for JDK 6 Update 4. For each JAX-RPC API class, the following error message is displayed:


package package-name does not exist

Solution

Before running the wscompile ant task, ensure that javaee.jar is specified in the class path, not j2ee.jar.