Root element must contain an xsi:type attribute

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Root element must contain an xsi:type attribute

Colin O'Brien
Hi,

I have

<p:config
   xmlns:p='http://www.orbeon.com/oxf/pipeline'
   xmlns:oxf='http://www.orbeon.com/oxf/processors'
   xmlns:xs='http://www.w3.org/2001/XMLSchema'
   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
 >

     <p:processor name="oxf:request">
         <p:input name="config">
             <config>
                 <include>/request/server-name</include>
                 <include>/request/context-path</include>
             </config>
         </p:input>
         <p:output name="data" id="request-stuff"  />
     </p:processor>

and in the browser I'm getting

PresentationServer Error

Type
class org.orbeon.oxf.common.OXFException

Message
Root element must contain an xsi:type attribute

Location
oxf:/test3b2/prologue.xpl

Line
15

Column
53

Stack Trace
org.orbeon.oxf.common.OXFException: Root element must contain an  
xsi:type attribute
         at  
org.orbeon.oxf.processor.serializer.BinaryTextContentHandler.startElemen
t(BinaryTextContentHandler.java:98)
         at  
org.orbeon.oxf.xml.ForwardingContentHandler.startElement(ForwardingConte
ntHandler.java:86)
         at org.orbeon.oxf.xml.SAXStore.startElement(SAXStore.java:353)

Line 15 is the <p:output line.
Anyone have any ideas what's wrong?
Eclipse 3.1
Project started from Studio nightly builds sometime around 3.0Beta2 and  
updated most recently with the relevant files from the Ops nightly  
build dated 10/07
It did work originally but not recently.

Thanks in advance
Colin




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Erik Bruchez
Administrator
Colin,

This error tells you that you are sending an incorrect XML file to the
HTTP or File serializer. The HTTP serializer expects a binary or text
document, see:

   http://www.orbeon.com/ops/doc/processors-serializers-http
   http://www.orbeon.com/ops/doc/reference-formats

The File serializer has been updated at some point to be in sync with
the HTTP serializer. This has introduced an incompatibility. Maybe
this is the problem you are hitting? If so, you may want to check how
you use the File serializer, and put an XML converter before file
serializers.

-Erik

Colin O'Brien wrote:
 > Hi,
 >
 > I have
 >
 > <p:config
 >   xmlns:p='http://www.orbeon.com/oxf/pipeline'
 >   xmlns:oxf='http://www.orbeon.com/oxf/processors'
 >   xmlns:xs='http://www.w3.org/2001/XMLSchema'
 >   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
 >  >
 >
 >     <p:processor name="oxf:request">
 >         <p:input name="config">
 >             <config>
 >                 <include>/request/server-name</include>
 >                 <include>/request/context-path</include>
 >             </config>
 >         </p:input>
 >         <p:output name="data" id="request-stuff"  />
 >     </p:processor>
 >
 > and in the browser I'm getting
 >
 > PresentationServer Error
 >
 > Type
 > class org.orbeon.oxf.common.OXFException
 >
 > Message
 > Root element must contain an xsi:type attribute
 >
 > Location
 > oxf:/test3b2/prologue.xpl
 >
 > Line
 > 15
 >
 > Column
 > 53
 >
 > Stack Trace
 > org.orbeon.oxf.common.OXFException: Root element must contain an
 > xsi:type attribute
 >         at
 > org.orbeon.oxf.processor.serializer.BinaryTextContentHandler.startElemen
 > t(BinaryTextContentHandler.java:98)
 >         at
 > org.orbeon.oxf.xml.ForwardingContentHandler.startElement(ForwardingConte
 > ntHandler.java:86)
 >         at org.orbeon.oxf.xml.SAXStore.startElement(SAXStore.java:353)
 >
 > Line 15 is the <p:output line.
 > Anyone have any ideas what's wrong?
 > Eclipse 3.1
 > Project started from Studio nightly builds sometime around 3.0Beta2 and
 > updated most recently with the relevant files from the Ops nightly
 > build dated 10/07
 > It did work originally but not recently.
 >
 > Thanks in advance
 > Colin




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Colin O'Brien
Hi Erik,

this code is on my other computer so I can't be sure right now, but I  
don't think there is a HTTP or File serializer following this code.

But more importantly, I thought, I am not generating this XML file -  
it's coming out of the Request processor - does that mean there is a  
bug in this processor?
Or if not a bug, an incompatibility that needs to be addressed?

Thanks & regards
Colin

On Oct 7, 2005, at 5:57 AM, Erik Bruchez wrote:

> Colin,
>
> This error tells you that you are sending an incorrect XML file to the
> HTTP or File serializer. The HTTP serializer expects a binary or text
> document, see:
>
>   http://www.orbeon.com/ops/doc/processors-serializers-http
>   http://www.orbeon.com/ops/doc/reference-formats
>
> The File serializer has been updated at some point to be in sync with
> the HTTP serializer. This has introduced an incompatibility. Maybe
> this is the problem you are hitting? If so, you may want to check how
> you use the File serializer, and put an XML converter before file
> serializers.
>
> -Erik
>
> Colin O'Brien wrote:
> > Hi,
> >
> > I have
> >
> > <p:config
> >   xmlns:p='http://www.orbeon.com/oxf/pipeline'
> >   xmlns:oxf='http://www.orbeon.com/oxf/processors'
> >   xmlns:xs='http://www.w3.org/2001/XMLSchema'
> >   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
> >  >
> >
> >     <p:processor name="oxf:request">
> >         <p:input name="config">
> >             <config>
> >                 <include>/request/server-name</include>
> >                 <include>/request/context-path</include>
> >             </config>
> >         </p:input>
> >         <p:output name="data" id="request-stuff"  />
> >     </p:processor>
> >
> > and in the browser I'm getting
> >
> > PresentationServer Error
> >
> > Type
> > class org.orbeon.oxf.common.OXFException
> >
> > Message
> > Root element must contain an xsi:type attribute
> >
> > Location
> > oxf:/test3b2/prologue.xpl
> >
> > Line
> > 15
> >
> > Column
> > 53
> >
> > Stack Trace
> > org.orbeon.oxf.common.OXFException: Root element must contain an
> > xsi:type attribute
> >         at
> >  
> org.orbeon.oxf.processor.serializer.BinaryTextContentHandler.startEleme
> n
> > t(BinaryTextContentHandler.java:98)
> >         at
> >  
> org.orbeon.oxf.xml.ForwardingContentHandler.startElement(ForwardingCont
> e
> > ntHandler.java:86)
> >         at  
> org.orbeon.oxf.xml.SAXStore.startElement(SAXStore.java:353)
> >
> > Line 15 is the <p:output line.
> > Anyone have any ideas what's wrong?
> > Eclipse 3.1
> > Project started from Studio nightly builds sometime around 3.0Beta2  
> and
> > updated most recently with the relevant files from the Ops nightly
> > build dated 10/07
> > It did work originally but not recently.
> >
> > Thanks in advance
> > Colin
>
>
>
> --
> You receive this message as a subscriber of the  
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Erik Bruchez
Administrator
I doubt this is a bug with the Request Generator, but it's hard to be
sure without looking into the actual application. Surely you don't have
only a Request Generator in there? How do you reach the conclusion that
this processor is the cause of the problem?

-Erik

Colin O'Brien wrote:

