5. Bug Fixes

CDI/Weld

1034776 Incorrect handling of business interfaces for EJBs (where defining class of business method is not the Business interface of the EJBs)
Session bean observer method validation did not correctly validate methods declared on a local interface which had a super interface.
As a result, deployments may have failed with `WELD-000088, Observer method must be static or local business method`. This occurred when a Session Bean class with an observer method inherits from an interface that does not have the method signature defined by its super interface, and at the same time the Session Bean class extends the class that has the method implementation.
Weld's internal session bean implementation has been fixed to include inherited methods in the `checkObserverMethods` method. As a result, deployments with the above implementation will now deploy successfully.
1051205 NPE when replicating CDI bean on EAP 6 cluster

There was an error in the method of creating Bean Deployment Archives (BDA) IDs, causing the container to not recognize a BDA as being the same across cluster nodes, which prevented session replication. This error has now been resolved and BDA IDs are now successfully recognised as being the same across cluster nodes.
1052277 Permanent fix for: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous
Bean name ambiguity validation was not isolated in deployments with multiple sub-deployments, and this caused `DeploymentException` in some scenarios. This has been resolved with an upgrade of the Weld component in this release of Red Hat JBoss EAP 6.

Class Loading

1051335 Module "org.jboss.log4j.logmanager" Needs Dependency On "javax.mail.api" Module

It was determined that, while it was not explicitly stated in it's module.xml file, the log4j.logmanager module had an implicit dependency on the javax.mail.api module. This would cause ClassNotFoundExceptions to be thrown if an application that used an appender which required java mail was deployed. An optional dependency is now specified in the module. The exceptions no longer present.

Domain Management

1051189 Admin Console logout procedure fails with LDAP connections

An issue that presented in earlier versions of JBoss EAP 6 that caused Admin Console logout procedures to fail with LDAP connections has been resolved in this release.

The issue arose because the logout logic expected DIGEST authentication which is not used in LDAP.

In this release, the product detects if BASIC authentication is being used and, if so, uses BASIC authentication challenges to encourage the web browser to forget the cached credentials.

Users can now log out of an LDAP connection to the Admin Console as expected.
1050068 Using directory grouping by-type results in the wrong logging.properties file being used

When defining servers with directory-grouping="by-type" the domain/configuration/logging.properties file was always used, which was the incorrect configuration. This error resulted in the wrong logging settings being used. The cause was faulty logic by which the properties file was selected was incorrect. To resolve this problem, the logic by which the properties file was selected has been improved and the correct logging.properties file is now used when directory-grouping="by-type" is used.
1052365 No way to configure FACILITY for audit log over syslog

In previous releases of JBoss EAP 6, there was no way to configure the FACILITY for audit log over syslog. In this release, a configuration option for this has been enabled and can be utilized as follows:

--- -Dorg.jboss.TEMP.audit.log.facility=N ---

Where N is the FACILITY, as mentioned in section 6.2.1 of RFC-5424.
1047536 management audit settings: syslog protocol is lowercase while uppercase is expected

A bug in the management audit settings caused server instances to fail when a syslog handler was added to the domain controller.

It was found that org.jboss.as.domain.management.audit defined the UDP protocol using lowercase letters ( udp) while the enum used uppercase ( UPD).

The issue has been resolved by defining the protocol in org.jboss.as.domain.management.audit with uppercase letters.
1051240 LDAP Group Loading - Should Not Fail for Non-existent User

An issue was encountered in previous releases of JBoss EAP 6 that caused domain mode server instances would fail to start.

In domain mode, where a security realm was configured to load groups from LDAP, the server instances would try to load the group information for a server user and fail.

This issue was resolved by modifying the code so that group information is not loaded if the remote user was an authenticated server.

Server instances no longer fail if when encountering a user not found in the LDAP directory.
1044394 - Incorrect handling of system properties

This release of JBoss EAP addresses multiple issues surrounding the incorrect handling of system properties. Further details can be reviewed at the linked Bugzilla ticket.
1007696 CLI fails to show app status when runtime-name is different from the deployment name

