Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SipFactory初始化StackOverflowError异常 #23

Open
handsomestWei opened this issue Dec 26, 2024 · 0 comments
Open

SipFactory初始化StackOverflowError异常 #23

handsomestWei opened this issue Dec 26, 2024 · 0 comments

Comments

@handsomestWei
Copy link
Contributor

使用场景

配置sip.enabled=true启用sip服务,media_server表重建清空数据。

异常日志

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sip.SipFactory]: Factory method 'createSipFactory' threw exception; nested exception is java.lang.StackOverflowError
at com.fastbee.sip.service.impl.MediaServerServiceImpl.selectMediaServerBytenantId(MediaServerServiceImpl.java:77)

问题代码

表数据为空时,出现死循环

public MediaServer selectMediaServerBytenantId(Long tenantId) {
    List<MediaServer> list = mediaServerMapper.selectMediaServerBytenantId(tenantId);
    if (list.size() == 0) {
        return selectMediaServerBytenantId(1L);
    } 
    ... ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant