OrbeonXFormsFilter never forwards to Orbeon

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

OrbeonXFormsFilter never forwards to Orbeon

Karolin Heiss
Hello

I am working with the latest version of Orbeon (20091123) and Liferay
in separate deployment. A custom portlet should show my xforms data.

With "oxf.xforms.renderer.document" I can set the xforms content to
need to be rendered by Orbeon. So I set this in the doView() of my
portlet:

  public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {
      String xform = readFileAsString("C:\\TEMP\\testxforms.jsp");
     
request.setAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBUTE_NAME,
xform);      
    }

OrbeonXFormsFilter gets called and  "oxf.xforms.renderer.document" is
set, but OrbeonXFormsFilter never forwads my content to render because
responseWrapper.getContent() is null (OrbeonXFormsFilter line 100)

I wonder when and how the content should get filled?
I tried a hack and directly set the content in the OrbeonXFormsFilter
which actually works fine:


            if
(httpRequest.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME) != null) {
              String contentFromAtr =
requestWrapper.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME).toString();
              if (contentFromAtr != null) {
                responseWrapper.getWriter().write(contentFromAtr);
               
httpRequest.setAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME,
contentFromAtr);
              }
            }

Can anybody tell me how not to edit the OrbeonXFormsFilter make the
content be set?

Thanks
Karolin



--
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
Reply | Threaded
Open this post in threaded view
|

Orbeon/Liferay/JBoss: Conflicts with ANTLR library

Karolin Heiss
Hello

I am working with Orbeon (nightly build 20091123), Liferay 5.2.3 and
JBoss 4.2.2.

Login or logout in Liferay portal cause error:

2009-11-30 18:35:35,734 INFO  [org.exist.xmldb.DatabaseImpl] Collection
/db/orbeon/xforms/cache not found
2009-11-30 18:35:35,734 ERROR [STDERR] Can't find/access AST Node
typeorg.exist.xquery.parser.XQueryAST
2009-11-30 18:35:35,734 ERROR
[org.orbeon.oxf.webapp.OrbeonSessionListener] Session Listener -
Exception when running session destruction processor.
java.lang.ClassCastException: antlr.CommonToken cannot be cast to
antlr.Token

I tried to find out which version of ANTLR is suitable for all of
Orbeon, JBoss and Liferay, but always got errors.

Hope anybody can help me to solve the conflict?
Do I have to do what is recommended for the installation of Orbeon
Forms on Oracle WebLogic?


Thanks
Karolin



--
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
Reply | Threaded
Open this post in threaded view
|

Re: OrbeonXFormsFilter never forwards to Orbeon

Erik Bruchez-3
In reply to this post by Karolin Heiss
Karolin,

There was recently new code put in place to prevent exceptions when
the forwarding servlet had already read the request body.

I reproduced this and fixed the filter:

Bug:
http://forge.ow2.org/tracker/index.php?func=detail&aid=314525&group_id=168&atid=350207

Commit:
http://github.com/orbeon/orbeon-forms/commit/3a485986b75d1c1cbc9e6a186febdec33e3952aa

Please let us know if that helps.

-Erik

On Mon, Nov 30, 2009 at 5:14 AM, Karolin Krieg <[hidden email]> wrote:

> Hello
>
> I am working with the latest version of Orbeon (20091123) and Liferay
> in separate deployment. A custom portlet should show my xforms data.
>
> With "oxf.xforms.renderer.document" I can set the xforms content to
> need to be rendered by Orbeon. So I set this in the doView() of my
> portlet:
>
>  public void doView(RenderRequest request, RenderResponse response)
> throws PortletException, IOException {
>      String xform = readFileAsString("C:\\TEMP\\testxforms.jsp");
>
> request.setAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBUTE_NAME,
> xform);
>    }
>
> OrbeonXFormsFilter gets called and  "oxf.xforms.renderer.document" is
> set, but OrbeonXFormsFilter never forwads my content to render because
> responseWrapper.getContent() is null (OrbeonXFormsFilter line 100)
>
> I wonder when and how the content should get filled?
> I tried a hack and directly set the content in the OrbeonXFormsFilter
> which actually works fine:
>
>
>            if
> (httpRequest.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME) != null) {
>              String contentFromAtr =
> requestWrapper.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME).toString();
>              if (contentFromAtr != null) {
>                responseWrapper.getWriter().write(contentFromAtr);
>
> httpRequest.setAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME,
> contentFromAtr);
>              }
>            }
>
> Can anybody tell me how not to edit the OrbeonXFormsFilter make the
> content be set?
>
> Thanks
> Karolin
>
>
>
> --
> 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
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Antw: Re: OrbeonXFormsFilter never forwards to Orbeon