When the runtime name of an application was different to the name of the EAR, the management CLI would fail to show the status of the application, returning instead the message "No metrics available.". The cause of this issue was that the management CLI queried the application by the name of the EAR and since this was different to the name of the EAR, a match could not be found. To resolve this issue, the search is now conducted by the application's runtime. As a result, CLI operations are now successful even if the runtime name does not match the name of the EAR.
1039699 Cannot use deployments with same runtime-name in a domain

The code used to parse a domain.xml file was incorrectly validating that all runtime-name configuration values were unique across all deployments in the domain. This was incorrect, as these values only need to be unique within a set of deployments mapped to a server group.

Using two deployments with the same runtime-name in the domain (for example, two different versions of the same deployment) would result in a fatal boot error if the domain controller was restarted, with output like this in the host controller log:
JBAS010932: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
…
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1348,9]
…
Message: JBAS014664: An element of this type named foo has already been declared

The scope of XML parser validation of runtime-name uniqueness has been limited to an individual server group. Post-parsing validation of the management configuration model has also been improved to exclude deployments marked as not enabled. Restarting a domain controller whose config includes two deployments with the same runtime-name now works.
1039875 Add missing constructors in AbstractBoottimeAddStepHandler

New constructors were added upstream to the super class for org.jboss.as.controller.AbstractBoottimeAddStepHandler, however they were not added to the handler itself, meaning the class had differing constructs. These constructs have now been added as required.
1041330 NPE in DelegatingServerInventory

Management requests sent to a Host Controller immediately after the Host Controller launches may fail with an exception of type NullPointerException. This is because there is a period of time between when the Host Controller becomes able to receive requests and when the server management system is fully started. This period of time is usually less than one second, but any requests received in that time will fail.
1053382 No way to configure appName for audit log over syslog

In previous versions of JBoss EAP 6, an appName was not configurable via a system property. This ability was a requirement within specification RFC-5424. This ability has now been added to JBoss EAP 6.2.1 and can be used with the following command syntax:

-Dorg.jboss.TEMP.audit.log.appName=APP_NAME
1040480 Running with SecurityManager enabled leads to issues

This release of JBoss EAP 6 addresses several problems caused by use of the Java Security Manager. Further details can be reviewed at the linked Bugzilla ticket.

HornetQ

HORNETQ-1280 Address settings <expiry-delay/> is used absolutely
The value specified for <expiry-delay/> for <address-setting/> was incorrectly interpreted as an absolute milliseconds since epoch. For example, given a value of 1000, instead of resulting in an expiry-delay of 1000 milliseconds, it was instead calculated as the 1970-01-01 00:00:01 GMT. The result of this error was that the expiry-delay did not work as expected. To resolve this error, the current time has been added to the calculations involved, and the value of the parameter is now calculated correctly.
HORNETQ-1281 Do not log passwords at any level
Under certain circumstances the SSL keystore/trustore passwords would be logged at INFO level, and a password set in the activation configuration properties of an MDB would be logged at TRACE level.
The code has been refactored to eliminate the logging of any password at any level.
HORNETQ-1284 Consumer max rate behavior is not intuitive
The consumer-max-rate logic was not behaving as expected. When consumer-max-rate was specified this rate was calculated as an average over the whole life of the consumer. For example if the consumer-max-rate was 10 then for every second which is consumer was alive it will be able to consume ten messages. Therefore if the consumer was alive for 60 seconds before a message arrived on the queue for consumption then it would be able to consume 600 messages in a single second, for example.
The consumer-max-rate is now calculated per second, so that in any given one second period the consumer cannot consume more than consumer-max-rate messages. It is not averaged over the life of the consumer.
HORNETQ-1290 Transaction's server state gets dirty if xaStart send times out
If the underlying operation to start an XA transaction from a client failed then the server-side state maintained for the client's session would become "dirty" and would cause problems for later operations.
The server-side session now properly deals with operations like this which time out.
HORNETQ-1289 Add support for JMS data to XmlDataExporter & XmlDataImporter
The XmlDataExporter and XmlDataImporter tools for working with the journal did not deal with the data in the JMS journal files (for example, JMS destination and connection factory bindings).
Support to export and import this data was added.
HORNETQ-1292 Delete large message from disk when message is dropped
When the address-full-policy was DROP large messages were not deleted from disk when the destination was full.
Large messages are now deleted from disk when the address is full and the address-full-policy is DROP.
HORNETQ-1231 listDeliveringdMessagesAsJSON ignores messages that are being consumed
The listDeliveringMessagesAsJSON did not enumerate all the expected messages.
Now listDeliveringMessagesAsJSON lists all the proper messages.
HORNETQ-1296 DeliveringCount and MessageCount can go negative
Under certain circumstances the DeliveringCount and MessageCount properties can go negative when the server is killed.
These properties no longer go negative under these circumstances.
HORNETQ-1299 Add flag to XML importer to create extra JNDI entries for AS7/Wildfly
JBoss EAP 6 instances require special JNDI entries for remote clients. If one imports data from standalone HornetQ or a previous version of EAP then they won't have the necessary JNDI entries for remote clients. A flag needs to be added which will tell the importer to create these special entries automatically.
A new flag was added to the XML importer to support creating the necessary JNDI entries.
HORNETQ-1303 XML exporter throws NPE on paged, large message
When exporting paged, large messages the XML exporter would throw an NullPointerException.
The XML exporter now properly handles paged, large messages.
HORNETQ-1304 XML exporter throws NPE on paged message with missing binding
During export, if a paged message referenced a binding that was no longer in the journal the XML exporter would throw a NullPointerException.
The XML exporter now properly deals with paged messages who reference a binding no longer recorded in the journal.

IIOP

1036819 Backport JacORB #904 CDRInputStream.read_string should handle 0 string size gracefully
The function CDRInputStream.read_string mishandles an empty string, incorrectly caculating this as a length of zero (0), resulting in a marshall exception. The handling of empty strings has been corrected so that CDRInputStream.read_string now returns an empty string, avoiding the error which occurred previously.

JBossWeb

JBWEB-281 Inconsistent use of genStringAsCharArray.
The JSP configuration property genStringAsCharArray was inconsistently named in JBoss Web. This meant the feature for using char array types rather than Strings in generated Servlet code could not be enabled.
This issue has been fixed in this release of JBoss EAP 6 so the feature can be properly enabled.
JBWEB-282 Lack of synchronization in org.apache.catalina.security.SecurityUtil
The doAsPrivilege method in org.apache.catalina.security.SecurityUtil did not synchronize access to a HashMap. This could allow concurrent access to the map when multiple application deployed at once, tripping the HashMap access into a high CPU loop.
This issue has been fixed in this release of JBoss EAP 6. The HashMap in SecurityUtil was replaced with a thread-safe ConcurrentHashMap to address the issue.

JCA

1047961 Race condition during server start-up - RA not deployed

A race condition was found to be preventing custom Resource Adapters from being deployed in up some instances.

The race condition was caused by org.jboss.as.connector.subsystems.resourceadapters.ResourceAdapterService not starting in time to deploy the RA. Code has been added to the product to ensure this no longer occurs.

JPA

1037636 Memory leak in JBoss AS / Hibernate JPA integration

A memory leak that occurred when checking the query cache statistics has been resolved in this release of JBoss EAP 6.

The leak occurred each time that jboss-cli was invoked to check the query cache. For example the following command would cause the leak:
./jboss-cli.sh --connect --command='/deployment=DeploymentName.ear/subdeployment=MyEjb.jar/subsystem=jpa/hibernate-persistence-unit=DeploymentName.ear\/MyEjb.jar#MyPersistenceUnit:read-children-resources(child-type=query-cache)'

An invalid query name was being used when checking the query cache statistics, which returned invalid results and also caused each invalid query name to be added to the Hibernate statistics. This release no longer uses an invalid query name when checking the query cache statistics.

Logging

1038862 SEVERE is not an available logging level in the CLI

In previous versions of JBoss EAP, the SEVERE logging level was not available when using the CLI.

This has been addressed in this release and SEVERE can now be set as a logging level.
1031221 LogContext's root logger is not created with a strong child hash map when strong=true

In previous versions of JBoss EAP 6, it was found that loggers were sometimes garbage collected early, resulting in loss of the loggers and configuration. For example, if a logger had an appender assigned, when the logger was garbage collected a new logger would have been created without the appender attached. In this release of the product, the map of loggers has been changed to use a strong reference rather than a weak reference. This causes the loggers not to get garbage collected and things to work as they should. As a result custom loggers are now honored as expected.
1049074 Logging deployment unit processor (DUP) leaking class loaders

In previous versions of JBoss EAP 6, when per-deployment logging or logging-profiles were used on a deployment, the undeploy was not removing the class loaders from the LogContextSelector. This was because the ClassLoaderLogContextSelector used the call stack to determine the LogContext.

In this release, the correct LogContext is attached to the DeploymentUnit. During the undeploy the LogContext is now removed from the selector using the LogContext attached to the deployment rather than relying on the class loader of the deployment. Class loaders are now removed as expected on undeploy.

Naming

1050184 LDAP: InitialDirContext.search() method doesn't accecpt url included name parameter

This release of JBoss EAP contains a fix to a problem encountered wherein a search of an LDAP server would fail with an exception if the first name field contained a URL and port number.

This format is now supported and no longer causes an exception to be thrown.
1061631 InitialContext swallows original exception cause

Instantiation of an InitialContext might fail with the following message:
javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory from classloader ModuleClassLoader for Module "deployment.externalContextBindingTest.jar:main" from Service Module Loader

From this message, however, the underlying cause was not visible, making troubleshooting impossible. To resolve this issue, the underlying cause has now been exposed. If this issue now occurs, the error message now reveals the root cause.
javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory from classloader ModuleClassLoader for Module "deployment.externalContextBindingTest.jar:main" from Service Module Loader [Root exception is javax.naming.CommunicationException: 127.0.0.1:10389 [Root exception is java.net.ConnectException: Connection refused]]

Remoting

1032312 Protocol incompatibility between serializable classes with different non-serializable superclasses

It was found that in previous versions of JBoss EAP 6, the marshalling layer was introducing superfluous data pertaining to non-serializable classes into the serialization stream. This was causing a range of undesirable behaviors ranging from reduced performance to ClassNotFoundExceptions and other errors between different JVMs.

This release of the product sees the extra data truncated as it should be. The protocol is now more performant and is again compatible between JVMs that have different class hierarchies for the same class.
1030104 segfault and other xnio issues running on IBM JDK on IBM-I

An issue with applications running on IBM systems failing with a segmentation fault has been corrected in this release of JBoss EAP 6.

The crashes were caused by NIO implementations in IBM JDKs that are optimized for usage on IBM operating systems. The I/O layer in JBoss EAP attempts to detect and utilize these implementations. However on some operating systems (like IBM-I) these implementations cause a segfault.

In this release of the product, these operating systems are detected and safe fall-backs are utilized. This resolves the segmentation fault issue and the application server no longer crashes unexpectedly.

Security

1060972 Additional Java Security Manager checks added to the PicketBox component.
Additional Java Security Manager checks were added to the PicketBox component.

Server

1050003 Class-Path: . can cause JBAS011046: A component named 'TestBean' is already defined in this module

When deploying a WAR which includes JAR manifests setting Class-Path as ., annotations in JAR files may have been processed twice. This resulted in failed deployments and produced errors similar to: JBAS011046: A component named 'TestBean' is already defined in this module.

This issue has been fixed in this release of JBoss EAP 6. When JAR manifests are processed, those containing Class-Path: . are now checked and ignored.

Web

1050033 WAIT_FOR_BEFORE_START does not work for / context applications

A bug in the web connector service resulted in WAIT_FOR_BEFORE_START not working when deploying / context applications. If WAIT_FOR_BEFORE_START was to / and a / application is deployed, the connectors would never start.

This issue has been fixed in this release of JBoss EAP 6. When setting WAIT_FOR_BEFORE_START to / and deploying a / context application, the connectors now start successfully.

Web Console

1051171 Logout of secured (ssl) admin console setup redirects to http address

A bug in the handling of logout redirects would result in logouts from a SSL-secured (https) web management console being unsuccessfully redirected to an unsecured (http) logout page. As a result, a Page Not Found (404) error would be displayed.

This issue has been fixed in this release of JBoss EAP 6. Logout redirects now properly preserve the protocol and port of the web management console. When logging out of a secured management console, the secured logout page is displayed.