There seems to be a limit for the length for the url element value of
the oxf:url-generator processor (surprise surprise). I have a need to do some screen scraping and wanted to use this processor to submit a form request, but it looks like string values longer than (about) 1615 characters exceed some buffer and OF (3.5.0.200703022135) throws an error: 2007-03-04 12:25:30,222 http-80-Processor8 ERROR webapp.ProcessorService null - Exception with no location data java.lang.StackOverflowError at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString (RegularExpression.java:1914) at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString (RegularExpression.java:1914) at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString (RegularExpression.java:1914) at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString (RegularExpression.java:1914) Possibly there are other ways to make OF fetch resources with really long URLs? Optionally maybe there is a way to create an OF workflow that would send a POST request? thanks A. -- 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 |
Administrator
|
Alex,
The error seems to happen while the URL is validated. The pattern defined in url-generator-config.rng is "\s*\S.*\s*". So a URL can contain some whitespace at the beginning, or at the end, start with a non-whitespace character, followed by anything. Certainly, most URLs match this, but it doesn't make much sense to me. I suggest you try change that regexp in url-generator-config.rng to something more reasonable. See if this solves the problem for you. If it does, we can put your change in Orbeon Forms. Alex On 3/4/07, Alexander Zatko <[hidden email]> wrote: > There seems to be a limit for the length for the url element value of > the oxf:url-generator processor (surprise surprise). I have a need to > do some screen scraping and wanted to use this processor to submit a > form request, but it looks like string values longer than (about) > 1615 characters exceed some buffer and OF (3.5.0.200703022135) throws > an error: > > 2007-03-04 12:25:30,222 http-80-Processor8 ERROR > webapp.ProcessorService null - Exception with no location data > java.lang.StackOverflowError > at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString > (RegularExpression.java:1914) > at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString > (RegularExpression.java:1914) > at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString > (RegularExpression.java:1914) > at com.sun.msv.datatype.xsd.regex.RegularExpression.matchString > (RegularExpression.java:1914) > > Possibly there are other ways to make OF fetch resources with really > long URLs? Optionally maybe there is a way to create an OF workflow > that would send a POST request? > > thanks > > A. > > > > -- > 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 > > -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Alex,
Either I do not understand your message or I have not made myself clear. I think the error message OF throws up is misleading. I do not think the problem is in regex matching, but in the length of the URL string. I am attaching a test.xpl that can be run in the XPL Sandbox. When you load (and run) it you will see an error (that I think corresponds to the error I reported in my original post): XForms error: oxf:/ops/xforms/xforms-server.xpl, line 54, column 103, description reading processor output: null null When you remove one "a" from the "arg1" value in the URL element and run the XPL, the error disappears (you will see a 404 Not Found error in the Output area, but that is because I don't have such a resource defined on the server). A. On Mar 7, 2007, at 1:01 AM, Alessandro Vernet wrote: > Alex, > > The error seems to happen while the URL is validated. The pattern > defined in url-generator-config.rng is "\s*\S.*\s*". So a URL can > contain some whitespace at the beginning, or at the end, start with a > non-whitespace character, followed by anything. Certainly, most URLs > match this, but it doesn't make much sense to me. > > I suggest you try change that regexp in url-generator-config.rng to > something more reasonable. See if this solves the problem for you. If > it does, we can put your change in Orbeon Forms. > > Alex > > On 3/4/07, Alexander Zatko <[hidden email]> wrote: >> There seems to be a limit for the length for the url element value of >> the oxf:url-generator processor (surprise surprise). I have a need to >> do some screen scraping and wanted to use this processor to submit a >> form request, but it looks like string values longer than (about) >> 1615 characters exceed some buffer and OF (3.5.0.200703022135) throws >> an error: >> >> 2007-03-04 12:25:30,222 http-80-Processor8 ERROR >> webapp.ProcessorService null - Exception with no location data >> java.lang.StackOverflowError >> at >> com.sun.msv.datatype.xsd.regex.RegularExpression.matchString >> (RegularExpression.java:1914) >> at >> com.sun.msv.datatype.xsd.regex.RegularExpression.matchString >> (RegularExpression.java:1914) >> at >> com.sun.msv.datatype.xsd.regex.RegularExpression.matchString >> (RegularExpression.java:1914) >> at >> com.sun.msv.datatype.xsd.regex.RegularExpression.matchString >> (RegularExpression.java:1914) >> >> Possibly there are other ways to make OF fetch resources with really >> long URLs? Optionally maybe there is a way to create an OF workflow >> that would send a POST request? >> >> thanks >> >> A. >> >> >> >> -- >> You receive this message as a subscriber of the ops- >> [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 >> >> > > > -- > Orbeon Forms - Web 2.0 Forms for the Enterprise > http://www.orbeon.com/ > > > -- > You receive this message as a subscriber of the ops- > [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 test.xpl (2K) Download Attachment |
Administrator
|
On 3/7/07, Alexander Zatko <[hidden email]> wrote:
> Either I do not understand your message or I have not made myself > clear. I think the error message OF throws up is misleading. I do not > think the problem is in regex matching, but in the length of the URL > string. I am attaching a test.xpl that can be run in the XPL Sandbox. Alex, I am sorry for the confusion: my assumption is that you are getting this error not because there is a limit on the length of the URL, but because the code that checks if the URL matches the regexp in the schema is recursive, and creates one recursion per character, which ends up in a StackOverflowError. You might be able to fix this by changing the regexp in the schema, as suggested in my previous message. I tried to run your example in the XPL sandbox, but it correctly returns a 404 both with the version deployed on www.orbeon.com, and with a local version. But since you have this problem locally, you might want to try to change the regexp in schema to see if it solves your problem. (For instance just making that expression .*) Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Alex,
you are right - the issue is limited to my local installation when using the test file, but I succeeded to reproduce this issue also on a different system where the test case runs ok when I make the URL longer. How would I go about changing the regex pattern? I found the .rng file in the ops.jar but after I change the pattern and re-zip the jar the app is throwing an error when trying to start. Seems like I am not able to create a good jar containing the new version of the rng file. Is there a better way to modify the context of the jar file (short of compiling from the source)? Thanks On Mar 8, 2007, at 1:06 AM, Alessandro Vernet wrote: > On 3/7/07, Alexander Zatko <[hidden email]> wrote: >> Either I do not understand your message or I have not made myself >> clear. I think the error message OF throws up is misleading. I do not >> think the problem is in regex matching, but in the length of the URL >> string. I am attaching a test.xpl that can be run in the XPL Sandbox. > > Alex, > > I am sorry for the confusion: my assumption is that you are getting > this error not because there is a limit on the length of the URL, but > because the code that checks if the URL matches the regexp in the > schema is recursive, and creates one recursion per character, which > ends up in a StackOverflowError. You might be able to fix this by > changing the regexp in the schema, as suggested in my previous > message. > > I tried to run your example in the XPL sandbox, but it correctly > returns a 404 both with the version deployed on www.orbeon.com, and > with a local version. But since you have this problem locally, you > might want to try to change the regexp in schema to see if it solves > your problem. (For instance just making that expression .*) > > Alex > -- > Orbeon Forms - Web 2.0 Forms for the Enterprise > http://www.orbeon.com/ > > > -- > You receive this message as a subscriber of the ops- > [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 |
Administrator
|
On 3/10/07, Alexander Zatko <[hidden email]> wrote:
> How would I go about changing the regex pattern? I found the .rng > file in the ops.jar but after I change the pattern and re-zip the jar > the app is throwing an error when trying to start. Seems like I am > not able to create a good jar containing the new version of the rng > file. Is there a better way to modify the context of the jar file > (short of compiling from the source)? Try removing the pattern altogether, replacing: <data type="string"> <param name="pattern">\s*\S.*\s*</param> </data> With: <data type="string"/> This pattern happens in a couple of places. You can place the modified file in your resources directory, but make sure it is under exactly the same path (org\orbeon\oxf\xml\schemas\url-generator-config.rng). The file in the resources directory will take precedence over the one in the jar file, but you might want to delete the one in the jar file just to make sure that your file is being used. Then you can modify the file and see the changes without having to restart your application server, just like with any file in the resources directory. Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Alex, this works great. Thank you.
A. On Mar 12, 2007, at 8:36 PM, Alessandro Vernet wrote: > On 3/10/07, Alexander Zatko <[hidden email]> wrote: >> How would I go about changing the regex pattern? I found the .rng >> file in the ops.jar but after I change the pattern and re-zip the jar >> the app is throwing an error when trying to start. Seems like I am >> not able to create a good jar containing the new version of the rng >> file. Is there a better way to modify the context of the jar file >> (short of compiling from the source)? > > Try removing the pattern altogether, replacing: > > <data type="string"> > <param name="pattern">\s*\S.*\s*</param> > </data> > > With: > > <data type="string"/> > > This pattern happens in a couple of places. You can place the modified > file in your resources directory, but make sure it is under exactly > the same path (org\orbeon\oxf\xml\schemas\url-generator-config.rng). > > The file in the resources directory will take precedence over the one > in the jar file, but you might want to delete the one in the jar file > just to make sure that your file is being used. Then you can modify > the file and see the changes without having to restart your > application server, just like with any file in the resources > directory. > > Alex > -- > Orbeon Forms - Web 2.0 Forms for the Enterprise > http://www.orbeon.com/ > > > -- > You receive this message as a subscriber of the ops- > [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 |
Administrator
|
On 3/15/07, Alexander Zatko <[hidden email]> wrote:
> Alex, this works great. Thank you. Excellent. Then I have checked in this change, so you won't need to have your own version of url-generator-config.rng next time you upgrade Orbeon Forms. Thank you for checking this. For reference, here the corresponding bug entry: http://forge.objectweb.org/tracker/index.php?func=detail&aid=306795&group_id=168&atid=350207 Alex -- Orbeon Forms - Web 2.0 Forms for the Enterprise http://www.orbeon.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 ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
thank you.
On Mar 16, 2007, at 7:26 PM, Alessandro Vernet wrote: > On 3/15/07, Alexander Zatko <[hidden email]> wrote: >> Alex, this works great. Thank you. > > Excellent. Then I have checked in this change, so you won't need to > have your own version of url-generator-config.rng next time you > upgrade Orbeon Forms. Thank you for checking this. For reference, here > the corresponding bug entry: > > http://forge.objectweb.org/tracker/index.php? > func=detail&aid=306795&group_id=168&atid=350207 > > Alex > -- > Orbeon Forms - Web 2.0 Forms for the Enterprise > http://www.orbeon.com/ > > > -- > You receive this message as a subscriber of the ops- > [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 |
Free forum by Nabble | Edit this page |