Mule 3.3.0 - global property not being resolved from properties file - mule

The global property is not being resolved from properties file, as a result of which mmc deployment fails. Any ides why what could be wrong?
<context:property-placeholder location="airports.properties" />
<global-property name="airportslist" value="${airportslist}" />
Getting the following exception --
com.mulesoft.mmc.agent.v3.dto.DeploymentException: Unexpected exception parsing XML document from URL [file:/arprt/mule-esb-ee/mule-enterprise-standalone-3.3.0/apps/myapp-1.0.0-SNAPSHOT/myapp-config.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'airportslist' (org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException)
at com.mulesoft.mmc.agent.service.impl.ApplicationServiceImpl.deploy(ApplicationServiceImpl.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
airports.properties contains the above mentioned property:
airportslist={'SFO', 'YYZ', 'DFW'}

You do not need to declare a global-property if the property is defined in a properties file and loaded with the context:property-placeholder.
Just remove:
<global-property name="airportslist" value="${airportslist}" />
and use ${airportslist} anywhere you need it in your config.

Related

Error while setting filter on queue in ArtemisMQ

I have a problem trying to configure filter on queue through config for ArtemisMQ (broker.xml):
<address name="foo">
<multicast>
<queue name="filtered_foo">
<durable>true</durable>
<filter string="bar <> 42"/>
</queue>
</multicast>
</address>
Trying start broker I have an error:
[Fatal Error] :207:30: The value of attribute "string" associated with an element type "filter" must not contain the '<' character.
Exception in thread "main" org.xml.sax.SAXParseException; lineNumber: 207; columnNumber: 30; The value of attribute "string" associated with an element type "filter" must not contain the '<' character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
at org.apache.activemq.artemis.utils.XMLUtil.readerToElement(XMLUtil.java:90)
at org.apache.activemq.artemis.utils.XMLUtil.stringToElement(XMLUtil.java:55)
at org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:76)
at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:68)
at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82)
at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97)
at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129)
at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49)
If I set selector on consumer with same filter string it works:
auto consumer = session->createConsumer("foo::filtered_foo", "bar <> 42");
According to Artemis documentation syntax for config must be the same as for selectors. What's the problem?
The issue here is that the filter is being defined in XML which has its own rules for what characters are allowed and what characters are not allowed. Simply put, your XML isn't valid. Try using this:
<filter string="bar <> 42"/>
By escaping the < character the XML should parse correctly.

How to make EclipseLink MOXy ignore AspectJ fields?

How do I make a bytecode-only Field be #XmlTransient?
When a class is woven by AspectJ, its bytecode (but not its source code) receives an extra injected static field:
private static final org.aspectj.lang.JoinPoint$StaticPart ajc$tjp_0;
This extra field is not treated as XmlTransient by MOXy, and causes an Exception when trying to create a JAXBContext:
Caused by: javax.xml.bind.JAXBException:
Exception Description: The class org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl requires a zero argument constructor or a specified factory method. Note that non-static inner classes do not have zero argument constructors and are not supported.
- with linked exception:
[Exception [EclipseLink-50001] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The class org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl requires a zero argument constructor or a specified factory method. Note that non-static inner classes do not have zero argument constructors and are not supported.]
Possible solutions
According to the EclipseLink MOXy example, it seems that I should be able to make this field #XmlTransient by creating a file called eclipselink-oxm.xml with the content below, and place the file within the directory src/main/resources/META-INF. However, this does not work.
How should I proceed here?
eclipselink-oxm.xml
<?xml version="1.0"?>
<xml-bindings
xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="${eclipselink.version}">
<java-types>
<java-type name="se.mithlond.services.organisation.model.address.CategorizedAddress">
<java-attributes>
<xml-transient java-attribute="ajc$tjp_0"/>
</java-attributes>
</java-type>
<!--java-type name="org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl" xml-transient="true" />
<java-type name="org.aspectj.runtime.reflect.JoinPointImpl" xml-transient="true" / -->
</java-types>
</xml-bindings>

How to replace default KAHA DB with Oracle database in ActiveMQ-5.11

We are started using Apache ActiveMQ with default Kaha Database.
Now we are going to use it very effectively to reduce the risk of data loss we wish to replace the default database with Orcale database.How we can do it I tried to change actvemq.xml
<bean id="Orcale-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:*.*.*.*:1521/xe"/>
<property name="username" value="username"/>
<property name="password" value="password"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
Below one is adapter configuration
<persistenceAdapter>
<jdbcPersistenceAdapter dataSource="Orcale-ds"/>
</persistenceAdapter>
But server is not starting so how to configure oracle database with activeMQ.
Error's in log file is below
at org.apache.activemq.console.Main.main(Main.java:115)[activemq.jar:5.11.1]
2015-11-18 16:58:30,251 | ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Cannot create inner bean '(inner bean)#141e366' of type [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] while setting bean property 'persistenceAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#141e366' defined in class path resource [activemq.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.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found | org.apache.activemq.xbean.XBeanBrokerFactory | main
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Cannot create inner bean '(inner bean)#141e366' of type [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] while setting bean property 'persistenceAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#141e366' defined in class path resource [activemq.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.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419)[spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
The error starting with some conversation.
ERROR | Failed to load: class path resource [activemq.xml], reason: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0'
defined in class path resource [activemq.xml]: Cannot create inner bean '(inner bean)#dca1b0' of type [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter]
while setting bean property 'persistenceAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'(inner bean)#dca1b0' defined in class path resource [activemq.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.sql.DataSource' for property 'dataSource'; nested exception is java.lang.IllegalStateException:
Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found |
org.apache.activemq.xbean.XBeanBrokerFactory | main
You have to add bean (with #) not string as -
<jdbcPersistenceAdapter dataSource="#Orcale-ds"/>
It is treating datasrouce as String than a datasource bean

Spring Integration: Splitter exception causes subsequent messages to abort

I have the following configuration, where Im trying to process a list of messages that are split by a splitter. The problem Im facing is that an exception in one of the individual message processing causes all subsequent messages to NOT process. Is there something Im doing wrong?
<int:chain input-channel="exceptionTestChannel">
<int:splitter/>
<int:header-enricher>
<int:error-channel ref="myErrorChannel"/>
</int:header-enricher>
<int:service-activator id="testExceptionService"
ref="testExceptionService" method="throwException"></int:service-activator>
<int:aggregator></int:aggregator>
</int:chain>
<int:channel id="myErrorChannel">
<int:interceptors>
<int:wire-tap channel="loggerChannel" />
</int:interceptors>
</int:channel>
<int:channel id="exceptionTestChannel">
<int:interceptors>
<int:wire-tap channel="loggerChannel" />
</int:interceptors>
</int:channel>
<int:transformer ref="errorUnwrapper" input-channel="myErrorChannel" />
Exception is below
2014-11-12 09:56:30,076 ERROR [com.test.transform.ErrorUnwrapper] - [Payload=org.springframework.integration.MessageHandlingException: com.test.TestServiceException: System Error. Trial test exception][Headers={timestamp=1415814990076, id=a2f50a6d-4de6-3785-e8d8-a5ef9f46c27f}]
org.springframework.integration.MessageHandlingException: com.test.TestServiceException: System Error. Trial test exception
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:76)
at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:67)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:142)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.handler.MessageHandlerChain$1.send(MessageHandlerChain.java:148)
at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:228)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:212)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:177)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:171)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:149)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.handler.MessageHandlerChain$1.send(MessageHandlerChain.java:148)
at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:228)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:212)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:177)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:167)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:149)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.handler.MessageHandlerChain.handleMessageInternal(MessageHandlerChain.java:131)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:115)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:102)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:178)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:149)
at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.handleMessage(SourcePollingChannelAdapter.java:97)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:199)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:51)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:143)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:141)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:273)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:268)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:109)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:218)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:883)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
Caused by: com.test.TestServiceException: System Error. Trial test exception
at com.test.TestServiceException.getSystemErrorInstance(TestServiceException.java:31)
at com.test.TestExceptionService.throwException(TestExceptionService.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:69)
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:122)
at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:44)
at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:258)
at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82)
at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:103)
at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:144)
at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:268)
at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:142)
at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:73)
... 50 more
2014-11-12 09:56:30,076 WARN [org.springframework.integration.channel.MessagePublishingErrorHandler] - Error message was not delivered.
org.springframework.integration.support.channel.ChannelResolutionException: no output-channel or replyChannel header available
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:218)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:177)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:171)
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:149)
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:115)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:102)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:178)
at org.springframework.integration.channel.MessagePublishingErrorHandler.handleError(MessagePublishingErrorHandler.java:83)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:268)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
at java.util.concurrent.FutureTask.run(FutureTask.java:149)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:109)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:218)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:883)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:736)
an exception in one of the individual message processing causes all subsequent messages to NOT process
You should agree with that it is normal behaviour for any single-thread process: when exception is caused somewhere, all other code won't be invoked.
The simple split looks like for (Object o : collection).
To achieve your requirements you need to use ExecutorChannel (or QueueChannel) as an output-channel for <splitter>.
Of course, in this case you should pull that splitter outside of <chain>.
Having that threading shift your messages won't affect each other.
#Artem is correct but another alternative, if you want everything to run on the same thread is to insert a gateway mid-flow.
Just adding an error-channel header like that won't work...
<chain>
<splitter />
<service-activator ref="gw" />
<chain>
<gateway id="gw" request-channel="foo" error-channel="errors"
reply-timeout="0" />
<logging-channel-adapter channel="errors" />
<chain input-channel="foo">
<int:service-activator id="testExceptionService"
ref="testExceptionService" method="throwException"></int:service-activator>
<int:aggregator></int:aggregator>
</chain>
However, dropping splits like that will cause the default aggregator to never complete the group so you need a custom release strategy that will release the group even with missing splits.

no declaration can be found for element 'constructor-arg'

The error when running:
Caused by: org.xml.sax.SAXParseException; lineNumber: 34; columnNumber: 30; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'constructor-arg'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
The source:
<spring:bean id="HandlerA_id" name="HandlerA" class="Handler">
<constructor-arg>
<ref bean="BeanA"></ref>
</constructor-arg>
</spring:bean>
The editor recognizes the constructor-arg tag and gives a summary upon roll-over.
In the config file, xsi:schemaLocation value contains (among others):
"...http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd..."
If you examine the xsd at that URL, you can see that the constructor-arg tag is valid for group beanElements which is one of the complex types allowed in 'bean'
Does the runtime not properly validate XML under some conditions?
Include the spring: prefix in the tag. Same for the ref tag.