Hi,
I just want to know if this is intended behavior (see last paragraph for a description of the behavior) or if I can provide a fix. If you have in your web.xml : <context-param> <param-name>oxf.resources.priority.1</param-name> <param-value>org.orbeon.oxf.resources.FilesystemResourceManagerFactory</param-value> </context-param> <context-param> <param-name>oxf.resources.priority.1.oxf.resources.filesystem.sandbox-directory</param-name> <param-value>C:\workspaces\OrbeonGit\orbeon-forms/src/resources</param-value> </context-param> <context-param> <param-name>oxf.resources.priority.2</param-name> <param-value>org.orbeon.oxf.resources.WebAppResourceManagerFactory</param-value> </context-param> <context-param> <param-name>oxf.resources.priority.2.oxf.resources.webapp.rootdir</param-name> <param-value>/WEB-INF/resources</param-value> </context-param> and in your pipeline an URL serializer: <p:processor name="oxf:url-serializer"> <p:input name="config"> <url>oxf:/apps/xforms-test-suite/test-results/results.xml</url> </p:input> <p:input name="data" href="#test-results" /> </p:processor> You get an exception because org.orbeon.oxf.resources.PriorityResourceManagerImpl.getOutputStream(String) doesn't tries all the resource managers because org.orbeon.oxf.resources.FilesystemResourceManagerImpl.canWrite(String) always returns true but org.orbeon.oxf.resources.FilesystemResourceManagerImpl.getOutputStream(String) throws a wrapped IOException when calling file.createNewFile(). Changing the priorities fixes the problem, but shouldn't the PriorityResourceManagerImpl not try all resource managers before bailing out with an exception? -- Regards, Nick Van den Bleeken -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Nick,
How come FilesystemResourceManagerImpl.getOutputStream(String) throws a wrapped IOException? Is it because the directory you point the FilesystemResourceManagerFactory to is not writable? I would imagine that with your setup, the file URL serializer would write in that directory. Alex On Sun, May 9, 2010 at 7:16 AM, Nick Van den Bleeken <[hidden email]> wrote: > Hi, > > I just want to know if this is intended behavior (see last paragraph for a > description of the behavior) or if I can provide a fix. > > If you have in your web.xml : > > <context-param> > <param-name>oxf.resources.priority.1</param-name> > > <param-value>org.orbeon.oxf.resources.FilesystemResourceManagerFactory</param-value> > </context-param> > <context-param> > > <param-name>oxf.resources.priority.1.oxf.resources.filesystem.sandbox-directory</param-name> > > <param-value>C:\workspaces\OrbeonGit\orbeon-forms/src/resources</param-value> > </context-param> > <context-param> > <param-name>oxf.resources.priority.2</param-name> > > <param-value>org.orbeon.oxf.resources.WebAppResourceManagerFactory</param-value> > </context-param> > <context-param> > > <param-name>oxf.resources.priority.2.oxf.resources.webapp.rootdir</param-name> > <param-value>/WEB-INF/resources</param-value> > </context-param> > > and in your pipeline an URL serializer: > > <p:processor name="oxf:url-serializer"> > <p:input name="config"> > <url>oxf:/apps/xforms-test-suite/test-results/results.xml</url> > </p:input> > <p:input name="data" href="#test-results" /> > </p:processor> > > You get an exception because > org.orbeon.oxf.resources.PriorityResourceManagerImpl.getOutputStream(String) > doesn't tries all the resource managers because > org.orbeon.oxf.resources.FilesystemResourceManagerImpl.canWrite(String) > always returns true but > org.orbeon.oxf.resources.FilesystemResourceManagerImpl.getOutputStream(String) > throws a wrapped IOException when calling file.createNewFile(). Changing the > priorities fixes the problem, but shouldn't the PriorityResourceManagerImpl > not try all resource managers before bailing out with an exception? > > -- > Regards, > > Nick Van den Bleeken > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi alex, The directory doesn't exists in the first resource manager, but does exists in the second one.So I was expecting that the resource would be stored using the second one. This is not a big deal,but it hits me when using a development build,in that case the src/resources directory is the one with the highest priority,but the directory only exists under the compiled webapp ditectory. Regards, On May 11, 2010 3:57 AM, "Alessandro Vernet [via Orbeon Forms (ops-users)]" <[hidden email]> wrote: |
Administrator
|
Hi Nick,
OK, got it. In fact I have the same setup during development, with two file system resource managers of priority 1 and 2. I just push a fix to GitHub for this. You'll let me know if this works for you. For reference, the bug is: http://forge.ow2.org/tracker/index.php?func=detail&aid=315002&group_id=168&atid=350207 Alex On Tue, May 11, 2010 at 11:06 AM, nvdbleek <[hidden email]> wrote: > Hi alex, > > The directory doesn't exists in the first resource manager, but does exists > in the second one.So I was expecting that the resource would be stored using > the second one. > > This is not a big deal,but it hits me when using a development build,in that > case the src/resources directory is the one with the highest priority,but > the directory only exists under the compiled webapp ditectory. > > Regards, > Nick > > On May 11, 2010 3:57 AM, "Alessandro Vernet [via Orbeon Forms (ops-users)]" > <[hidden email]> wrote: > > Nick, > > How come FilesystemResourceManagerImpl.getOutputStream(String) throws > a wrapped IOException? Is it because the directory you point the > FilesystemResourceManagerFactory to is not writable? I would imagine > that with your setup, the file URL serializer would write in that > directory. > > Alex > > On Sun, May 9, 2010 at 7:16 AM, Nick Van den Bleeken <[hidden email]> wrote: > >> Hi, >> >> I just want to know if this is intended behavior (see last paragraph for a >> descript... > >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubs... > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe:... > > View message @ > http://orbeon-forms-ops-users.24843.n4.nabble.com/getOutputStream-in-priority-resource-manger-doesn-t-try-all-resource-managers-tp2164461p2173210.html > > To start a new topic under Orbeon Forms (ops-users), email [hidden email]... > > ________________________________ > View this message in context: Re: getOutputStream() in priority resource > manger doesn't try all resource managers > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com. > > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |