J2CA0092E and J2CA0009E with java.lang.Exception: Failed security check.
 Technote (troubleshooting)
 
Problem(Abstract)
Failed to get a connection to the database using the IBM® WebSphere® Application Server V5.0 data source.
 
Symptom
[4/6/07 14:02:25:540 EDT] 1e17cff J2CXAResource E J2CA0092E: This is an English only message: Failed security check. Client is not permitted to create connection factory JMS$DadssResponseConnFactory.


[4/6/07 14:02:26:048 EDT] 1e17cff ConnectionFac E J2CA0009E: An exception occurred while trying to instantiate the ManagedConnectionFactory class com.ibm.ejs.jms.WSJMSManagedQueueConnectionFactory used by resource gov.hhs.cms.DadssResponseConnFactory : java.lang.Exception: Failed security check. Client is not permitted to create connection factory JMS$DadssResponseConnFactory

 
Cause
This error can occur if the data source configuration in the resources.xml file is copied from one system to another manually, but the Java™ 2 Connector (J2C) authentication data entries in the security.xml file are not copied.


The data source factory definition has the container-managed authentication alias value set to node_name/TestDsAlias as shown in the following example, but no J2C authentication data entry node_name/TestDsAlias defined in the security.xml file:

<factories xmi:type="resources.jdbc:DataSource" xmi:id="DataSource_8"
name="TestDS" jndiName="jdbc/TestDS"
authMechanismPreference="BASIC_PASSWORD"
authDataAlias="
node_name/TestDsAlias" statementCacheSize="10"
datasourceHelperClassname="com.ibm.websphere.rsadapter.OracleDataStoreHelper" relationalResourceAdapter="builtin_rra">
 
Resolving the problem
Either remove the authDataAlias="node_name/TestDsAlias"
from the data source factory definition in the resources.xml file or create the J2C authentication data entry node_name/TestDsAlias using the administrative console.

In this document:

jdbc/TestDS: Is the data source Java Naming Directory Interface (JNDI) name.
node_name/TestDsAlias : Is the J2C authentication data entry.

To configure the J2C authentication data entry alias:
  1. In the administrative console, click Security > JAAS Configuration > J2C Authentication Data.
  2. Click New, and specify the following information to create the authentication data:
    • The name of the security information entry, such as "aaa_auth_alias".
    • User ID: The user ID for this alias.
    • Password: The password for this alias.
    • Description: An optional, but recommended description of the alias.
 

Stack from the SystemOut .

[4/1/04 13:15:23:034 CST] 761c56 Helpers W NMSV0610I: A
NamingException is being thrown from a javax.naming.Context
implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: test1Network/nodes/test1/servers/test1_testejb
Target name: jdbc/TestDS
Other data:
Exception stack trace: com.ibm.websphere.naming.
CannotInstantiateObjectException: Exception occurred while the JNDI
NamingManager was processing a javax.naming.Reference object. Root
exception is java.lang.Exception: Failed security check. Client is not
permitted to create connection factory jdbc/TestDS
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM
(ConnectionFactoryBuilderImpl.java:1566)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.
getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
at javax.naming.spi.NamingManager.getObjectInstance
(NamingManager.java:299)
at com.ibm.ws.naming.util.Helpers.
processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults
(CNContextImpl.java:1762)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup
(CNContextImpl.java:1615)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup
(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.
java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
...
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 5.1
Software edition:
Reference #: 1170003
IBM Group: Software Group
Modified date: Sep 2, 2008