Re: [aspectwerkz-user] Define external entities in aop.xml

"Alexandre Vasseur" <[email protected]> Wed, 6 Dec 2006 23:25:54 +0100
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
Thanks
As you can see here we don't have support for dealing with entities.
http://fisheye.codehaus.org/browse/aspectwerkz/aspectwerkz4/src/main/org/codehaus/aspectwerkz/definition/XmlParser.java?r=1.6

Alex

On 12/6/06, balderman <[email protected]> wrote:
>
> Here you are:
> ~~~~~~~~~~~~
> compile-aspects:
>     [java] Exception in thread "main" org.dom4j.DocumentException: null
> Nested
> exception: null
>     [java]     at org.dom4j.io.SAXReader.read(SAXReader.java:358)
>     [java]     at org.dom4j.io.SAXReader.read(SAXReader.java:261)
>     [java]     at
> org.codehaus.aspectwerkz.definition.XmlParser.createDocument(
> XmlParser.java:229)
>     [java]     at
> org.codehaus.aspectwerkz.definition.XmlParser.parseNoCache(Xm
> lParser.java:177)
>     [java]     at
> org.codehaus.aspectwerkz.definition.DefinitionLoader.getDefau
> ltDefinition(DefinitionLoader.java:49)
>     [java]     at
> org.codehaus.aspectwerkz.compiler.AspectWerkzC.compile(Aspect
> WerkzC.java:667)
>     [java]     at
> org.codehaus.aspectwerkz.compiler.AspectWerkzC.main(AspectWer
> kzC.java:721)
>     [java] Nested exception:
>     [java] java.lang.NullPointerException
>     [java]     at
> org.codehaus.aspectwerkz.definition.XmlParser$1.resolveEntity
> (XmlParser.java:269)
>     [java]     at
> org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Un
> known Source)
>     [java]     at
> org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown
>  Source)
>     [java]     at
> org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown S
> ource)
>     [java]     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEnt
> ityReference(Unknown Source)
>     [java]     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
> tContentDispatcher.dispatch(Unknown Source)
>     [java]     at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc
> ument(Unknown Source)
>     [java]     at
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown So
> urce)
>     [java]     at
> org.apache.xerces.parsers.XML11Configuration.parse(Unknown So
> urce)
>     [java]     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>     [java]     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Sou
> rce)
>     [java]     at org.dom4j.io.SAXReader.read(SAXReader.java:339)
>     [java]     at org.dom4j.io.SAXReader.read(SAXReader.java:261)
>     [java]     at
> org.codehaus.aspectwerkz.definition.XmlParser.createDocument(
> XmlParser.java:229)
>     [java]     at
> org.codehaus.aspectwerkz.definition.XmlParser.parseNoCache(Xm
> lParser.java:177)
>     [java]     at
> org.codehaus.aspectwerkz.definition.DefinitionLoader.getDefau
> ltDefinition(DefinitionLoader.java:49)
>     [java]     at
> org.codehaus.aspectwerkz.compiler.AspectWerkzC.compile(Aspect
> WerkzC.java:667)
>     [java]     at
> org.codehaus.aspectwerkz.compiler.AspectWerkzC.main(AspectWer
> kzC.java:721)
>
> ~~~~~~~~~~~~
>
> Alexandre Vasseur wrote:
> >
> > can you provide more detail on the error / stacktrace etc ?
> > Thanks
> > Alex
> >
> > On 12/6/06, balderman <[email protected]> wrote:
> >>
> >> 1) The ENTITY concept that I use is a common way to implement "include"
> >> in
> >> XML. I think dom4j should support it.
> >> 2) We are doing the weaving as a post compilation step.
> >>
> >> Thanks
> >> Avishay
> >>
> >>
> >> Alexandre Vasseur wrote:
> >> >
> >> > not sure we support it
> >> > as a workaround you can perhaps pack each xml in a
> >> > jar/META-INF/aop.xml and we should pick it up automatically if the jar
> >> > is in the classpath (or bundled in the webapp etc - assuming load time
> >> > weaving)
> >> >
> >> > Alex
> >> >
> >> > On 12/3/06, balderman <[email protected]> wrote:
> >> >>
> >> >> Hi
> >> >> I am trying to include external entities in my aop.xml.
> >> >> It looks like:
> >> >> ~~~~~~~~
> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >>
> >> >> <!DOCTYPE aspectwerkz PUBLIC
> >> >>    "-//AspectWerkz//DTD 2.0//EN"
> >> >>    "http://aspectwerkz.codehaus.org/dtd/aspectwerkz_2_0.dtd"  [
> >> >>    <!ENTITY common-asspects SYSTEM "aop-common.xml" >
> >> >>    <!ENTITY debug-asspects SYSTEM "aop-debug.xml" >
> >> >> ]>
> >> >>
> >> >> <aspectwerkz>
> >> >>    <system id="lambada-backend">
> >> >>    <exclude package="com.bmc.idm.cmplmgr.bootstrap.backend.*"/>
> >> >>    &common-asspects;
> >> >>    &debug-asspects;
> >> >>    </system>
> >> >> </aspectwerkz>
> >> >>
> >> >> When I try to run aspectwerkz, dom4j fail to parse it. The xml is
> >> valid
> >> >> [IE
> >> >> can dispaly it well]
> >> >> Any idea?
> >> >>
> >> >> Thanks
> >> >>
> >> >> Avishay
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Define-external-entities-in-aop.xml-tf2746370.html#a7662440
> >> >> Sent from the AspectWerkz - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe from this list please visit:
> >> >>
> >> >>    http://xircles.codehaus.org/manage_email
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe from this list please visit:
> >> >
> >> >     http://xircles.codehaus.org/manage_email
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Define-external-entities-in-aop.xml-tf2746370.html#a7716180
> >> Sent from the AspectWerkz - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list please visit:
> >>
> >>     http://xircles.codehaus.org/manage_email
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Define-external-entities-in-aop.xml-tf2746370.html#a7717676
> Sent from the AspectWerkz - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email