繁体   English   中英

在glassfish 4上部署XBeanBrokerService时出现异常

[英]I've got an exception when deploying XBeanBrokerService on glassfish 4

我的Web项目activemq-core-5.7.0activemq-core-5.7.0 ,但是当我尝试将其部署到任何服务器(glassfish,tomcat,jboss等)上时,出现下一个错误:

[2014-03-11T12:12:22.013-0500] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=34 _ThreadName=admin-listener(2)] [timeMillis: 1394557942013] [levelValue: 1000] [[
  Exception while deploying the app [ch16] : The lifecycle method [afterPropertiesSet] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet() throws java.lang.Exception] of type [METHOD]
The lifecycle method [afterPropertiesSet] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet() throws java.lang.Exception] of type [METHOD]

任何想法可能是什么问题,或者我怎么解决呢???

谢谢。

根据定义,您只能在PostConstruct()方法上抛出RunTimeException。 文档的链接: https : //docs.oracle.com/javaee/5/api/javax/annotation/PostConstruct.html

您可以使用try&catch-将所需的行为插入catch语句中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM