1.问题描述:
在启动被管server过程中,有些数据源不能创建数据库连接池,导致应用不能访问数据库
2.问题分析:
启动日志如下:
<2011-7-1 下午09时33分53秒 CST>(TDSession.java:195)atcom.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.(TeraLocalConnection.java:94)atcom.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:55)atcom.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:216)atcom.teradata.jdbc.TeraDriver.connect(TeraDriver.java:149)atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:301)atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:205)atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1049)atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:977)atweblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:207)atweblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1135)atweblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:177)atweblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:372)atweblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:232)atweblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)atweblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)atweblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)atweblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)atweblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)atweblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)atweblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)atweblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)atweblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)atweblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)atweblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)atweblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)>
<2011-7-1 下午09时33分54秒 CST><Failedtoinitializetheapplication'EMSBiTDDataSource49'duetoerrorweblogic.application.ModuleException:.
weblogic.application.ModuleException:
atweblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:257)
atweblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
atweblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
atweblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
Truncated.seelogfileforcompletestacktrace
weblogic.common.ResourceException:weblogic.common.ResourceException:Couldnotcreatepoolconnection.TheDBMSdriverexceptionwas:[TeradataJDBCDriver][TeraJDBC12.00.00.110][Error1000][SQLState08S01]LoginfailureforPacketreceiveFriJul0121:33:53CST2011socketlocal=0.0.0.0/0.0.0.0:53928remote=10.3.10.49/10.3.10.49:1025cid=29367eesess=25581993java.io.IOException:IncompleteLANmessageheader:read0bytesatcom.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:370)atcom.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:818)atcom.teradata.jdbc.jdbc.GenericEncryptContextState.action(GenericEncryptContextState.java:120)atcom.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:120)atcom.teradata.jdbc.jdbc_4.TDSession.(TDSession.java:195)atcom.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.(TeraLocalConnection.java:94)atcom.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:55)atcom.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:216)atcom.teradata.jdbc.TeraDriver.connect(TeraDriver.java:149)atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:301)atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:205)atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1049)atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:977)atweblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:207)atweblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1135)atweblogic.jdbc.common.internal.ConnectionPool.start(ConnectionPool.java:177)atweblogic.jdbc.common.internal.ConnectionPoolManager.createAndStartPool(ConnectionPoolManager.java:372)atweblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:232)atweblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)atweblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)atweblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)atweblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)atweblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)atweblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)atweblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)atweblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)atweblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)atweblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)atweblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)atweblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)atweblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:238)
atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1049)
atweblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:977)
atweblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:207)
atweblogic.jdbc.common.internal.ConnectionPool.doStart(ConnectionPool.java:1135)
Truncated.seelogfileforcompletestacktrace
分析:此错误为数据源配置错误,在配置多数据源时,要求各个数据源使用相同的XA设置,而现在数据源下关于transaction项内的设置不相同。
3.问题解决:
只需要把多数据源内加进来的数据源transaction选项的XA设置相同即可
<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600">