configuration - WebSphere Liberty Profile blocking on Datasource lookup -
i'm trying configure datasource in ibm websphere liberty profile (16.0.0.3) , i've done far:
server.xml
<authdata id="dbuser" password="{xor}blablabla" user="my_user"/> <datasource id="oracle" isolationlevel="transaction_read_committed" jdbcdriverref="oracledriver" jndiname="epms_ds" recoveryauthdataref="dbuser" type="javax.sql.connectionpooldatasource"> <properties.oracle databasename="dbname" portnumber="1521" servername="servername"/> </datasource> <jdbcdriver id="oracledriver" javax.sql.connectionpooldatasource="oracle.jdbc.pool.oracleconnectionpooldatasource" libraryref="shared-library"/>
web.xml
<resource-env-ref> <description>the oracle ds</description> <resource-env-ref-name>jdbc/oracleds</resource-env-ref-name> <resource-env-ref-type>javax.sql.datasource</resource-env-ref-type> </resource-env-ref>
ibm-web-bnd.xml
<resource-ref name="jdbc/oracleds" binding-name="epms_ds"> <authentication-alias name="dbuser" /> </resource-ref>
however, besides application server taking more 2 minutes startup, application seems freeze on following instruction:
ctx = new initialcontext(); ctx.lookup("java:comp/env/jdbc/oracleds");
the log doesn't show errors, last line shows application's debug message indicating going jndi lookup.
i've tried different configurations in server.xml
, without <authdata>
, explicitly defining user , password on datasource, identical results:
<datasource id="oracle" isolationlevel="transaction_read_committed" jdbcdriverref="oracledriver" jndiname="epms_ds" type="javax.sql.connectionpooldatasource"> <properties.oracle url="jdbc:oracle:thin:@servername:1521:dbname" password="{xor}blablabla" user="my_user"/> </datasource>
sadly, liberty profile doesn't seem provide way test db connection, seems correctly configured (i can assure credentials correct, server name , port). missing here?
edit #1
following njr's suggestion, i've performed thread dump , here summary:
- waiting on com.ibm.tx.jta.impl.eventsemaphore@737eaefc - waiting on com.ibm.ws.objectmanager.filelogoutput$flushhelper@19d51071 - waiting on com.ibm.ws.objectmanager.filelogoutput$notifyhelper@2fa0da91 - waiting on com.ibm.ws.objectmanager.objectmanagerstate$checkpointhelper@5b0919fc - waiting on com.ibm.ws.sib.msgstore.persistence.dispatcher.spilldispatcher$dispatchinglock@1620db94 (8 occorrences, different instances) ... - waiting on com.ibm.ws.threading.internal.boundedbuffer$getqueuelock@c8a05b6 (56 occorrences, different instances) ... - waiting on java.lang.object@4c1d5897 - waiting on java.lang.ref.reference$lock@5448da4c - waiting on java.lang.ref.referencequeue$lock@f91b025 - waiting on java.util.linkedlist@5b213416 - waiting on java.util.linkedlist@6cb46e1f - waiting on java.util.taskqueue@f50561c (14 occorrences, different instances) ... - waiting on java.util.concurrent.atomic.atomicreference@5476d077 - waiting on java.util.concurrent.locks.abstractqueuedsynchronizer$conditionobject@4da17c93 - waiting on java.util.concurrent.locks.abstractqueuedsynchronizer$conditionobject@513339c6 - waiting on java.util.concurrent.locks.abstractqueuedsynchronizer$conditionobject@5dc2ae0f - waiting on org.eclipse.osgi.framework.eventmgr.eventmanager$eventthread@236970be - waiting on org.eclipse.osgi.framework.eventmgr.eventmanager$eventthread@6dfdd5 - waiting on org.eclipse.osgi.framework.eventmgr.eventmanager$eventthread@72ce4e1c - blocked on com.ibm.tx.jta.embeddable.impl.embeddabletmhelper@5748c911 - blocked on com.ibm.tx.jta.embeddable.impl.embeddabletmhelper@5748c911
can me interpret this?
edit #2
here's complete stack trace of blocked threads:
largethreadpool-thread-148 [217] (blocked) com.ibm.tx.jta.embeddable.impl.embeddabletmhelper.start line: 63 com.ibm.tx.jta.util.txtmhelper.start line: 461 com.ibm.tx.util.tmhelper.start line: 74 com.ibm.tx.jta.util.txtmhelper.checktmstate line: 500 com.ibm.tx.util.tmhelper.checktmstate line: 116 com.ibm.tx.jta.impl.tranmanagerset.registerresourceinfo line: 270 com.ibm.ws.transaction.services.transactionmanagerservice.registerresourceinfo line: 260 com.ibm.ejs.j2c.connectionmanager.registerxaresourceinfo line: 2537 com.ibm.ejs.j2c.connectionmanager.<init> line: 509 com.ibm.ejs.j2c.connectionmanagerserviceimpl.getconnectionmanager line: 407 com.ibm.ejs.j2c.connectionmanagerserviceimpl.getconnectionmanager line: 54 com.ibm.ws.jca.cm.abstractconnectionfactoryservice.createresource line: 146 com.ibm.ws.injectionengine.osgi.internal.indirectjndilookupobjectfactory.createresourcewithfilter line: 346 com.ibm.ws.injectionengine.osgi.internal.indirectjndilookupobjectfactory.createresource line: 319 com.ibm.ws.injectionengine.osgi.internal.indirectjndilookupobjectfactory.getobjectinstance line: 133 com.ibm.ws.injectionengine.osgi.internal.indirectjndilookupobjectfactory.getobjectinstance line: 99 com.ibm.wsspi.injectionengine.injectionbinding.getinjectionobjectinstance line: 1556 com.ibm.wsspi.injectionengine.injectionbinding.getinjectionobject line: 1433 com.ibm.wsspi.injectionengine.injectionbinding.getinjectionobject line: 1389 com.ibm.ws.injectionengine.osgi.internal.naming.injectionjavacolonhelper.getobjectinstance line: 116 com.ibm.ws.jndi.url.contexts.javacolon.internal.javaurlcontext.lookup line: 333 com.ibm.ws.jndi.url.contexts.javacolon.internal.javaurlcontext.lookup line: 371 org.apache.aries.jndi.delegatecontext.lookup line: 161 javax.naming.initialcontext.lookup line: 417 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller.jndilookupused line: 264 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller.checkconfiguration line: 115 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller.<init> line: 95 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller.<init> line: 51 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller$singletonholder.<clinit> line: 81 pt.sibs.epms.persistence.utils.entitymanagerfactorycontroller.getinstance line: 88 pt.sibs.epms.util.logging.loggerconfiguration.<clinit> line: 33 pt.sibs.epms.ecc.renderer.htmlformrenderer.<clinit> line: 25 java.lang.class.forname0 line: not available [native method] java.lang.class.forname line: 348 com.ibm.ws.webcontainer.osgi.webapp.webapp.addclasstohandlestypesstartupset line: 1104 com.ibm.ws.webcontainer.osgi.webapp.webapp.scanforhandlestypesclasses line: 1038 com.ibm.ws.webcontainer.webapp.webapp.initializeservletcontainerinitializers line: 2493 com.ibm.ws.webcontainer.webapp.webapp.initialize line: 1037 com.ibm.ws.webcontainer.webapp.webapp.initialize line: 6545 com.ibm.ws.webcontainer.osgi.dynamicvirtualhost.startwebapp line: 466 com.ibm.ws.webcontainer.osgi.dynamicvirtualhost.createrunnablehandler line: 264 com.ibm.ws.webcontainer.osgi.dynamicvirtualhost.createrunnablehandler line: 329 com.ibm.ws.http.internal.virtualhostimpl.discriminate line: 251 com.ibm.ws.http.dispatcher.internal.channel.httpdispatcherlink.ready line: 301 com.ibm.ws.http.channel.internal.inbound.httpinboundlink.handlediscrimination line: 471 com.ibm.ws.http.channel.internal.inbound.httpinboundlink.handlenewrequest line: 405 com.ibm.ws.http.channel.internal.inbound.httpinboundlink.processrequest line: 285 com.ibm.ws.http.channel.internal.inbound.httpiclreadcallback.complete line: 66 com.ibm.ws.channel.ssl.internal.sslreadservicecontext$sslreadcompletedcallback.complete line: 1777 com.ibm.ws.tcpchannel.internal.workqueuemanager.requestcomplete line: 504 com.ibm.ws.tcpchannel.internal.workqueuemanager.attemptio line: 574 com.ibm.ws.tcpchannel.internal.workqueuemanager.workerrun line: 929 com.ibm.ws.tcpchannel.internal.workqueuemanager$worker.run line: 1018 java.util.concurrent.threadpoolexecutor.runworker line: 1142 java.util.concurrent.threadpoolexecutor$worker.run line: 617 java.lang.thread.run line: 745
and second thread:
largethreadpool-thread-3 [33] (blocked) com.ibm.tx.jta.embeddable.impl.embeddabletmhelper.start line: 63 com.ibm.tx.jta.util.txtmhelper.start line: 461 com.ibm.tx.util.tmhelper.start line: 74 com.ibm.tx.jta.util.txtmhelper.checktmstate line: 500 com.ibm.tx.util.tmhelper.checktmstate line: 116 com.ibm.tx.jta.impl.tranmanagerset.begin line: 167 com.ibm.ejs.csi.transtrategy.beginglobaltx line: 593 com.ibm.ejs.csi.required.preinvoke line: 56 com.ibm.ejs.csi.transactioncontrolimpl.preinvoke line: 222 com.ibm.ejs.container.ejscontainer.preinvokeactivate line: 3176 com.ibm.ejs.container.ejscontainer.ejbpreinvoke line: 2576 com.ibm.ejs.container.timedobjectwrapper.invokecallback line: 84 com.ibm.ejs.container.timernprunnable.dowork line: 196 com.ibm.ejs.container.timernprunnable.run line: 103 java.util.concurrent.executors$runnableadapter.call line: 511 java.util.concurrent.futuretask.run line: 266 java.util.concurrent.threadpoolexecutor.runworker line: 1142 java.util.concurrent.threadpoolexecutor$worker.run line: 617 java.lang.thread.run line: 745
edit #3
the thread waiting and, apparently, blocking other 2 threads:
largethreadpool-thread-38 [103] (waiting) java.lang.object.wait line: not available [native method] java.lang.object.wait line: 502 com.ibm.tx.jta.impl.eventsemaphore.waitevent line: 71 com.ibm.tx.jta.impl.recoverymanager.waitforreplaycompletion line: 1273 com.ibm.tx.jta.impl.txrecoveryagentimpl.initiaterecovery line: 413 com.ibm.ws.recoverylog.spi.recoverydirectorimpl.directinitialization line: 751 com.ibm.ws.recoverylog.spi.recoverydirectorimpl.drivelocalrecovery line: 1240 com.ibm.ws.recoverylog.spi.reclogserviceimpl.start line: 125 com.ibm.tx.jta.embeddable.impl.embeddabletmhelper.start line: 130 com.ibm.tx.jta.util.txtmhelper.start line: 461 com.ibm.tx.util.tmhelper.start line: 74 com.ibm.tx.jta.util.txtmhelper.checktmstate line: 500 com.ibm.tx.util.tmhelper.checktmstate line: 116 com.ibm.tx.jta.impl.tranmanagerset.begin line: 167 com.ibm.ws.transaction.services.transactionmanagerservice.begin line: 281 com.ibm.ws.concurrent.persistent.internal.persistentexecutorimpl$pollingtask.run line: 2239
not sure if related, ffdc showing following exception:
------start of de processing------ = [09-11-2016 14:41:09:006 gmt] exception = com.ibm.ws.recoverylog.spi.logincompatibleexception source = com.ibm.ws.recoverylog.spi.loghandle probeid = 326 stack dump = com.ibm.ws.recoverylog.spi.logincompatibleexception @ com.ibm.ws.recoverylog.spi.logfilehandle.fileopen(logfilehandle.java:522) @ com.ibm.ws.recoverylog.spi.loghandle.openlog(loghandle.java:324) @ com.ibm.ws.recoverylog.spi.multiscoperecoverylog.openlog(multiscoperecoverylog.java:602)at com.ibm.ws.recoverylog.spi.recoverylogimpl.openlog(recoverylogimpl.java:77) @ com.ibm.tx.jta.impl.recoverymanager.run(recoverymanager.java:1835) @ java.lang.thread.run(thread.java:745)
in edit #3, thread waiting in
com.ibm.tx.jta.impl.recoverymanager.waitforreplaycompletion
will have spawned recoverymanager thread who's role access transaction log files in flesystem. other thread should minimal amount of file processing necessary before signalling waiting thread may continue. can see thread stack containing
com.ibm.tx.jta.impl.recoverymanager.run ?
i concerned logincompatibleexception. suggests transaction log files on filesystem corrupt. should not cause server hang , believe you've hit product defect.
if need make progress quickly, may appropriate in scenario delete transaction log files. please note suggest customers extreme care transaction logs ensure integrity of distributed transactions. in production environment we'd recommend such action taken under guidance of ibm level 3 service. in test/evaluation scenario can applicable.
the liberty transaction log info stored in /wlp/usr/servers//tranlog directory. if appropriate tranlog , partnerlog subdirectories may deleted , server restarted.
Comments
Post a Comment