I'm using this xml:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <beans xmlns="urn:jboss:spring-beans:2.0">
|
| <bean id="testBean"
class="org.jboss.test.spring.support.SimpleBean">
| <property name="refBean"><ref
bean="oldBean"/></property>
| </bean>
|
| <bean xmlns="urn:jboss:bean-deployer:2.0" name="oldBean"
class="org.jboss.test.spring.support.OldBean">
| <property
name="javaBeanString"><value>JavaBean</value></property>
| </bean>
|
| </beans>
and I get the following exception:
| org.jboss.xb.binding.JBossXBException: Failed to parse source:
file:/C:/projects/microcontainer/classes/test/spring-int/org/jboss/test/spring/test/InstantiateMixed2TestCase.xml@13,9
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:173)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
| at
org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer.deploy(BasicXMLDeployer.java:135)
| at
org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:212)
| at
org.jboss.test.kernel.junit.MicrocontainerTestDelegate.deploy(MicrocontainerTestDelegate.java:283)
| at
org.jboss.test.kernel.junit.MicrocontainerTestDelegate.setUp(MicrocontainerTestDelegate.java:78)
| at
org.jboss.test.spring.test.TempSpringMicrocontainerTestDelegate.setUp(TempSpringMicrocontainerTestDelegate.java:48)
| at org.jboss.test.AbstractTestSetup.setUp(AbstractTestSetup.java:63)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
| Caused by: java.lang.ClassCastException:
org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding
| at
org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.setParent(DefaultElementHandler.java:109)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endRepeatableParticle(SundayContentHandler.java:730)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:138)
| at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:353)
| at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
| at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:169)
| ... 23 more
When I do it the other way around - defining root element deployment as MC schema, and
using Spring bean inside deployment - it works.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008769#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...