cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Debdayal Mandal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-4294) Exception Cache ws-security.timestamp.cache.instance already exists or Cache ws-security.nonce.cache.instance already exists
Date Mon, 07 May 2012 16:50:48 GMT
Debdayal Mandal created CXF-4294:
------------------------------------

             Summary: Exception Cache ws-security.timestamp.cache.instance already exists
or Cache ws-security.nonce.cache.instance already exists
                 Key: CXF-4294
                 URL: https://issues.apache.org/jira/browse/CXF-4294
             Project: CXF
          Issue Type: Bug
          Components: WS-* Components
    Affects Versions: 2.6
            Reporter: Debdayal Mandal
            Priority: Minor


We have upgraded to CXF 2.6.0 and services started fine but getting following exceptions when
first client calls are coming 

Exception Cache ws-security.timestamp.cache.instance already exists OR 
Cache ws-security.nonce.cache.instance already exists

Our project has multiple webservice endpoints/services in a single JVM and all of the endpoints
may get a client SOAP call at the same time. We have WS Security timestamp, signature and
encryption enabled. This exception is coming when all the client calls are coming almost at
the same time but if the client calls are sparse over time then everything runs fine. But
when the exception occurs that particular client received no data or exception. 

In our analysis, we found that CXF 2.6.0 is trying to add cache instance for nonce and timestamp
through net.sf.ehcache.CacheManager: addCache (final Ehcache cache) API call. I am not sure
if this cache instance addition happens for all the SOAP calls or once per endpoint but net.sf.ehcache.CacheManager:
addCache (final Ehcache cache) has a strict check, if it is already there (may have been created
already by another webservice endpoint in the same JVM) it throws an exception.

It appears that CXF should use net.sf.ehcache.CacheManager: addCacheIfAbsent(final Ehcache
cache) instead of net.sf.ehcache.CacheManager: addCache (final Ehcache cache). addCacheIfAbsent(...)
does not throw exception if the cache instance is already present.

Currently we have made following changes to avoid the exceptions

<jaxws:endpoint id="....">
...
                <jaxws:properties>
                                ...            
                                <entry key="ws-security.enable.nonce.cache" value="false"
/>
                                <entry key="ws-security.enable.timestamp.cache" value="false"
/>
                </jaxws:properties>                       
</jaxws:endpoint>

Please let us know, if this is a bug or are there any other solution such that we do not have
to disable nonce and timestamp cache of our own.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message