> Hi Erik,
>
> this code is on my other computer so I can't be sure right now, but I  
> don't think there is a HTTP or File serializer following this code.
>
> But more importantly, I thought, I am not generating this XML file -  
> it's coming out of the Request processor - does that mean there is a  
> bug in this processor?
> Or if not a bug, an incompatibility that needs to be addressed?
>
> Thanks & regards
> Colin
>
> On Oct 7, 2005, at 5:57 AM, Erik Bruchez wrote:
>
>> Colin,
>>
>> This error tells you that you are sending an incorrect XML file to the
>> HTTP or File serializer. The HTTP serializer expects a binary or text
>> document, see:
>>
>>   http://www.orbeon.com/ops/doc/processors-serializers-http
>>   http://www.orbeon.com/ops/doc/reference-formats
>>
>> The File serializer has been updated at some point to be in sync with
>> the HTTP serializer. This has introduced an incompatibility. Maybe
>> this is the problem you are hitting? If so, you may want to check how
>> you use the File serializer, and put an XML converter before file
>> serializers.
>>
>> -Erik
>>
>> Colin O'Brien wrote:
>> > Hi,
>> >
>> > I have
>> >
>> > <p:config
>> >   xmlns:p='http://www.orbeon.com/oxf/pipeline'
>> >   xmlns:oxf='http://www.orbeon.com/oxf/processors'
>> >   xmlns:xs='http://www.w3.org/2001/XMLSchema'
>> >   xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
>> >  >
>> >
>> >     <p:processor name="oxf:request">
>> >         <p:input name="config">
>> >             <config>
>> >                 <include>/request/server-name</include>
>> >                 <include>/request/context-path</include>
>> >             </config>
>> >         </p:input>
>> >         <p:output name="data" id="request-stuff"  />
>> >     </p:processor>
>> >
>> > and in the browser I'm getting
>> >
>> > PresentationServer Error
>> >
>> > Type
>> > class org.orbeon.oxf.common.OXFException
>> >
>> > Message
>> > Root element must contain an xsi:type attribute
>> >
>> > Location
>> > oxf:/test3b2/prologue.xpl
>> >
>> > Line
>> > 15
>> >
>> > Column
>> > 53
>> >
>> > Stack Trace
>> > org.orbeon.oxf.common.OXFException: Root element must contain an
>> > xsi:type attribute
>> >         at
>> >  
>> org.orbeon.oxf.processor.serializer.BinaryTextContentHandler.startEleme n
>> > t(BinaryTextContentHandler.java:98)
>> >         at
>> >  
>> org.orbeon.oxf.xml.ForwardingContentHandler.startElement(ForwardingCont e
>> > ntHandler.java:86)
>> >         at  org.orbeon.oxf.xml.SAXStore.startElement(SAXStore.java:353)
>> >
>> > Line 15 is the <p:output line.
>> > Anyone have any ideas what's wrong?
>> > Eclipse 3.1
>> > Project started from Studio nightly builds sometime around 3.0Beta2  
>> and
>> > updated most recently with the relevant files from the Ops nightly
>> > build dated 10/07
>> > It did work originally but not recently.
>> >
>> > Thanks in advance
>> > Colin
>>
>>
>>
>> --
>> You receive this message as a subscriber of the  
>> [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Colin O'Brien
Hi Erik

On Oct 7, 2005, at 9:14 AM, Erik Bruchez wrote:

> I doubt this is a bug with the Request Generator, but it's hard to be
> sure without looking into the actual application. Surely you don't
> have only a Request Generator in there?

If the Request Generator is the only code, you do not see the error,
that's true.

> How do you reach the conclusion that this processor is the cause of
> the problem?

Because the error is being reported on the Request Generator?
(Means it might not be the cause of _the_ problem, but certainly
implies _a_ problem?)

And basically because the Request Generator is generating the XML -
it's not like I am using XSLT to generate it myself?
So one piece of OPS code is saying it doesn't like what another piece
of OPS code is generating.
Seems to me to imply a compatibility issue.

I always hope that problems are due to a simple mistake I have made.

I'll be back in my office shortly, and I will check what happens next.

Thanks
Colin




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Erik Bruchez
Administrator
Colin O'Brien wrote:

>> How do you reach the conclusion that this processor is the cause of
>> the problem?
>
>
> Because the error is being reported on the Request Generator?
> (Means it might not be the cause of _the_ problem, but certainly implies
> _a_ problem?)
>
> And basically because the Request Generator is generating the XML - it's
> not like I am using XSLT to generate it myself?
> So one piece of OPS code is saying it doesn't like what another piece of
> OPS code is generating.
> Seems to me to imply a compatibility issue.
Let's suppose for a second that you connect the Request generator's data
output directly to the HTTP serializer's data input: you are writing
legal XPL, but you are going to get an exception, because the input of
the HTTP serializer expects a certain document format (namely, text or
binary encapsulated into XML), and it is not getting it.

In this case, this behavior would not be an OPS bug, at least no more
than, say, feeding an XSLT stylesheet to an XML Schema validator ;-) Not
all processors are compatible with each other, but that makes sense, right?

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Colin O'Brien
Hi Erik

sorry if it sounds like I am saying you are doing something wrong -
just trying to get a better handle on what's going on and get past a
problem that I have spent too many hours on due to my own ignorance.

On Oct 7, 2005, at 10:21 AM, Erik Bruchez wrote:

> In this case, this behavior would not be an OPS bug, at least no more
> than, say, feeding an XSLT stylesheet to an XML Schema validator ;-)
> Not all processors are compatible with each other, but that makes
> sense, right?

If the problem is in a serializer though, why is the error being
reported by the Request Generator?
That is certainly confusing.

I saw my problem as being that the Request Generator is producing
"something" and before I get a chance to do anything with it, it
errors.
That does seem to me to be different than me producing XML through an
XSLT.

My pipeline used to work, and I know what the XML from the Request
Generator used to look like, when it used to work.
Now I don't "know" what it looks like.

Now that I check my code again, I see that I am getting the xsi-type
arror now because my code had stopped working and I had inserted a file
serializer to see what the Request Generator was producing.

Thanks again
Colin




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Erik Bruchez
Administrator
Colin O'Brien wrote:

> Hi Erik
>
> sorry if it sounds like I am saying you are doing something wrong - just
> trying to get a better handle on what's going on and get past a problem
> that I have spent too many hours on due to my own ignorance.
>
> On Oct 7, 2005, at 10:21 AM, Erik Bruchez wrote:
>
>> In this case, this behavior would not be an OPS bug, at least no more
>> than, say, feeding an XSLT stylesheet to an XML Schema validator ;-)
>> Not all processors are compatible with each other, but that makes
>> sense, right?
>
>
> If the problem is in a serializer though, why is the error being
> reported by the Request Generator?
> That is certainly confusing.
>
> I saw my problem as being that the Request Generator is producing
> "something" and before I get a chance to do anything with it, it errors.
> That does seem to me to be different than me producing XML through an XSLT.
>
> My pipeline used to work, and I know what the XML from the Request
> Generator used to look like, when it used to work.
> Now I don't "know" what it looks like.
>
> Now that I check my code again, I see that I am getting the xsi-type
> arror now because my code had stopped working and I had inserted a file
> serializer to see what the Request Generator was producing.
So to fix this part, put an XML converter before the File serializer,
for example:

<!-- Convert and serialize to XML -->
<p:processor name="oxf:xml-converter">
     <p:input name="config">
         <config>
             <encoding>utf-8</encoding>
         </config>
     </p:input>
     <p:input name="data" href="#document"/>
     <p:output name="data" id="converted"/>
</p:processor>

<!-- Write out document -->
<p:processor name="oxf:file-serializer">
     <p:input name="data" href="#converted"/>
     <p:input name="config">
         <config>
             <file>C:/TEMP/my-file.xml</file>
         </config>
     </p:config>
</p:processor>

Also, see this comment:

"Request Generator. The Request Generator used to return a constructed
path for the path-info parameter. It now correctly returns the Servlet
API's path info. To get a complete path, use request-path instead."

 From here:

   http://www.orbeon.com/ops/doc/home-changes-30#d257336e1352

This said, in general I would recommend using the "debug" attribute of
XPL instead of saving to a file: this makes for much easier debugging.
You can even use OPS Studio for that purpose without using the XML editor.

-Erik



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Colin O'Brien
Hi Erik

On Oct 7, 2005, at 11:45 AM, Erik Bruchez wrote:

> This said, in general I would recommend using the "debug" attribute of
> XPL instead of saving to a file: this makes for much easier debugging.
> You can even use OPS Studio for that purpose without using the XML
> editor.

I didn't want to distract from our original discussion, but I have
never gotten the debug attribute to do anything.

I did see Alex's email last week, and I immediately went through my
configuration to get it working.
But it didn't.
While file serializer was simple and worked, I didn't worry about it.
Now I will have to.

(Though thanks to your help, I have made a lot of progress in verifying
the workings of my pipeline).

Actually, when I read Alex's email, and your follow-up, it did seem to
me that if the OPS Technologies Reference section of the documentation
could have a section on debugging, that would be very useful, since it
does come up every so often on the list. (I know it's mentioned in the
Intro to XPL, but all the configuration stuff and Studio are not, that
I can recall).

Best regards
Colin




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Root element must contain an xsi:type attribute

Erik Bruchez
Administrator
Colin O'Brien wrote:

 > I didn't want to distract from our original discussion, but I have never
 > gotten the debug attribute to do anything.

Ha, that's no good! You need to have that working to work with XPL,
otherwise your life becomes quite horrible ;-)

 > I did see Alex's email last week, and I immediately went through my
 > configuration to get it working.
 > But it didn't.
 > While file serializer was simple and worked, I didn't worry about it.
 > Now I will have to.
 >
 > (Though thanks to your help, I have made a lot of progress in verifying
 > the workings of my pipeline).
 >
 > Actually, when I read Alex's email, and your follow-up, it did seem to
 > me that if the OPS Technologies Reference section of the documentation
 > could have a section on debugging, that would be very useful, since it
 > does come up every so often on the list. (I know it's mentioned in the
 > Intro to XPL, but all the configuration stuff and Studio are not, that I
 > can recall).

Correct. However, by default, it is supposed to work, i.e. send the
debug information to your Servlet container console. If it doesn't,
you can use different so-called "appenders", which will send events to
things like Chainsaw (a graphical logger that comes with log4j) or
Studio. The best way to go is Studio. You can even use it just for
that purpose.

You do the configuration in config/log4j.xml. I attach the latest CVS
version of this. Try to replace yours with it. You should then see the
result of "debug" attributes logged in your console, but also other
events such as your browser's requests to OPS pages, etc.

-Erik


<!--
    Copyright (C) 2004 Orbeon, Inc.
 
    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU Lesser General Public License as published by the Free Software Foundation; either version
    2.1 of the License, or (at your option) any later version.
 
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See the GNU Lesser General Public License for more details.
 
    The full text of the license is available at http://www.gnu.org/copyleft/lesser.html
-->
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" xmlns="http://jakarta.apache.org/log4j/">

    <!-- This is the standard log appender to the console (System.out) -->
    <appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
        <param name="Target" value="System.out"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ISO8601} %-5p %c %x - %m%n"/>
        </layout>
        <filter class="org.apache.log4j.varia.LevelRangeFilter">
            <param name="LevelMin" value="INFO" />
        </filter>
    </appender>

    <!-- Chainsaw is a graphical appender-->
    <appender name="ChainsawAppender" class="org.apache.log4j.net.SocketAppender">
        <param name="RemoteHost" value="localhost"/>
        <param name="Port" value="4445"/>
        <param name="LocationInfo" value="true"/>
    </appender>
   
    <!-- This is the OPS Studio monitor -->
    <appender name="OPSMonitor" class="org.apache.log4j.net.SocketHubAppender">
      <param name="Port" value="4446"/>
      <param name="LocationInfo" value="true"/>
    </appender>

    <!-- Logging to file, typically used in production -->
    <appender name="FileAppender" class="org.apache.log4j.FileAppender">
        <param name="File" value="l:/OXF/oxf.log"/>
        <param name="Append" value="false" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%t %-5p %c{2} - %m%n"/>
        </layout>
    </appender>

    <!--
    <category name="org.orbeon.oxf.processor.xmldb.XMLDBProcessor">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.xforms.XFormsServer">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.processor.PageFlowControllerProcessor">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.processor.generator.RequestGenerator">
        <priority value="debug"/>
    </category>

    <category name="org.orbeon.oxf.xforms.XFormsContainingDocument">
        <priority value="debug"/>
    </category>
    -->

    <!-- This is the root logger -->
    <root>
        <priority value="info"/>
        <appender-ref ref="ConsoleAppender"/>
        <!--<appender-ref ref="ChainsawAppender"/>-->
        <!--<appender-ref ref="OPSMonitor"/>-->
    </root>

</log4j:configuration>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Debugging

Colin O'Brien
Hi Erik

thanks for getting back to me on this. I did get logging working over
the weekend, and hopefully can give some useful feedback. Alex had said

> 1) configure your log4j.xml file located in resources/config/
> directory by adding the following info:
> a) uncomment the file appender element <appender name="FileAppender">
> and
> specify path to the directory where you want to have log file written
> in the <param name="File element"> element
> b) make sure the <appender-ref ref="FileAppender"/> is uncommented in
> the <root> element

1a - as you will see in what you sent, this element is already
uncommented
So all I needed to do was change from a Windows to a "Unix" path

1b - this is where I had previously overlooked a detail:
As you will see from what you sent, there is no FileAppender in <root>
to uncomment.
When I added it, debugging started working.

Having said that, I still found it easier working on some more code
over the weekend to use the file serializer ;-)
On first sight, debug logging seemed less granular.
But I am sure true debugging will become my preferred option as I get
into complex situations!

Especially if I next get it working in Studio.

(Oh, I see the version of log4j.xml that I had, from Friday's nightly
build, had ConsoleAppender commented out, and now it is not - OK).

Best regards
Colin

On Oct 10, 2005, at 6:07 AM, Erik Bruchez wrote:

> Colin O'Brien wrote:
>
> > I didn't want to distract from our original discussion, but I have
> never
> > gotten the debug attribute to do anything.
>
> Ha, that's no good! You need to have that working to work with XPL,
> otherwise your life becomes quite horrible ;-)
>
> > I did see Alex's email last week, and I immediately went through my
> > configuration to get it working.
> > But it didn't.
> > While file serializer was simple and worked, I didn't worry about it.
> > Now I will have to.
> >
> > (Though thanks to your help, I have made a lot of progress in
> verifying
> > the workings of my pipeline).
> >
> > Actually, when I read Alex's email, and your follow-up, it did seem
> to
> > me that if the OPS Technologies Reference section of the
> documentation
> > could have a section on debugging, that would be very useful, since
> it
> > does come up every so often on the list. (I know it's mentioned in
> the
> > Intro to XPL, but all the configuration stuff and Studio are not,
> that I
> > can recall).
>
> Correct. However, by default, it is supposed to work, i.e. send the
> debug information to your Servlet container console. If it doesn't,
> you can use different so-called "appenders", which will send events to
> things like Chainsaw (a graphical logger that comes with log4j) or
> Studio. The best way to go is Studio. You can even use it just for
> that purpose.
>
> You do the configuration in config/log4j.xml. I attach the latest CVS
> version of this. Try to replace yours with it. You should then see the
> result of "debug" attributes logged in your console, but also other
> events such as your browser's requests to OPS pages, etc.
>
> -Erik
>
> <!--
>     Copyright (C) 2004 Orbeon, Inc.
>
>     This program is free software; you can redistribute it and/or
> modify it under the terms of the
>     GNU Lesser General Public License as published by the Free
> Software Foundation; either version
>     2.1 of the License, or (at your option) any later version.
>
>     This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY;
>     without even the implied warranty of MERCHANTABILITY or FITNESS
> FOR A PARTICULAR PURPOSE.
>     See the GNU Lesser General Public License for more details.
>
>     The full text of the license is available at
> http://www.gnu.org/copyleft/lesser.html
> -->
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> xmlns="http://jakarta.apache.org/log4j/">
>
>     <!-- This is the standard log appender to the console (System.out)
> -->
>     <appender name="ConsoleAppender"
> class="org.apache.log4j.ConsoleAppender">
>         <param name="Target" value="System.out"/>
>         <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" value="%d{ISO8601} %-5p %c
> %x - %m%n"/>
>         </layout>
>         <filter class="org.apache.log4j.varia.LevelRangeFilter">
>             <param name="LevelMin" value="INFO" />
>         </filter>
>     </appender>
>
>     <!-- Chainsaw is a graphical appender-->
>     <appender name="ChainsawAppender"
> class="org.apache.log4j.net.SocketAppender">
>         <param name="RemoteHost" value="localhost"/>
>         <param name="Port" value="4445"/>
>         <param name="LocationInfo" value="true"/>
>     </appender>
>
>     <!-- This is the OPS Studio monitor -->
>     <appender name="OPSMonitor"
> class="org.apache.log4j.net.SocketHubAppender">
>       <param name="Port" value="4446"/>
>       <param name="LocationInfo" value="true"/>
>     </appender>
>
>     <!-- Logging to file, typically used in production -->
>     <appender name="FileAppender"
> class="org.apache.log4j.FileAppender">
>         <param name="File" value="l:/OXF/oxf.log"/>
>         <param name="Append" value="false" />
>         <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" value="%t %-5p %c{2} -
> %m%n"/>
>         </layout>
>     </appender>
>
>     <!--
>     <category name="org.orbeon.oxf.processor.xmldb.XMLDBProcessor">
>         <priority value="debug"/>
>     </category>
>
>     <category name="org.orbeon.oxf.processor.sql.SQLProcessor">
>         <priority value="debug"/>
>     </category>
>
>     <category name="org.orbeon.oxf.xforms.XFormsServer">
>         <priority value="debug"/>
>     </category>
>
>     <category
> name="org.orbeon.oxf.processor.PageFlowControllerProcessor">
>         <priority value="debug"/>
>     </category>
>
>     <category
> name="org.orbeon.oxf.processor.generator.RequestGenerator">
>         <priority value="debug"/>
>     </category>
>
>     <category name="org.orbeon.oxf.xforms.XFormsContainingDocument">
>         <priority value="debug"/>
>     </category>
>     -->
>
>     <!-- This is the root logger -->
>     <root>
>         <priority value="info"/>
>         <appender-ref ref="ConsoleAppender"/>
>         <!--<appender-ref ref="ChainsawAppender"/>-->
>         <!--<appender-ref ref="OPSMonitor"/>-->
>     </root>
>
> </log4j:configuration>
>
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws