IBM Support

PM46017: A JAVA.SECURITY.ACCESSCONTROLEXCEPTION MAY OCCUR WHEN GETTING A CONNECTION IN CERTAIN SCENARIOS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A java.security.AccessControlException may occur when getting
    a connection in certain scenarios. The
    AccessControlException occurs when the server tries to read
    the property
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.disablePoolPurgeIfAffin
    ityEnabled. A sample stack trace is shown below
    
    java.security.AccessControlException: Access denied
    (java.util.PropertyPermission
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.disablePoolPurgeIfAffin
    ityEnabled read)
    at
    java.security.AccessController.checkPermission(AccessController.
    java:108)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:5
    44)
    at
    com.ibm.ws.security.core.SecurityManager.checkPermission(Securit
    yManager.java:206)
    at
    java.lang.SecurityManager.checkPropertyAccess(SecurityManager.ja
    va:1297)
    at java.lang.System.getProperty(System.java:382)
    at java.lang.System.getProperty(System.java:366)
    at java.lang.Boolean.getBoolean(Boolean.java:232)
    at
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.disablePoolPurgeIfAffin
    ityEnabled(WSRdbDataSource.java:3581)
    at
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.postGetConnectionHandli
    ng(WSRdbDataSource.java:2574)
    at
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection(WSRdbData
    Source.java:2546)
    at
    com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createMa
    nagedConnection(WSManagedConnectionFactoryImpl.java:1610)
    at
    com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(Fr
    eePool.java:2036)
    at
    com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java
    :1713)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2496)
    at
    com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionMa
    nager.java:1063)
    at
    com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionM
    anager.java:700)
    at
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcD
    ataSource.java:668)
    at
    com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcD
    ataSource.java:635)
    at
    org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(D
    elegatingDataSource.java:137)
    at
    org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(D
    ecoratingDataSource.java:112)
    at
    org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictio
    nary(DataSourceFactory.java:242)
    at
    org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnection
    Factory2(JDBCConfigurationImpl.java:802)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.java:60)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at
    org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(Con
    figurationImpl.java:294)
    at
    org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(
    OpenJPAConfigurationImpl.java:1602)
    at
    org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(Abs
    tractBrokerFactory.java:647)
    at
    org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(Abstra
    ctBrokerFactory.java:206)
    at
    org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(Dele
    gatingBrokerFactory.java:156)
    at
    org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEn
    tityManager(EntityManagerFactoryImpl.java:227)
    at
    com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityMana
    ger(EntityManagerFactoryImpl.java:66)
    at
    com.ibm.ws.persistence.EntityManagerFactoryImpl.createEntityMana
    ger(EntityManagerFactoryImpl.java:30)
    at
    org.apache.aries.jpa.container.context.transaction.impl.JTAPersi
    stenceContextRegistry.getCurrentPersistenceContext(JTAPersistenc
    eContextRegistry.java:122)
    at
    org.apache.aries.jpa.container.context.transaction.impl.JTAEntit
    yManager.getPersistenceContext(JTAEntityManager.java:73)
    at
    org.apache.aries.jpa.container.context.transaction.impl.JTAEntit
    yManager.persist(JTAEntityManager.java:220)
    at
    com.ibm.ws.eba.example.blabber.persistence.BlabberImpl.registerU
    ser(BlabberImpl.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor
    Impl.java:60)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod
    AccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at
    org.apache.aries.blueprint.proxy.Collaborator$1.invoke(Collabora
    tor.java:66)
    at
    org.apache.aries.blueprint.proxy.Collaborator.invoke(Collaborato
    r.java:151)
    at
    com.ibm.ws.eba.example.blabber.persistence.$BlabberImpl569057771
    .registerUser(Unknown Source)
    at
    com.ibm.ws.eba.example.blabber.Registration.doPost(Registration.
    java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWr
    apper.java:1657)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWr
    apper.java:1597)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:131)
    at
    com.ibm.ws.osgi.web.extender.OsgiDirectoryProtectionFilter.doFil
    ter(OsgiDirectoryProtectionFilter.java:98)
    at
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(Fi
    lterInstanceWrapper.java:188)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:116)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAp
    pFilterChain.java:77)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebA
    ppFilterManager.java:908)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(Ser
    vletWrapper.java:934)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(Ser
    vletWrapper.java:502)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest
    (ServletWrapperImpl.java:179)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:
    3935)
    at
    com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.j
    ava:276)
    at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.
    java:931)
    at
    com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContai
    ner.java:1583)
    at
    com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLin
    k.java:186)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscr
    imination(HttpInboundLink.java:452)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRe
    quest(HttpInboundLink.java:511)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequ
    est(HttpInboundLink.java:305)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complet
    e(HttpICLReadCallback.java:83)
    at
    com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureComp
    leted(AioReadCompletionListener.java:165)
    at
    com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyn
    cFuture.java:217)
    at
    com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncC
    hannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at
    com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at
    com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHand
    ler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.0                                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: A java.security.AccessControlException  *
    *                      is thrown when an application tries     *
    *                      to get a JDBC connection from a         *
    *                      v5 datasource.                          *
    ****************************************************************
    * RECOMMENDATION:                                              *
    *                                                              *
    ****************************************************************
    When an application tries to get a JDBC connection from a
    v5 datasource, the Application Server tries to get the system
    property
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.disablePoolPurgeIfAffin
    ityEnabled in an application thread which does not have
    the security permissions required to read that property. This
    results in a java.security.AccessControlException being thrown
    

Problem conclusion

  • The Application Server now reads the property
    com.ibm.ws.rsadapter.spi.WSRdbDataSource.disablePoolPurgeIfAffin
    ityEnabled during initialization in a thread that has the
    required permissions.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.0.0.2.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM46017

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-19

  • Closed date

    2011-10-25

  • Last modified date

    2011-10-25

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
27 October 2021