Topic
  • 6 replies
  • Latest Post - ‏2010-04-07T09:33:43Z by vijapur
vijapur
vijapur
13 Posts

Pinned topic java.security.PrivilegedActionException: java.io.IOException: Couldn't get

‏2010-04-03T13:14:20Z |
Hi All,
I am gettig the following error while writing to the fileusing Websphere Flat file adapter. Thanks in advance for clue on how to resolve this issue.

-Prakash

Stack Dump = javax.resource.spi.ResourceAdapterInternalException: java.security.PrivilegedActionException: java.io.IOException: Couldn't get lock for logs\*_%g.*
at com.ibm.j2ca.extension.logging.LogUtils.createLogHandler(LogUtils.java:904)
at com.ibm.j2ca.extension.logging.LogUtils.<init>(LogUtils.java:232)
at com.ibm.j2ca.base.WBIManagedConnectionFactory.getLogUtils(WBIManagedConnectionFactory.java:606)
at com.ibm.j2ca.base.WBIConnectionFactory.<init>(WBIConnectionFactory.java:60)
at com.ibm.j2ca.flatfile.FlatFileConnectionFactory.<init>(FlatFileConnectionFactory.java:47)
at com.ibm.j2ca.flatfile.FlatFileManagedConnectionFactory.createConnectionFactory(FlatFileManagedConnectionFactory.java:128)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderServerImpl.processObjectInstance(ConnectionFactoryBuilderServerImpl.java:1123)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:620)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:316)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:896)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:705)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:2097)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1951)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1866)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookupExt(CNContextImpl.java:1556)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:372)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstanceExt(IndirectJndiLookupObjectFactory.java:221)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:149)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:144)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:316)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookupExt(Helpers.java:896)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:191)
at com.ibm.ws.naming.java.javaURLContextRoot.processBoundObjectForLookup(javaURLContextRoot.java:407)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1280)
at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:205)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:145)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at com.ibm.ws.sca.internal.ejb.util.EJBLocator$JndiLocator.locate(EJBLocator.java:464)
at com.ibm.ws.sca.internal.ejb.util.EJBLocator.locate(EJBLocator.java:442)
at com.ibm.ws.sca.internal.ejb.util.JndiAdapter.<init>(JndiAdapter.java:44)
at com.ibm.ws.sca.internal.ejb.util.JndiAdapterFactory.createAdapter(JndiAdapterFactory.java:39)
at org.eclipse.emf.common.notify.impl.AdapterFactoryImpl.adaptNew(AdapterFactoryImpl.java:112)
at org.eclipse.emf.common.notify.impl.AdapterFactoryImpl.adapt(AdapterFactoryImpl.java:98)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.getResource(ModuleSessionBean.java:236)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.getResource(EJSLocalStatelessModule_43132892.java:437)
at com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler.getConnectionFactory(J2CImportHandler.java:1001)
at com.ibm.ws.sca.internal.j2c.handler.J2CImportHandler.processMessage(J2CImportHandler.java:332)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:726)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1167)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:843)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processUOWMessage(ModuleSessionBean.java:336)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.transactionNotSupportedActivitySessionNotSupported(ModuleSessionBean.java:291)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.transactionNotSupportedActivitySessionNotSupported(EJSLocalStatelessModule_43132892.java:131)
at com.ibm.ws.sca.internal.uow.handler.UOWStrategyImpl.transactionLocalActivitySessionFalse(UOWStrategyImpl.java:386)
at com.ibm.ws.sca.internal.uow.handler.JoinUOWHandler.processMessage(JoinUOWHandler.java:131)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:726)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1167)
at com.ibm.ws.sca.internal.proxy.impl.ProxyInvocationHandlerImpl.invoke(ProxyInvocationHandlerImpl.java:781)
at $Proxy31.processMessage(Unknown Source)
at com.ibm.bpe.invocation.sca.SCAInvocationHandler.doinvoke_Sync_ReqRsp(SCAInvocationHandler.java:564)
at com.ibm.bpe.invocation.sca.SCAInvocationHandler.doinvoke(SCAInvocationHandler.java:413)
at com.ibm.bpe.invocation.sca.SCAInvocationHandler.access$000(SCAInvocationHandler.java:121)
at com.ibm.bpe.invocation.sca.SCAInvocationHandler$1.run(SCAInvocationHandler.java:211)
at java.security.AccessController.doPrivileged(AccessController.java:197)
at com.ibm.bpe.invocation.sca.SCAInvocationHandler.invoke(SCAInvocationHandler.java:207)
at com.ibm.bpe.engine.BpelActivityKindInvoke.doActivate(BpelActivityKindInvoke.java:493)
at com.ibm.bpe.engine.BpelActivityStateInactive.activateOrSkip(BpelActivityStateInactive.java:308)
at com.ibm.bpe.engine.BpelEngineCore.continueControlLink(BpelEngineCore.java:341)
at com.ibm.bpe.engine.BpelContinueLinkMessage3.execute(BpelContinueLinkMessage3.java:92)
at com.ibm.bpe.engine.BpelEngine.processInternalMessages(BpelEngine.java:8021)
at com.ibm.bpe.framework.EngineMessageExecutionWorkObject.processAllEngineMessages(EngineMessageExecutionWorkObject.java:333)
at com.ibm.bpe.framework.EngineMessageExecutionWorkObject.run(EngineMessageExecutionWorkObject.java:214)
at com.ibm.bpe.framework.EngineMessageExecutor.execute(EngineMessageExecutor.java:195)
at com.ibm.bpe.engine.BpelEngine.receiveEvent(BpelEngine.java:880)
at com.ibm.bpe.engine.BpelEngine.receiveEvent(BpelEngine.java:792)
at com.ibm.bpe.engine.BpelEngine.receiveEvent(BpelEngine.java:742)
at com.ibm.bpe.framework.sca.ProcessSessionBean.invokeEngineSync(ProcessSessionBean.java:975)
at com.ibm.bpe.framework.sca.ProcessSessionBean.invokeEngineSync(ProcessSessionBean.java:947)
at com.ibm.bpe.framework.sca.ProcessSessionBean.processMessage(ProcessSessionBean.java:327)
at com.ibm.bpe.framework.sca.EJSLocalStatelesscomponent_ImportLeadProcess_d98b37a1.processMessage(EJSLocalStatelesscomponent_ImportLeadProcess_d98b37a1.java:639)
at com.ibm.bpe.framework.sca.ProcessImplementationHandler.handleInboundCalls(ProcessImplementationHandler.java:299)
at com.ibm.bpe.framework.sca.ProcessImplementationHandler.processMessage(ProcessImplementationHandler.java:161)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:715)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1167)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:843)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processUOWMessage(ModuleSessionBean.java:336)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.transactionRequiredActivitySessionNotSupported(ModuleSessionBean.java:315)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.transactionRequiredActivitySessionNotSupported(EJSLocalStatelessModule_43132892.java:233)
at com.ibm.ws.sca.internal.uow.handler.UOWStrategyImpl.transactionGlobalActivitySessionFalse(UOWStrategyImpl.java:311)
at com.ibm.ws.sca.internal.uow.handler.JoinUOWHandler.processMessage(JoinUOWHandler.java:165)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessageWithPCI(MessageDispatcherImpl.java:726)
at com.ibm.ws.sca.internal.message.impl.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:1167)
at com.ibm.ws.sca.internal.message.impl.ManagedMessageImpl.process(ManagedMessageImpl.java:834)
at com.ibm.wsspi.sca.ejb.module.impl.ModuleSessionBean.processMessage(ModuleSessionBean.java:153)
at com.ibm.wsspi.sca.ejb.module.EJSLocalStatelessModule_43132892.processMessage(EJSLocalStatelessModule_43132892.java:97)
at com.ibm.wbit.comptest.controller.invocation.impl.AdhocInvoker.processMessage(AdhocInvoker.java:72)
at com.ibm.wbit.comptest.controller.invocation.impl.Invoker.managedInvoke(Invoker.java:284)
at com.ibm.wbit.comptest.controller.invocation.impl.Invoker.invoke(Invoker.java:175)
at com.ibm.wbit.comptest.controller.invocation.impl.BaseInvocationHandler.invoke(BaseInvocationHandler.java:64)
at com.ibm.wbit.comptest.controller.invocation.impl.InvocationManager.doInvoke(InvocationManager.java:67)
at com.ibm.wbit.comptest.controller.invocation.impl.InvocationManager$1.run(InvocationManager.java:48)
at java.security.AccessController.doPrivileged(AccessController.java:219)
at javax.security.auth.Subject.doAs(Subject.java:495)
at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:118)
at com.ibm.wbit.comptest.controller.invocation.impl.InvocationManager.invoke(InvocationManager.java:42)
at com.ibm.wbit.comptest.controller.command.impl.BaseInteractiveEventHandler.processEvent(BaseInteractiveEventHandler.java:37)
at com.ibm.wbit.comptest.controller.command.impl.BaseCommandHandler.doCommand(BaseCommandHandler.java:107)
at com.ibm.wbit.comptest.controller.command.impl.CommandProcessor.doCommand(CommandProcessor.java:70)
at com.ibm.wbit.comptest.controller.command.impl.CommandProcessor.doCommand(CommandProcessor.java:42)
at com.ibm.wbit.comptest.controller.servlet.TestControllerServlet.process(TestControllerServlet.java:163)
at com.ibm.wbit.comptest.controller.servlet.TestControllerServlet.doPost(TestControllerServlet.java:125)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:592)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:122)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
Caused by: java.security.PrivilegedActionException: java.io.IOException: Couldn't get lock for logs\*_%g.*
at java.security.AccessController.doPrivileged(AccessController.java:250)
at com.ibm.j2ca.extension.logging.LogUtils.createLogHandler(LogUtils.java:890)
... 124 more
Caused by: java.io.IOException: Couldn't get lock for logs\*_%g.*
at java.util.logging.FileHandler.openFiles(FileHandler.java:387)
at java.util.logging.FileHandler.<init>(FileHandler.java:361)
at com.ibm.j2ca.extension.logging.LogUtils$6.<init>(LogUtils.java:893)
at com.ibm.j2ca.extension.logging.LogUtils$5.run(LogUtils.java:893)
at java.security.AccessController.doPrivileged(AccessController.java:246)
... 125 more

Dump of callerThis =
Object type = com.ibm.j2ca.flatfile.FlatFileManagedConnectionFactory

Exception = javax.resource.spi.ResourceAdapterInternalException
Source = com.ibm.j2ca.base.WBIManagedConnectionFactory.getLogUtils
probeid = 607
Dump of callerThis =
Object type = com.ibm.j2ca.flatfile.FlatFileManagedConnectionFactory
Updated on 2010-04-07T09:33:43Z at 2010-04-07T09:33:43Z by vijapur
  • anket1234
    anket1234
    5 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-06T05:29:02Z  
    Hello,

    Can you please describe the full scenerio so as what you are trying to achive and at what time you are facing this exception.
  • Jens.Engelke
    Jens.Engelke
    5 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-06T11:14:15Z  
    Hi,

    it seems as if you are trying to access a log file.
    I assume you need to make sure that the same file is not open by some other process (e.g. the one who writes into the log file).

    Have a look at http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/topic/com.ibm.wsadapters.jca.ff.doc/doc/cbp_ffa_inboundproc.html
    There are some comments on file locking.

    Regards,
    Jens
  • vijapur
    vijapur
    13 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-06T11:15:57Z  
    Thanks for your help.

    Here is the scenario i am working with,
    I have FlatFileModule with one export inbound flatfile adapter and one import outbound flatfile.
    This module will pick up the file from local I created wrapper BO and log the same. till this it is fine.
    And next it will write to the file using flatfile adapter import. while writing to the file i am getting error.
    Here i am using JNDI name J2C connection factories for Endpoint configuration on import. This JDNI name configured in admin console with the following custom property.

    adapterID ResourceAdapter
    traceFileSize 0
    outputFileName
    logFilename .
    sequenceFile
    connectionRetryInterval 60000
    hideConfidentialTrace false
    logFileSize 0
    connectionRetryLimit 0
    userName
    traceFilename
    logNumberOfFiles 1
    traceNumberOfFiles 1
    password
    outputDirectory C:/batch_env/workfiles/
    biDiContextEIS
    stagingDirectory C:/batch_env/workfiles/

    and i have set all Required field to false.
  • vijapur
    vijapur
    13 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-06T11:21:40Z  
    Hi,
    As of I know not opned any file, not even log file.
    but i am not sure if the system is opening some file. I have restarted my machine and tested the same, and even i have removed app and redeployed and tested but still getting the same error.

    thanks
    Prakash
  • Jens.Engelke
    Jens.Engelke
    5 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-06T15:31:05Z  
    • vijapur
    • ‏2010-04-06T11:21:40Z
    Hi,
    As of I know not opned any file, not even log file.
    but i am not sure if the system is opening some file. I have restarted my machine and tested the same, and even i have removed app and redeployed and tested but still getting the same error.

    thanks
    Prakash
    Hi,

    The exception indicates that the root cause is somewhere close to logging ... *_%g.*
    In order to isolate the issue, I'd recommend to disable logging:
    logFilename . --> remove the dot
    traceFilename --> keep it empty
    logNumberOfFiles 1 --> set to 0
    traceNumberOfFiles 1 --> set to 0

    For me, the logFileName parameter looks most promising.
  • vijapur
    vijapur
    13 Posts

    Re: java.security.PrivilegedActionException: java.io.IOException: Couldn't get

    ‏2010-04-07T09:33:43Z  
    Thanks Jens,

    After modifying the

    logNumberOfFiles 1 --> set to 0
    traceNumberOfFiles 1 --> set to 0

    these two parameter resolved the issue. these paramater were locking the trace log.
    aftyer changing it to 0, the issue got resolved.

    thanks for your help.
    Prakash