[jboss-user] [Microcontainer] - Re: directly injecting a bean in a property
bryan.kearney
do-not-reply at jboss.com
Wed Mar 25 08:06:47 EDT 2009
I noticed I did not comments out the first Muppet bean. Even if I do that:
| <?xml version="1.0" encoding="UTF-8"?>
| <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
| xmlns="urn:jboss:bean-deployer:2.0">
|
| <bean name="QPIDConnection" class="org.apache.qpid.client.AMQConnection">
| <constructor>
| <parameter>amqp://guest:guest@/?brokerlist='tcp://localhost'
| </parameter>
| </constructor>
| </bean>
|
| <bean name="POJOAdapter" class="org.apache.qpid.agent.POJOAdapter" />
| <!-- <bean name="Muppet" class="org.apache.qpid.agent.Muppet" />-->
|
| <bean name="Kermit" class="org.apache.qpid.agent.ManagedObject">
| <property name="name">Muppet</property>
| <property name="managed">
| <!-- <inject bean="Muppet" />-->
| <bean name="Muppet" class="org.apache.qpid.agent.Muppet" />
| </property>
| <property name="adapter">
| <inject bean="POJOAdapter" />
| </property>
| </bean>
|
| <bean name="QMFAgent" class="org.apache.qpid.agent.Agent">
| <property name="label">agent</property>
| <property name="sessionTransacted">false</property>
| <property name="connection">
| <inject bean="QPIDConnection" />
| </property>
| <property name="managedObjects">
| <list elementClass="org.apache.qpid.agent.ManagedObject">
| <inject bean="Kermit" />
| </list>
| </property>
| </bean>
|
| </deployment>
|
I get a stack trace:
| 07:00:52,312 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/home/bkearney/jboss5/server/default/deploy/vdcServer-0.0.1-SNAPSHOT.ear/ state=Not Installed mode=Manual requiredState=Parse
| org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/home/bkearney/jboss5/server/default/deploy/vdcServer-0.0.1-SNAPSHOT.ear/
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:337)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:297)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:269)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:230)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"urn:jboss:bean-deployer:2.0":value, "urn:jboss:bean-deployer:2.0":inject, "urn:jboss:bean-deployer:2.0":value-factory, "urn:jboss:bean-deployer:2.0":collection, "urn:jboss:bean-deployer:2.0":list, "urn:jboss:bean-deployer:2.0":set, "urn:jboss:bean-deployer:2.0":array, "urn:jboss:bean-deployer:2.0":map, "urn:jboss:bean-deployer:2.0":null, "urn:jboss:bean-deployer:2.0":this, WC[##other:"urn:jboss:bean-deployer:2.0"], "urn:jboss:bean-deployer:2.0":annotation}' is expected. @ vfszip:/home/bkearney/jboss5/server/default/deploy/vdcServer-0.0.1-SNAPSHOT.ear/META-INF/jboss-beans.xml[20,72]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
| at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
| at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:239)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:330)
| ... 27 more
| Caused by: org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bean'. One of '{"urn:jboss:bean-deployer:2.0":value, "urn:jboss:bean-deployer:2.0":inject, "urn:jboss:bean-deployer:2.0":value-factory, "urn:jboss:bean-deployer:2.0":collection, "urn:jboss:bean-deployer:2.0":list, "urn:jboss:bean-deployer:2.0":set, "urn:jboss:bean-deployer:2.0":array, "urn:jboss:bean-deployer:2.0":map, "urn:jboss:bean-deployer:2.0":null, "urn:jboss:bean-deployer:2.0":this, WC[##other:"urn:jboss:bean-deployer:2.0"], "urn:jboss:bean-deployer:2.0":annotation}' is expected. @ vfszip:/home/bkearney/jboss5/server/default/deploy/vdcServer-0.0.1-SNAPSHOT.ear/META-INF/jboss-beans.xml[20,72]
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
| at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
| at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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:199)
| ... 35 more
|
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220882#4220882
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220882
More information about the jboss-user
mailing list