为目标“destinationName”实例化“className”类型的应用程序作用域实例时出错

时间:2013-01-11 00:50:15

标签: java flex

我收到了StackOverflow错误,所以我想在stackoverflow中询问。

Send failed
Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 500: url: 'http://localhost:8080/context/messagebroker/amf'

当你输入messagebroker servlet url:

时会出现这种情况
HTTP 500 - 

javax.servlet.ServletException: java.lang.RuntimeException: Error instantiating application scoped instance of type ''className' for destination destinationName.
    flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:188)
    org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
    java.lang.Thread.run(Thread.java:619)

flex.messaging.config.ConfigurationException: Error instantiating application scoped instance of type 'classNamefor destination 'destinationName'.
    flex.messaging.factories.JavaFactory.createFactoryInstance(JavaFactory.java:143)
    flex.messaging.FactoryDestination.createFactoryInstance(FactoryDestination.java:256)
    flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:239)
    flex.messaging.FactoryDestination.getFactoryInstance(FactoryDestination.java:227)
    flex.messaging.services.remoting.adapters.JavaAdapter.validateInstanceSettings(JavaAdapter.java:556)
    flex.messaging.services.remoting.adapters.JavaAdapter.start(JavaAdapter.java:355)
    flex.messaging.Destination.start(Destination.java:281)
    flex.messaging.services.AbstractService.startDestinations(AbstractService.java:735)
    flex.messaging.services.AbstractService.start(AbstractService.java:176)
    flex.messaging.MessageBroker.startServices(MessageBroker.java:2217)
    flex.messaging.MessageBroker.start(MessageBroker.java:352)
    flex.messaging.AsyncMessageBroker.start(AsyncMessageBroker.java:608)
    flex.messaging.MessageBrokerServlet.init(MessageBrokerServlet.java:153)
    org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
    java.lang.Thread.run(Thread.java:619)

java.lang.StackOverflowError
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)
    className.<init>(className.java:12)

1 个答案:

答案 0 :(得分:0)

但是当我输入这个问题时,我发现它是什么......我对应用程序作用域上声明的全局对象有一个循环引用。这是一个意想不到的复制粘贴......所以当messagebroker/amf发射时,它被卡在循环引用上,一遍又一遍地对同一个对象进行实例化。我要离开帖子以防其他人遇到此错误,因为谷歌没有多大帮助。