Form Submission not Working

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

Form Submission not Working

tkilimba
Hello all,
am new to Orbeon, I have tried the following code on a GlassFish server instead of Tomcat (as tomcat kept giving me a PermGen space error when runing orbeon!), 


<head>
<title>XForms Bookcast</title>
<xforms:model>
<xforms:instance id="books-instance">
<books xmlns="">
<book>
<title/>
<author/>
<language/>
<link/>
<rating/>
<notes/>
</book>
</books>
</xforms:instance>
<xforms:instance id="languages-instance">
<languages xmlns="">
<language>
<name>English</name>
<value>en</value>
</language>
<language>
<name>French</name>
<value>fr</value>
</language>
<language>
<name>Spanish</name>
<value>es</value>
</language>
</languages>
</xforms:instance>
<xforms:bind ref="book">
<xforms:bind nodeset="title" required="true()"/>
<xforms:bind nodeset="author" required="true()"/>
</xforms:bind>

<xforms:submission id="save-submission"
ref="instance('books-instance')"

</xforms:model>
</head>
<body>
<p>Hello you zebras!</p>
<xforms:group ref="book">
<xforms:input ref="title">
<xforms:label>Title</xforms:label>
</xforms:input>
<br/>
<xforms:input ref="author">
<xforms:label>Author</xforms:label>
</xforms:input>
<xforms:select1 ref="language">
<xforms:label>Language</xforms:label>
<xforms:item>
<xforms:label>Choose One...</xforms:label>
<xforms:value/>
</xforms:item>
<xforms:itemset nodeset="instance('languages-instance')/language">
<xforms:label ref="name"/>
<xforms:value ref="value"/>
</xforms:itemset>
</xforms:select1>
<br/>
<xforms:submit submission="save-submission">
<xforms:label>Save</xforms:label>
</xforms:submit>

</xforms:group>
</body>
</html>

But when I click the subit button, I get the error below:

Access to the webpage was denied

You are not authorized to access the webpage at http://localhost:8180/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml. You may need to sign in.
HTTP Error 403 (Forbidden): The server refused to fulfill the request.
Could anyone please point out where am going wrong? Why can't I view my submitted data? Why is the http error suggesting I may need to sign in? sign into what?
Looking at my log, I see :

2013-10-09 01:49:19,081 INFO  ProcessorService  - /xforms-server - Timing: 70
2013-10-09 01:49:28,365 INFO  ProcessorService  - /xforms-server - Received request
2013-10-09 01:49:28,396 ERROR XFormsServer  - xforms-submit-error - setting throwable {throwable: "
+----------------------------------------------------------------------------------------------------------------------+
|An Error has Occurred                                                                                                 |
|----------------------------------------------------------------------------------------------------------------------|
|Could not initialize class org.orbeon.oxf.resources.handler.HTTPURLConnection                                         |
|----------------------------------------------------------------------------------------------------------------------|
|Application Call Stack                                                                                                |
|----------------------------------------------------------------------------------------------------------------------|
|----------------------------------------------------------------------------------------------------------------------|
|Exception: java.lang.NoClassDefFoundError                                                                             |
|----------------------------------------------------------------------------------------------------------------------|
|org.orbeon.oxf.resources.handler.HTTPHandler       |openConnection                |HTTPHandler.java              |  28|
|java.net.URL                                       |openConnection                |URL.java                      | 969|
|org.orbeon.oxf.util.Connection                     |connect                       |Connection.scala              |  92|
|rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call                          |RegularSubmission.java        |  90|
|rg.orbeon.oxf.xforms.submission.RegularSubmission$1|call                          |RegularSubmission.java        |  71|
|org.orbeon.oxf.xforms.submission.BaseSubmission    |submitCallable                |BaseSubmission.java           | 100|
|org.orbeon.oxf.xforms.submission.RegularSubmission |connect                       |RegularSubmission.java        | 124|
|.orbeon.oxf.xforms.submission.XFormsModelSubmission|doSubmit                      |XFormsModelSubmission.java    | 464|
|.orbeon.oxf.xforms.submission.XFormsModelSubmission|performDefaultAction          |XFormsModelSubmission.java    | 296|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply$mcV$sp                  |Dispatch.scala                | 137|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
|org.orbeon.oxf.xforms.event.Dispatch$              |withEvent$1                   |Dispatch.scala                |  38|
|org.orbeon.oxf.xforms.event.Dispatch$              |dispatchEvent                 |Dispatch.scala                |  72|
|eon.oxf.xforms.control.controls.XFormsSubmitControl|performDefaultAction          |XFormsSubmitControl.scala     |  45|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply$mcV$sp                  |Dispatch.scala                | 137|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
|.oxf.xforms.event.Dispatch$$anonfun$dispatchEvent$1|apply                         |Dispatch.scala                |  73|
|org.orbeon.oxf.xforms.event.Dispatch$              |withEvent$1                   |Dispatch.scala                |  38|
|org.orbeon.oxf.xforms.event.Dispatch$              |dispatchEvent                 |Dispatch.scala                |  72|
|---8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<---|
|org.apache.catalina.core.StandardPipeline          |invoke                        |StandardPipeline.java         | 595|
|org.apache.catalina.core.StandardHostValve         |invoke                        |StandardHostValve.java        | 161|
|org.apache.catalina.connector.CoyoteAdapter        |doService                     |CoyoteAdapter.java            | 331|
|org.apache.catalina.connector.CoyoteAdapter        |service                       |CoyoteAdapter.java            | 231|
|se.v3.services.impl.ContainerMapper$AdapterCallable|call                          |ContainerMapper.java          | 317|
|com.sun.enterprise.v3.services.impl.ContainerMapper|service                       |ContainerMapper.java          | 195|
|com.sun.grizzly.http.ProcessorTask                 |invokeAdapter                 |ProcessorTask.java            | 860|
|com.sun.grizzly.http.ProcessorTask                 |doProcess                     |ProcessorTask.java            | 757|
|com.sun.grizzly.http.ProcessorTask                 |process                       |ProcessorTask.java            |1056|
|com.sun.grizzly.http.DefaultProtocolFilter         |execute                       |DefaultProtocolFilter.java    | 229|
|com.sun.grizzly.DefaultProtocolChain               |executeProtocolFilter         |DefaultProtocolChain.java     | 137|
|com.sun.grizzly.DefaultProtocolChain               |execute                       |DefaultProtocolChain.java     | 104|
|com.sun.grizzly.DefaultProtocolChain               |execute                       |DefaultProtocolChain.java     |  90|
|com.sun.grizzly.http.HttpProtocolChain             |execute                       |HttpProtocolChain.java        |  79|
|com.sun.grizzly.ProtocolChainContextTask           |doCall                        |ProtocolChainContextTask.java |  54|
|com.sun.grizzly.SelectionKeyContextTask            |call                          |SelectionKeyContextTask.java  |  59|
|com.sun.grizzly.ContextTask                        |run                           |ContextTask.java              |  71|
|com.sun.grizzly.util.AbstractThreadPool$Worker     |doWork                        |AbstractThreadPool.java       | 532|
|com.sun.grizzly.util.AbstractThreadPool$Worker     |run                           |AbstractThreadPool.java       | 513|
|java.lang.Thread                                   |run                           |Thread.java                   | 722|
+----------------------------------------------------------------------------------------------------------------------+"}
2013-10-09 01:49:28,411 INFO  ProcessorService  - /xforms-server - Timing: 46

Hope this helps?

Tumaini

--
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: Form Submission not Working

Alessandro  Vernet
Administrator
Hi Tumaini,

tkilimba wrote
Access to the webpage was denied
You are not authorized to access the webpage at *
http://localhost:8180/orbeon/exist/rest/db/orbeon/my-bookcast/books.xml*.
You may need to sign in.
HTTP Error 403 (Forbidden): The server refused to fulfill the request.
Where are you getting this message? Indeed, you should not be allowed to access eXist directly from your browser, but I doubt that this is what you're doing. What page are you trying to access?

And to avoid permgen errors, try increasing its size (see URL below). If avoiding permgen errors were your main reason to use GlassFish, I'd recommend you try again with Tomcat, as it is more lightweight and more widely used.

http://wiki.orbeon.com/forms/doc/developer-guide/admin/performance-tuning#TOC-Permgen-errors

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet