[jboss-dev-forums] [Design of AOP on JBoss (Aspects/JBoss)] - Re: Implementing JAXB style parsing for aop-mc-int

kabir.khan@jboss.com do-not-reply at jboss.com
Tue Mar 11 13:56:08 EDT 2008


The input to 
org.jboss.util.xml.JBossEntityResolver.resolveEntity(JBossEntityResolver.java:259)
is:
nsURI	"urn:jboss:aop-beans:1.0"	
baseURI	null	
schemaLocation	"jboss-beans-common_2_0.xsd"	

If I modify the xsd:refefine to

  |    <xsd:redefine schemaLocation="jboss-beans-common_2_0.xsd">
  |       <xsd:simpleType name="classNameType"/>
  |    </xsd:redefine>
  | 
This input becomes:
nsURI	"urn:jboss:aop-beans:1.0"	
baseURI	null	
schemaLocation	"jboss-beans-common_2_0.xsd"	

It makes no difference, the call to resolveEntity() always seems to use the nsURI, which is always urn:jboss:aop-beans:1.0, and so always returns aop-beans_1_0.xsd.

I have turned on trace logging:


  | 0 DEBUG [AspectSimpleAopTestCase] ==== setUp org.jboss.test.microcontainer.beans.test.AspectSimpleAopTestCase ====
  | XXXX turn off enabling trace!!!!
  | 15 DEBUG [KernelFactory] Starting JBoss Kernel construction...
  | 468 DEBUG [KernelFactory] Completed JBoss Kernel construction.  Duration: 437 milliseconds
  | 547 TRACE [SingletonSchemaResolverFactory] Mapped initializer 'urn:jboss:aop-beans:1.0' to 'org.jboss.aop.microcontainer.beans.xml.AOPBeansS
  | chemaInitializer'
  | 547 TRACE [SingletonSchemaResolverFactory] Parse annotations 'urn:jboss:aop-beans:1.0' set to 'false'
  | 547 TRACE [SingletonSchemaResolverFactory] Ignored: 
  | 593 TRACE [SingletonSchemaResolverFactory] Mapped 'urn:jboss:bean-deployer' to 'org.jboss.kernel.plugins.deployment.AbstractKernelDeployment
  | 10'
  | 593 TRACE [SingletonSchemaResolverFactory] Mapped 'urn:jboss:bean-deployer:2.0' to 'org.jboss.kernel.plugins.deployment.AbstractKernelDeploy
  | ment'
  | 609 TRACE [SingletonSchemaResolverFactory] Mapped 'urn:jboss:javabean:1.0' to 'org.jboss.javabean.plugins.jaxb.JavaBean10'
  | 609 TRACE [SingletonSchemaResolverFactory] Mapped 'urn:jboss:javabean:2.0' to 'org.jboss.javabean.plugins.jaxb.JavaBean20'
  | 625 TRACE [SingletonSchemaResolverFactory] Mapped 'urn:jboss:policy:1.0' to 'org.jboss.beans.metadata.plugins.policy.AbstractPolicyMetaData'
  | 640 DEBUG [AspectSimpleAopTestCase] No test specific deployment org/jboss/test/microcontainer/beans/test/AspectSimpleAopTestCase-aop.xml
  | 640 DEBUG [AspectSimpleAopTestCase] Deploying file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/target/tests-classes/org/jb
  | oss/test/microcontainer/beans/test/AspectSimpleAopTestCase.xml
  | 859 DEBUG [SaxJBossXBParser] Created parser: org.apache.xerces.jaxp.SAXParserImpl at 4a63d8, isNamespaceAware: true, isValidating: true, isXInc
  | ludeAware: true
  | 875 DEBUG [SaxJBossXBParser] http://xml.org/sax/features/validation set to: true
  | 875 DEBUG [SaxJBossXBParser] http://xml.org/sax/features/namespaces set to: true
  | 875 DEBUG [SaxJBossXBParser] http://apache.org/xml/features/validation/dynamic set to: true
  | 906 DEBUG [SaxJBossXBParser] Created parser: org.apache.xerces.jaxp.SAXParserImpl at 4a63d8, isNamespaceAware: true, isValidating: true, isXInc
  | ludeAware: true
  | 953 TRACE [DefaultSchemaResolver] Mapped schemaLocation to filename: deployment
  | 953 TRACE [DefaultSchemaResolver] found bindingClass, nsURI=urn:jboss:bean-deployer:2.0, baseURI=null, schemaLocation=deployment, class=clas
  | s org.jboss.kernel.plugins.deployment.AbstractKernelDeployment
  | 1656 TRACE [DefaultSchemaResolver] resolved schema: org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding at 1b60280
  | 1656 TRACE [SundayContentHandler] pushed {urn:jboss:bean-deployer:2.0}deployment=org.jboss.xb.spi.DefaultBeanAdapter at 15093f1, binding=org.jb
  | oss.xb.binding.sunday.unmarshalling.ElementBinding at 120bf2c({urn:jboss:bean-deployer:2.0}deployment, type={urn:jboss:bean-deployer:2.0}deploy
  | mentType)
  | 1687 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}bean in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at e6f
  | 7d2, 9: sequence {urn:jboss:bean-deployer:2.0}classloader sequence {urn:jboss:bean-deployer:2.0}create {urn:jboss:bean-deployer:2.0}start {u
  | rn:jboss:bean-deployer:2.0}stop {urn:jboss:bean-deployer:2.0}destroy sequence sequence ]
  | 1687 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}bean in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 198
  | 36ed, 1: {urn:jboss:bean-deployer:2.0}annotation ]
  | 1687 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}bean in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 394
  | 43f, 1: choice ]
  | 1687 TRACE [ChoiceBinding] startElement {urn:jboss:bean-deployer:2.0}bean in org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45
  | , 3: {urn:jboss:bean-deployer:2.0}bean {urn:jboss:bean-deployer:2.0}beanfactory {urn:jboss:bean-deployer:2.0}lazy ]
  | 1687 TRACE [ChoiceBinding] found {urn:jboss:bean-deployer:2.0}bean in org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45
  | 1687 TRACE [ChoiceBinding] leaving org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45 i=0, pos=0
  | 1687 TRACE [SundayContentHandler] pushed cursor org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1 at 3e0ebb, o=org.jboss.xb.spi.Defau
  | ltBeanAdapter at 15093f1
  | 1687 TRACE [SundayContentHandler]  start repeatable (2): org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 39443f
  | 1687 TRACE [SundayContentHandler] pushed cursor org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1 at da4b71, o=org.jboss.xb.spi.Defau
  | ltBeanAdapter at 15093f1
  | 1687 TRACE [SundayContentHandler] pushed cursor org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding$1 at 18f1d7e, o=org.jboss.xb.spi.Defaul
  | tBeanAdapter at 15093f1
  | 1687 TRACE [SundayContentHandler]  start repeatable (4): org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at d9660d({urn:jboss:bean-dep
  | loyer:2.0}bean, type={urn:jboss:bean-deployer:2.0}beanType)
  | 1703 TRACE [SundayContentHandler] pushed {urn:jboss:bean-deployer:2.0}bean=org.jboss.xb.spi.DefaultBeanAdapter at 153f67e, binding=org.jboss.xb
  | .binding.sunday.unmarshalling.ElementBinding at d9660d({urn:jboss:bean-deployer:2.0}bean, type={urn:jboss:bean-deployer:2.0}beanType)
  | 1703 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}constructor in org.jboss.xb.binding.sunday.unmarshalling.SequenceBind
  | ing at 15bdc50, 16: sequence sequence {urn:jboss:bean-deployer:2.0}classloader {urn:jboss:bean-deployer:2.0}constructor sequence {urn:jboss:bea
  | n-deployer:2.0}create {urn:jboss:bean-deployer:2.0}start {urn:jboss:bean-deployer:2.0}stop {urn:jboss:bean-deployer:2.0}destroy sequence seq
  | uence sequence sequence sequence sequence sequence ]
  | 1703 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}constructor in org.jboss.xb.binding.sunday.unmarshalling.SequenceBind
  | ing at 1dd3812, 1: {urn:jboss:bean-deployer:2.0}alias ]
  | 1703 TRACE [SequenceBinding] startElement {urn:jboss:bean-deployer:2.0}constructor in org.jboss.xb.binding.sunday.unmarshalling.SequenceBind
  | ing at 9e5c73, 1: {urn:jboss:bean-deployer:2.0}annotation ]
  | 1703 TRACE [SequenceBinding] found {urn:jboss:bean-deployer:2.0}constructor in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 15b
  | dc50
  | 1703 TRACE [SundayContentHandler] pushed cursor org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1 at 8c436b, o=org.jboss.xb.spi.Defau
  | ltBeanAdapter at 153f67e
  | 1703 TRACE [SundayContentHandler] pushed {urn:jboss:bean-deployer:2.0}constructor=org.jboss.xb.spi.DefaultBeanAdapter at 1b15692, binding=org.j
  | boss.xb.binding.sunday.unmarshalling.ElementBinding at 1aa9f99({urn:jboss:bean-deployer:2.0}constructor, type={urn:jboss:bean-deployer:2.0}cons
  | tructorType)
  | 1703 TRACE [SundayContentHandler] poped {urn:jboss:bean-deployer:2.0}constructor=[org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at 1
  | aa9f99({urn:jboss:bean-deployer:2.0}constructor, type={urn:jboss:bean-deployer:2.0}constructorType), minOccurs=0, maxOccurs=1]
  | 1703 TRACE [SundayContentHandler] poped org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at 1aa9f99({urn:jboss:bean-deployer:2.0}constr
  | uctor, type={urn:jboss:bean-deployer:2.0}constructorType)
  | 1703 TRACE [SundayContentHandler] poped {urn:jboss:bean-deployer:2.0}bean=[org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at d9660d({
  | urn:jboss:bean-deployer:2.0}bean, type={urn:jboss:bean-deployer:2.0}beanType), minOccurs=0, maxOccurs=unbounded]
  | 1703 TRACE [SundayContentHandler]  end repeatable (4): org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at d9660d({urn:jboss:bean-deplo
  | yer:2.0}bean, type={urn:jboss:bean-deployer:2.0}beanType)
  | 1718 TRACE [SundayContentHandler] poped org.jboss.xb.binding.sunday.unmarshalling.ElementBinding at d9660d({urn:jboss:bean-deployer:2.0}bean, t
  | ype={urn:jboss:bean-deployer:2.0}beanType)
  | 1718 TRACE [SequenceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 39443
  | f, 1: choice ]
  | 1718 TRACE [SundayContentHandler] poped org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45
  | 1718 TRACE [SequenceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at e6f7d
  | 2, 9: sequence {urn:jboss:bean-deployer:2.0}classloader sequence {urn:jboss:bean-deployer:2.0}create {urn:jboss:bean-deployer:2.0}start {urn
  | :jboss:bean-deployer:2.0}stop {urn:jboss:bean-deployer:2.0}destroy sequence sequence ]
  | 1718 TRACE [SequenceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 39443
  | f, 1: choice ]
  | 1718 TRACE [ChoiceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45, 
  | 3: {urn:jboss:bean-deployer:2.0}bean {urn:jboss:bean-deployer:2.0}beanfactory {urn:jboss:bean-deployer:2.0}lazy ]
  | 1718 TRACE [ChoiceBinding] leaving org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding at 1afae45 i=2, pos=-1
  | 1718 TRACE [SequenceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 7f4ec
  | , 1: {urn:jboss:bean-deployer:2.0}alias ]
  | 1718 TRACE [SequenceBinding] startElement {urn:jboss:aop-beans:1.0}aspect in org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding at 60e12
  | 8, 1:  ]
  | 1718 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=null
  | 1718 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 1718 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 1718 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 1718 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 1718 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=null, is=org.xml.sax.InputSou
  | rce at 5e1077
  | 1718 TRACE [DefaultSchemaResolver] found schema InputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=null
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0
  | 2172 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 2172 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 2172 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 2172 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0, i
  | s=org.xml.sax.InputSource at 1f82982
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0
  | 2172 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 2172 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 2172 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 2172 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0, i
  | s=org.xml.sax.InputSource at 154864a
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0
  | 2172 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 2172 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 2172 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 2172 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0, i
  | s=org.xml.sax.InputSource at 1742700
  | 2172 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0
  | 2172 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 2172 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 2187 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 2203 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 2203 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0, i
  | s=org.xml.sax.InputSource at 17431b9
  | 2203 TRACE [DefaultSchemaResolver] getInputSource, nsURI=urn:jboss:aop-beans:1.0, baseURI=null, schemaLocation=urn:jboss:beans-common:2.0
  | 2203 TRACE [JBossEntityResolver] resolvePublicID, publicId=urn:jboss:aop-beans:1.0
  | 2203 TRACE [JBossEntityResolver] Found entity from publicId=urn:jboss:aop-beans:1.0 fileName=aop-beans_1_0.xsd
  | 2203 TRACE [JBossEntityResolver] schema/aop-beans_1_0.xsd maps to URL: file:/C:/cygwin/home/Kabir/sourcecontrol/microcontainer/aop-mc-int/ta
  | rget/classes/schema/aop-beans_1_0.xsd
  | 2203 TRACE [DefaultSchemaResolver] Resolved schema using namespace as publicId and schemaLocation as systemId
  | 

BTW I did not register urn:jboss:beans-common:2.0 anywhere yet, it returns the wrong thing before it gets that far

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4135730#4135730

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4135730



More information about the jboss-dev-forums mailing list