Posted by
smaran on
Mar 07, 2011; 12:45pm
URL: https://discuss.orbeon.com/p-param-type-input-name-instance-tp3338458p3338885.html
Hi,
After changing the file I am unable to publish the forms.It shows error log as below
2011-03-07 18:09:34,781 INFO ProcessorService - /xforms-server - Received request
2011-03-07 18:09:34,890 INFO ProcessorService - /fr/service/custom/orbeon/builder/toolbox - Received request
2011-03-07 18:09:35,031 INFO ProcessorService - /fr/service/oracle/crud/orbeon/library/form/form.xhtml - Received request
2011-03-07 18:09:35,187 ERROR XSLTTransformer - Error at line 86 of oxf:/apps/fr/persistence/oracle/crud.xpl:
An empty sequence is not allowed as the value of variable $matcher-groups
2011-03-07 18:09:35,187 ERROR ProcessorService - Exception at line 86 of oxf:/apps/fr/persistence/oracle/crud.xpl
; SystemID: oxf:/apps/fr/persistence/oracle/crud.xpl; Line#: 86; Column#: -1
org.orbeon.saxon.trans.XPathException: An empty sequence is not allowed as the value of variable $matcher-groups
at org.orbeon.saxon.expr.CardinalityCheckingIterator.typeError(CardinalityCheckingIterator.java:120)
at org.orbeon.saxon.expr.CardinalityCheckingIterator.<init>(CardinalityCheckingIterator.java:47)
at org.orbeon.saxon.expr.CardinalityChecker.iterate(CardinalityChecker.java:171)
at org.orbeon.saxon.value.MemoClosure.iterate(MemoClosure.java:89)
at org.orbeon.saxon.value.Value.getIterator(Value.java:202)
Modification I had done for crud.xpl
<p:input name="matcher-groups" href="#matcher-groups"/>
<p:input name="instance" href="#instance"/>
<p:input name="request" href="#request"/>
<p:input name="data"><dummy/></p:input>
<xsl:copy-of select="doc('input:instance')"/>
</document>
<timestamp><xsl:value-of select="current-dateTime()"/></timestamp>
<username><xsl:value-of select="$request/headers/header[name = 'orbeon-username']/value"/></username>
<username><xsl:value-of select="$request/remote-user"/></username>
<roles><xsl:value-of select="$request/headers/header[name = 'orbeon-roles']/value"/></roles>
<app><xsl:value-of select="$matcher-groups[1]"/></app>
<form><xsl:value-of select="$matcher-groups[2]"/></form>
Regards,
Smaran
-----Original Message-----
From: Florian Schmitt [mailto:
[hidden email]]
Sent: Monday, March 07, 2011 5:28 PM
To:
[hidden email]
Subject: [ops-users] Re: RE: Re: RE: Re: <p:param type="input" name="instance"/>
Smaran,
> So far all right, but although there is an authenticated user in the
> context '/ orbeon' in Tomcat, 'Form Runner' or 'Form Builder' shows no
> reference to the user, or when you create or modify forms, data is not
> saved user in the 'USERNAME' table 'ORBEON_FORM_DATA', which remains
> empty although there is an authenticated user.
it seems that crud.xpl doesn't use the container authentication data; this may be a bug.
If i understand crud.xpl correctly, the username value is set in line 82 of /src/resources/apps/fr/perssistence/oracle/crud.xpl or line 64 of /src/resources/apps/fr/perssistence/mysql/crud.xpl, respectively. In both cases, the output of /request/headers/header[name = 'orbeon-username']/value is used, assuming that this header field contains the user name.
But the name of the authenticated user isn't availbe in /request/headers/header[name = 'orbeon-username']/value. The path should be /request/remote-user, i assume. AFAIK, "orbeon-username"
appears only in the both crud.xpl files, but nowhere else in the sources. The docs of the request generator don't mention a header field named "orbeon-username" or "orbeon-roles" or "orbeon-datasource":
http://www.orbeon.com/orbeon/doc/processors-generators-request#d30e37You could try to change crud.xpl manually to use the name of the authenticated user as username; i've attached a patch. Since i don't use SQL persistence, i wasn't able to test i myselft, and i don't know which other effects may be caused by this chance.
HTH
florian
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.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