users@glassfish.java.net

problem with JNDI NamingEnumeration?

From: <glassfish_at_javadesktop.org>
Date: Wed, 07 May 2008 17:26:41 PDT

I am using "Sun Java System Application Server 9.1_01" and getting the following error message with one of my webapps.

javax.naming.OperationNotSupportedException: close() not implemented
        at com.sun.enterprise.naming.NamePairsEnum.close(NamingManagerImpl.java:1523)
        at org.apache.commons.configuration.JNDIConfiguration.recursiveGetKeys(JNDIConfiguration.java:163)
        at org.apache.commons.configuration.JNDIConfiguration.getKeys(JNDIConfiguration.java:206)
        at org.apache.commons.configuration.JNDIConfiguration.getKeys(JNDIConfiguration.java:175)
        at org.apache.commons.configuration.ConfigurationUtils.copy(ConfigurationUtils.java:136)
        at org.apache.commons.configuration.ConfigurationUtils.convertToHierarchical(ConfigurationUtils.java:188)
        at org.apache.commons.configuration.CombinedConfiguration$ConfigData.getTransformedRoot(CombinedConfiguration.java:561)
        at org.apache.commons.configuration.CombinedConfiguration.constructCombinedNode(CombinedConfiguration.java:465)
        at org.apache.commons.configuration.CombinedConfiguration.getRootNode(CombinedConfiguration.java:403)
        at org.apache.commons.configuration.HierarchicalConfiguration.fetchNodeList(HierarchicalConfiguration.java:694)
        at org.apache.commons.configuration.HierarchicalConfiguration.getProperty(HierarchicalConfiguration.java:264)
        at org.apache.commons.configuration.AbstractConfiguration.resolveContainerStore(AbstractConfiguration.java:1048)
        at org.apache.commons.configuration.PropertyConverter.interpolateHelper(PropertyConverter.java:765)
        at org.apache.commons.configuration.PropertyConverter.interpolate(PropertyConverter.java:684)
        at org.apache.commons.configuration.AbstractConfiguration.interpolate(AbstractConfiguration.java:278)
        at org.apache.commons.configuration.DefaultConfigurationBuilder.interpolate(DefaultConfigurationBuilder.java:591)
        at org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationDeclaration.interpolate(DefaultConfigurationBuilder.java:830)
        at org.apache.commons.configuration.beanutils.XMLBeanDeclaration.getBeanProperties(XMLBeanDeclaration.java:291)
        at org.apache.commons.configuration.beanutils.BeanHelper.initBean(BeanHelper.java:159)
        at org.apache.commons.configuration.beanutils.DefaultBeanFactory.initBeanInstance(DefaultBeanFactory.java:106)
        at org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.initBeanInstance(DefaultConfigurationBuilder.java:960)
        at org.apache.commons.configuration.beanutils.DefaultBeanFactory.createBean(DefaultBeanFactory.java:62)
        at org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationProvider.getConfiguration(DefaultConfigurationBuilder.java:697)
        at org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.getConfiguration(DefaultConfigurationBuilder.java:939)
        at org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:872)
        at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:243)
        at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:265)
        at org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:279)
        at org.apache.commons.configuration.DefaultConfigurationBuilder.createConfigurationAt(DefaultConfigurationBuilder.java:609)
        at org.apache.commons.configuration.DefaultConfigurationBuilder.initCombinedConfiguration(DefaultConfigurationBuilder.java:554)
        at org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:486)
....

I looked at the NamePairsEnum class (inner class from NamingManagerImpl) and the close method is not implemented. Here is what I see:

// New API for JNDI 1.2
    public void close() throws NamingException {
        throw new OperationNotSupportedException("close() not implemented");
    }

This has been in the JDK since 1.3 (see NamingEnumeration interface). Shouldn't this be implemented or am I missing something?

Thanks.
[Message sent by forum member 'troyounces' (troyounces)]

http://forums.java.net/jive/thread.jspa?messageID=273233