[Deployers on JBoss (Deployers/JBoss)] - Re: Is META-INF in the classpath?
by alesj
"alex.loubyansky(a)jboss.com" wrote : Maybe the namespace in the included.xml?
Like this?
| <jboss-test xmlns="urn:jboss:include:1.0">test2</jboss-test>
|
Then I get this
| Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Attribute is not bound: element owner {urn:jboss:include:1.0}jboss-test, attribute {http://www.w3.org/XML/1998/namespace}base
| at org.jboss.xb.binding.sunday.unmarshalling.AttributesHandler.attributes(AttributesHandler.java:58)
| at org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler.attributes(DefaultElementHandler.java:65)
| at org.jboss.xb.builder.runtime.BeanHandler.startParticle(BeanHandler.java:124)
| at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:632)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
| at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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.xinclude.XIncludeHandler.handleIncludeElement(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)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157279#4157279
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157279
16 years, 3 months
[Deployers on JBoss (Deployers/JBoss)] - Re: Is META-INF in the classpath?
by alesj
I've now have this:
| <jboss-include xmlns="urn:jboss:include:1.0" name="mymetadata" xmlns:xi="http://www.w3.org/2001/XInclude">
|
| <jboss-test>test1</jboss-test>
| <xi:include href="included.xml"/>
|
| </jboss-include>
|
where included.xml is
| <?xml version="1.0" encoding="UTF-8"?>
| <jboss-test>test2</jboss-test>
|
If I comment out include in the first xml, I'm fine with parsing.
But if I use it, then I get this:
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: jboss-test not found as a child of {urn:jboss:include:1.0}jboss-include
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:201)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:181)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:190)
| at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:164)
| 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.parse(AbstractVFSParsingDeployer.java:185)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:336)
|
Where my metadata is:
| @JBossXmlSchema(namespace="urn:jboss:include:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
| @XmlRootElement(name="jboss-include", namespace = "urn:jboss:include:1.0")
| @XmlType(
| name="includeType",
| namespace="urn:jboss:include:1.0",
| propOrder={"others"}
| )
| public class IncludeMetaData implements Serializable
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = 1L;
|
| private String name;
| private List<TestMetaData> others;
|
| public String getName()
| {
| return name;
| }
|
| @XmlAttribute(required = true)
| public void setName(String name)
| {
| this.name = name;
| }
|
| public List<TestMetaData> getOthers()
| {
| return others;
| }
|
| @XmlElement(name = "jboss-test")
| public void setOthers(List<TestMetaData> others)
| {
| this.others = others;
| }
| }
|
| @JBossXmlSchema(namespace="urn:jboss:mytest:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
| @XmlRootElement(name="jboss-test")
| public class TestMetaData implements Serializable
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = 1L;
| private String name;
|
| public String getName()
| {
| return name;
| }
|
| @XmlAttribute(required = true)
| public void setName(String name)
| {
| this.name = name;
| }
| }
|
What am I missing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157274#4157274
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157274
16 years, 3 months