Karolin Heiss
Hey Erik,
super, it rocks :-)

Thank you for your quick answer!

Karolin


>>> Erik Bruchez <[hidden email]> 12/1/2009 4:46  >>>
Karolin,

There was recently new code put in place to prevent exceptions when
the forwarding servlet had already read the request body.

I reproduced this and fixed the filter:

Bug:
http://forge.ow2.org/tracker/index.php?func=detail&aid=314525&group_id=168&atid=350207


Commit:
http://github.com/orbeon/orbeon-forms/commit/3a485986b75d1c1cbc9e6a186febdec33e3952aa


Please let us know if that helps.

-Erik

On Mon, Nov 30, 2009 at 5:14 AM, Karolin Krieg
<[hidden email]> wrote:
> Hello
>
> I am working with the latest version of Orbeon (20091123) and
Liferay

> in separate deployment. A custom portlet should show my xforms data.
>
> With "oxf.xforms.renderer.document" I can set the xforms content to
> need to be rendered by Orbeon. So I set this in the doView() of my
> portlet:
>
>  public void doView(RenderRequest request, RenderResponse response)
> throws PortletException, IOException {
>      String xform = readFileAsString("C:\\TEMP\\testxforms.jsp");
>
>
request.setAttribute(OrbeonXFormsFilter.RENDERER_DOCUMENT_ATTRIBUTE_NAME,
> xform);
>    }
>
> OrbeonXFormsFilter gets called and  "oxf.xforms.renderer.document"
is
> set, but OrbeonXFormsFilter never forwads my content to render
because
> responseWrapper.getContent() is null (OrbeonXFormsFilter line 100)
>
> I wonder when and how the content should get filled?
> I tried a hack and directly set the content in the
OrbeonXFormsFilter
> which actually works fine:
>
>
>            if
> (httpRequest.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME) != null)
{
>              String contentFromAtr =
>
requestWrapper.getAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME).toString();

>              if (contentFromAtr != null) {
>                responseWrapper.getWriter().write(contentFromAtr);
>
> httpRequest.setAttribute(RENDERER_DOCUMENT_ATTRIBUTE_NAME,
> contentFromAtr);
>              }
>            }
>
> Can anybody tell me how not to edit the OrbeonXFormsFilter make the
> content be set?
>
> Thanks
> Karolin
>
>
>
> --
> 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 
>
>


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Orbeon/Liferay/JBoss: Conflicts with ANTLR library

Erik Bruchez-3
In reply to this post by Karolin Heiss
Karolin,

At some point, we re-rooted the antlr package to avoid that kind of
issues. But right now that is not the case.

You could try to deploy eXist in a separate WAR, and configure the
Orbeon properties for state handling and persistence to point to that
separate WAR.

Other than that possibly some magic JBoss and/or Liferay deployment
property might do the trick, but I am not sure which one!

-Erik

On Mon, Nov 30, 2009 at 9:51 AM, Karolin Krieg <[hidden email]> wrote:

> Hello
>
> I am working with Orbeon (nightly build 20091123), Liferay 5.2.3 and
> JBoss 4.2.2.
>
> Login or logout in Liferay portal cause error:
>
> 2009-11-30 18:35:35,734 INFO  [org.exist.xmldb.DatabaseImpl] Collection
> /db/orbeon/xforms/cache not found
> 2009-11-30 18:35:35,734 ERROR [STDERR] Can't find/access AST Node
> typeorg.exist.xquery.parser.XQueryAST
> 2009-11-30 18:35:35,734 ERROR
> [org.orbeon.oxf.webapp.OrbeonSessionListener] Session Listener -
> Exception when running session destruction processor.
> java.lang.ClassCastException: antlr.CommonToken cannot be cast to
> antlr.Token
>
> I tried to find out which version of ANTLR is suitable for all of
> Orbeon, JBoss and Liferay, but always got errors.
>
> Hope anybody can help me to solve the conflict?
> Do I have to do what is recommended for the installation of Orbeon
> Forms on Oracle WebLogic?
>
>
> Thanks
> Karolin
>
>
>
> --
> 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
>
>


--
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