亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsContainer' defined in class path resource [consumer.xml]: Initialization of

WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsContainer' defined in class path resource [consumer.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination': no matching editors or conversion strategy found

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsContainer' defined in class path resource [consumer.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination': no matching editors or conversion strategy found

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)

at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)

at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)

at com.easylab.jms.producer.AppConsumer.main(AppConsumer.java:28)

Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination': no matching editors or conversion strategy found

at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:591)

at org.springframework.beans.AbstractNestablePropertyAccessor.convertForProperty(AbstractNestablePropertyAccessor.java:603)

at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:204)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1527)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)

... 11 more

Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.jms.Destination] for property 'destination': no matching editors or conversion strategy found

at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:302)

at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:576)

... 17 more


正在回答

1 回答

錯誤原因找到是屬性寫錯了

<bean?id="jmsContainer"?class="?org.springframework.jms.listener.DefaultMessageListenerContainer">
????<property?name="connectionFactory"?ref="connectionFactory"/>
????<property?name="destination"?="queueDestination"/>
????
????
?<property?name="destination"?ref="queueDestination"/>這是正確的
????
????<property?name="destination"?ref="queueDestination"/>
????<property?name="messageListener"?ref="consumerMessageListener"/>
</bean>


1 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

WARN | Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsContainer' defined in class path resource [consumer.xml]: Initialization of

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號