InvalidAttributeValException: ADMG0012E: Invalid attribute value for attribute connectionTimeout
 Technote (troubleshooting)
 
Problem(Abstract)
Problem adding the ConnectionPool properties for WebSphere® Application Server V5 data source.
 
Cause
Sample code:

...
public static String CONNECTION_TIMEOUT = "60";
public static String MAX_CONNECTIONS = "100";
public static String MIN_CONNECTIONS = "10";
public static String REAP_TIME = "180";
public static String UNUSED_TIMEOUT = "1800";
public static String PURGEPOLICY = "FailingConnectionOnly";
...

/**

* @param configService
* @param session
* @param newDataSource
* @throws ConfigServiceException
* @throws ConnectorException
*/

private void addConnectionPoolProperties(

            ConfigService configService,
            Session session,
            ObjectName newDataSource)
            throws ConfigServiceException, ConnectorException
      {
            AttributeList connectionPool = new AttributeList();
            ConfigServiceHelper.setAttributeValue(connectionPool, "connectionTimeout", CONNECTION_TIMEOUT);
            ConfigServiceHelper.setAttributeValue(connectionPool, "maxConnections", MAX_CONNECTIONS);
            ConfigServiceHelper.setAttributeValue(connectionPool, "minConnections", MIN_CONNECTIONS);
            ConfigServiceHelper.setAttributeValue(connectionPool, "reapTime", REAP_TIME);
            ConfigServiceHelper.setAttributeValue(connectionPool, "unusedTimeout", UNUSED_TIMEOUT);
            ConfigServiceHelper.setAttributeValue(connectionPool, "purgePolicy", PURGEPOLICY);
            ObjectName connectionPoolSet = configService.createConfigData(session,newDataSource,"connectionPool","",connectionPool);
      }

...


After setting the connectionTimeout type to both Integer and String, you continue to receive the following error message:

5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut     O com.ibm.websphere.management.exception.InvalidAttributeValException: ADMG0012E: Invalid attribute value for attribute connectionTimeout.

[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut     O     at com.ibm.ws.management.configservice.MOFUtil.validateAttribute(MOFUtil.java:850)

[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut     O     at com.ibm.ws.management.configservice.MOFUtil.validateAttributeList(MOFUtil.java:766)

[5/27/04 11:29:11:751 EDT] 65d907f8 SystemOut     O     at com.ibm.ws.management.configservice.MOFUtil.validateConfigData(MOFUtil.java:124)


WebSphere Configuration Documentation
Within the package resources.jdbc, the attribute connectionTimeout, for the connection pool manager, has different data types based on the data source style:

 
Resolving the problem
Change the type for connectionTimeout to Long. From the preceding sample code, it should appear as follows:


public static Long CONNECTION_TIMEOUT = 60;


 
 
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: 6.1
Software edition:
Reference #: 1172974
IBM Group: Software Group
Modified date: Aug 16, 2004