2011-07-06 61 views
0

我已经搜遍网络寻找这个问题的解决方案,但几乎没有运气。我在Eclipse Helios上使用Hibernate与MS SQL Server,Flex和Java。当我尝试我的Tomcat服务器上运行的MXML文件,我得到以下(略)错误:休眠错误消息

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.flex.remoting.RemotingDestinationExporter#0': Invocation of init method failed; nested exception is flex.messaging.config.ConfigurationException:Cannot add destination with id 'myDestination' to service with id 'remoting-service' because another service with id 'remoting-service' already has a destination with the same id. 

以下是相应的堆栈跟踪:

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) 
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) 
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) 
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 

任何人可以提供一些线索这光?我很乐意提供任何其他信息。谢谢。

+0

什么给你这个错误?它是来自Flash Player的运行时异常吗?或者是其他东西?这看起来不像基于Flex的堆栈跟踪。 – JeffryHouser

+0

我不相信这是一个Flex错误,但一个休眠错误。 –

回答

0

看起来您有多个xml(配置)文件,其中一个文件的ID为remoting-service

org.springframework.beans.factory.BeanCreationException:使用名称'org.springframework.flex.remoting.RemotingDestinationExporter#0'创建bean时出错:init方法的调用失败;嵌套的异常是flex.messaging.config.ConfigurationException:无法将ID为'myDestination'的目的地添加为ID为'remoting-service'的服务,因为 另一个ID为'remoting-service'的服务已经有一个具有相同ID的目的地。

你需要检查你所有的弹簧配置文件,找到&重命名的ID。

+0

这就是我所认为的,但从外观来看,我有以下配置文件:消息配置,代理配置,远程配置,服务配置,柔性配置和休眠配置。这些每个似乎都有一个唯一的ID名称。 –

+0

寻找一个叫做myDestination的目的地的配置......这就是问题所在。 –

+0

这将是远程处理配置,确实有id:'remoting-service'。但是,我没有看到其他配置文件共享相同的ID。 –