Using url-generator for loading local files

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

Using url-generator for loading local files

Ethan Gruber
Hi all,

I just got the latest stable Orbeon release (upgrading from 3.9), and am beginning a new app.  In this app, I want to load local files (local means on the same server filesystem as Orbeon) from a cloned GitHub repo instead of from a REST interface.

I believe I have followed the url-generator examples, but I can't load the local files.  I've been banging my head against this all morning, but I can't figure it out.  It doesn't help that the HTML error page doesn't contain information about the problem like it used to, and even though I turned on logging, there's no log where I expect it.

In order to simplify my test case as much as possible, I created a pipeline in the page-flow which calls my XPL directly.

I have this path: 

<page path-info="/nomisma/test/" view="xpl/load-id.xpl"/>

This is xpl/load-id.xpl:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:oxf="http://www.orbeon.com/oxf/processors">
   
    <!--<p:param type="input" name="config"/>
    <p:param type="output" name="data"/>-->
   
    <p:processor name="oxf:url-generator">
        <p:input name="config">
            <url>file:///usr/local/projects/nomisma-ids/id/augustus.xml</url>
            <content-type>application/xml</content-type>
        </p:input>
        <p:output name="data" id="xml"/>
    </p:processor>
</p:config>

Even if I change the <url> to a HTTP URL for an XML file that I know exists on the web, I'm just getting a generic "An Error Has Occurred."  I expect /nomisma/test/ to just show an XML file in my browser.  Am I missing something?

Thanks,
Ethan

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Using url-generator for loading local files

Alessandro  Vernet
Administrator
Hi Ethan,

Last year we changed the default behavior so details about the errors wouldn't be sent to the browser anymore, and improved logging to the orbeon.log. See the rational for this change on:

http://blog.orbeon.com/2012/06/neat-and-informative-error-reports-with.html

But of course, it doesn't help if you can't see the orbeon.log. I think you should fix that problem first, otherwise you'll end up banging your head against the wall at every problem you find in your way :). The path to the orbeon.log is set in resources/config/log4j.xml and by default is ../logs/orbeon.log, so with Tomcat if you start ./catalina.sh from Tomcat's bin, the log ends up in Tomcat's logs. Maybe you can put an absolute path there?

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/config/log4j.xml

I hope that after this, the error in the log will help. (For one you need to have a "data" output in your pipeline <p:param type="output" name="data"/>, and the URL generator needs to be connected to that output: <p:output name="data" ref="data"/>.)

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Using url-generator for loading local files

Ethan Gruber
I had to fiddle around a bit with the logging settings (including changing the environment to dev), but I got everything working with loading files from the disk into my form.

Thanks!

On Wednesday, June 5, 2013 9:12:29 PM UTC-4, Alessandro Vernet wrote:
Hi Ethan,

Last year we changed the default behavior so details about the errors
wouldn't be sent to the browser anymore, and improved logging to the
orbeon.log. See the rational for this change on:

http://blog.orbeon.com/2012/06/neat-and-informative-error-reports-with.html

But of course, it doesn't help if you can't see the orbeon.log. I think you
should fix that problem first, otherwise you'll end up banging your head
against the wall at every problem you find in your way :). The path to the
orbeon.log is set in resources/config/log4j.xml and by default is
../logs/orbeon.log, so with Tomcat if you start ./catalina.sh from Tomcat's
bin, the log ends up in Tomcat's logs. Maybe you can put an absolute path
there?

https://github.com/orbeon/orbeon-forms/blob/master/src/resources/config/log4j.xml

I hope that after this, the error in the log will help. (For one you need to
have a "data" output in your pipeline <p:param type="output" name="data"/>,
and the URL generator needs to be connected to that output: <p:output
name="data" ref="data"/>.)

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: http://discuss.orbeon.com/Using-url-generator-for-loading-local-files-tp4656862p4656871.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].