apache/incubator-seata · error · FrameworkException

Couldn't parser any Remoting info

Error message

Couldn't parser any Remoting info

What it means

Thrown by LocalTCCRemotingParser.getServiceDesc when a bean is processed as a local TCC service but neither its class nor any implemented interface carries the @LocalTCC annotation. The parser builds a RemotingDesc from the annotation; with none found there is no remoting metadata to return, which is treated as a framework error rather than a silent skip.

Source

Thrown at compatible/src/main/java/io/seata/rm/tcc/remoting/parser/LocalTCCRemotingParser.java:63

        Class<?> classType = bean.getClass();
        // check if LocalTCC annotation is marked on the implementation class
        if (classType.isAnnotationPresent(LocalTCC.class)) {
            remotingDesc.setServiceClass(AopProxyUtils.ultimateTargetClass(bean));
            remotingDesc.setServiceClassName(remotingDesc.getServiceClass().getName());
            remotingDesc.setTargetBean(bean);
            return remotingDesc;
        }
        // check if LocalTCC annotation is marked on the interface
        Set<Class<?>> interfaceClasses = ReflectionUtil.getInterfaces(classType);
        for (Class<?> interClass : interfaceClasses) {
            if (interClass.isAnnotationPresent(LocalTCC.class)) {
                remotingDesc.setServiceClassName(interClass.getName());
                remotingDesc.setServiceClass(interClass);
                remotingDesc.setTargetBean(bean);
                return remotingDesc;
            }
        }
        throw new FrameworkException("Couldn't parser any Remoting info");
    }

    @Override
    public boolean isService(Class<?> beanClass) throws FrameworkException {
        return isLocalTCC(beanClass);
    }

    @Override
    public boolean isReference(Object bean, String beanName) {
        return isLocalTCC(bean);
    }

    private boolean isLocalTCC(Object bean) {
        Class<?> classType = bean.getClass();
        return isLocalTCC(classType);
    }

    private boolean isLocalTCC(Class<?> classType) {

View on GitHub (pinned to e01f97c6db)

Solutions

  1. Put @LocalTCC on the TCC interface the bean implements (canonical placement), not only on the impl class.
  2. Verify the scanned bean actually implements that interface (check proxy type: JDK proxy exposes interfaces only).
  3. If the bean is not meant to be TCC, narrow the parser/scanner scope so it is not picked up.
  4. After moving/renaming interfaces, rebuild so reflection metadata is current.

Example fix

// before: annotation only on impl, bean proxied by JDK proxy on the interface
@Service
@LocalTCC
public class OrderTccActionImpl implements OrderTccAction { ... }

// after: annotate the interface
@LocalTCC
public interface OrderTccAction {
    @TwoPhaseBusinessAction(name = "orderTcc", commitMethod = "commit", rollbackMethod = "rollback")
    boolean prepare(BusinessActionContext ctx, Long orderId);
    boolean commit(BusinessActionContext ctx);
    boolean rollback(BusinessActionContext ctx);
}
Defensive patterns

Strategy: validation

Validate before calling

boolean isLocalTccBean(Object bean) {
    Class<?> c = bean.getClass();
    if (c.isAnnotationPresent(LocalTCC.class)) return true;
    for (Class<?> i : c.getInterfaces()) {
        if (i.isAnnotationPresent(LocalTCC.class)) return true;
    }
    return false;
}

Try / catch

try {
    RemotingDesc desc = parser.getServiceDesc(bean, beanName);
} catch (FrameworkException e) {
    if (e.getMessage() != null && e.getMessage().contains("Remoting info")) {
        LOGGER.debug("{} is not a LocalTCC bean; skipping", beanName);
        return null;
    }
    throw e;
}

Prevention

When it happens

Trigger: The parser reaches getServiceDesc for a bean where isService/isReference previously matched (e.g. heuristic bean scanning or another parser delegating), but getInterfaces(classType) yields no @LocalTCC-annotated interface and the class itself lacks it.

Common situations: @LocalTCC placed on the implementation class but the bean is a JDK dynamic proxy implementing only the interface; annotation on a non-implemented interface; scanning picking up unrelated beans after config changes; renaming/moving the TCC interface so it no longer matches.

Related errors


AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14). Data as JSON: /api/errors/345455089208776f. Report an issue: GitHub.