调用TUXEDOF服务抛出的TPETRAN(14)异常处理.

在EJB中调用TUXEDO服务时遇到TPETRAN(14)异常,表示调用者无法进入事务模式。错误源于无效的参数或配置。通过将EJB事务模式设置为NotSupported解决了问题。这篇博客分享了排查和解决这个问题的过程。
摘要由CSDN通过智能技术生成

问题:

    在EJB里面调用TUXEDOF服务时抛出异常:

TPETRAN(14):0:0:TPED_MINVAL(0):QMNONE(0):0
        at weblogic.wtc.jatmi.dsession.tpgetrply(dsession.java:2672)
        at weblogic.wtc.jatmi.dsession.tpcall(dsession.java:2832)
        at weblogic.wtc.gwt.TuxedoConnection.tpcall(TuxedoConnection.java:1235)

 

在网上找了好久没有找到直接的答案. 在百度里面搜索既然都没有搜出来东西. 在GOOGLE里面搜还搜出来几条记录. 搜了半天. 问题才有点眉目.

搜索到的信息:

TP error code set

tperrno=4 invalid parameter
tperrno=6是TPENOENT错误,没有找到service

#define TPMINVAL 0 /* minimum error message */
#define TPEABORT 1
#define TPEBADDESC 2
#define TPEBLOCK 3
#define TPEINVAL 4
#define TPELIMIT 5
#define TPENOENT 6
#define TPEOS 7
#define TPEPERM 8
#define TPEPROTO 9
#define TPESVCERR 10
#define TPESVCFAIL 11
#define TPESYSTEM 12
#define TPETIME 13
#define TPETRAN 14
#define TPGOTSIG 15
#define TPERMERR 16
#define TPEITYPE 17
#define TPEOTYPE 18
#define TPERELEASE 19
#define TPEHAZARD 20
#define TPEHEURISTIC 21
#define TPEEVENT 22
#define TPEMATCH 23
#define TPEDIAGNOSTIC 24
#define TPEMIB 25
#define TPMAXVAL 26 /* maximum error message */

对应的描述:

The following list describes the general meaning of each error:
TPEABORT
A transaction could not commit because either the work performed by the
initiator or by one or more of its participants could not commit.
TPEBADDESC
A call descriptor is invalid or is not the descriptor with which a conversational
service was invoked.
TPEBLOCK
A blocking condition exists and TPNOBLOCK was specified.
TPEDIAGNOSTIC
The enqueuing of a message on the specified queue failed. The reason for
failure can be determined by the diagnostic returned via ctl.
TPEEVENT
An event occurred; the event type is returned in revent.
TPEGOTSIG
A signal was received and TPSIGRSTRT was not specified.
TPEHAZARD
Due to some failure, the work done on behalf of the transaction could have
been heuristically completed.
TPEHEURISTIC
Due to a heuristic decision, the work done on behalf of the transaction was
partially committed and partially aborted.
TPEINVAL
An invalid argument was detected.
TPEITYPE
The type and subtype of the input buffer is not one of the types and subtypes
that the service accepts.
TPELIMIT
The caller’s request was not sent because the maximum number of
outstanding requests or connections has been reached.
TPEMATCH
svcname is already advertised for the server but with a function other than
func.
TPEMIB
The administrative request failed. outbuf is updated and returned to the
caller with FML32 fields indicating the cause of the error, as described in
MIB(5) and TM_MIB(5).
TPENOENT
Cannot send to svc because it does not exist or is not the correct type of
service.
TPEOS
An operating system error has occurred.
TPEOTYPE
The type and subtype of the reply are not known to the caller.
TPEPERM
A client cannot join an application because it does not have permission to do
so or because it has not supplied the correct application password.
TPEPROTO
A library routine was called in an improper context.
TPERELEASE
When the TPACK is set and the target is a client from a prior release of the BEA
Tuxedo system that does not support the acknowledgment protocol.
TPERMERR
A resource manager failed to open or close correctly.
TPESVCERR
A service routine encountered an error either in tpreturn() or
tpforward() (for example, bad arguments were passed).
TPESVCFAIL
The service routine sending the caller’s reply called tpreturn() with
TPFAIL. This is an application-level failure.
TPESYSTEM
A BEA Tuxedo system error has occurred.
TPETIME
A timeout occurred.
TPETRAN
The caller cannot be placed in transaction mode.

后来找到对应的错误信息:

TPETRAN
The caller cannot be placed in transaction mode. 调用者不能设置为事务模式

刚开始还不怎么明白什么意思. 后来又个老同事提示. 是不是EJB配置不能设置为事务模式. 果然. 把EJB的事务模式配置为NotSupported. 后来就好了. 就这个问题花了我一天的时间.


顺便贴些更详细的错误信息(个人认为比较有用,在BEA网站上找到的. 现在属于oracle了. 呵呵):

The Jolt Class Library exceptions are listed for each class, constructor, and method listed in the BEA Jolt API Reference.

The following table lists the BEA Jolt and BEA Tuxedo exceptions that you may encounter while running BEA Jolt. Each exception includes a possible cause (or causes) and a recommended action (wherever possible) to help resolve the situation

1. TPEABORT

A transaction could not commit.

Cause

This exception occurs because a transaction could not commit on the server side. This exception may also occur if the JSH performs a message resend for a commit that has timed out due to a previous blocking condition. In BEA Tuxedo, you can get this exception if tpcommit() is called with outstanding replies or open conversation connections.

Action

Check transaction failures on the server side. BEA Jolt clients should resend the request after the transaction problem has been fixed on the server side.

2. TPEBADDESC

This exception should not occur in BEA Jolt.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值