Re: [Chiba-users] Unable to render XForm with linked schema.
Creators discontinued Chiba & founded betterFORM http://betterform.de
Brought to you by:
chibaxforms,
windauer
From: Joern T. <joe...@ch...> - 2007-08-23 23:18:21
|
Hello Mickael, have you tried to turn on logging in log4j.xml? Please set org.chiba.... to 'DEBUG'. Hope this reveals a bit more info. I don't find an obvious problem (assuming your form is in the same directory as the schema) with your form except maybe the space in front of the schema=" simple-form-iinstance.xsd" but i assume that's an editing glitch. Please keep me informed if you find something more or if your problem persists. Joern Mickael Pinheiro wrote: > Hi, > > I have a XForm that I wish to run on Chiba but I encontered a problem. > When the xform is rendered, Chiba could not load the linked schema, the > next error occurs: > > [Error] :-1:-1: schema_reference.4: Failed to read schema document ' > http://10.0.2.14:9240/chiba-web-2.1.0/forms/simple-form.xsd', because 1) > could not find the document; 2) the document could not be read; 3) the > root element of the document is not <xsd:schema>. > > |ERROR org.chiba.xml.xforms.Container : dispatch: exception during event > flow > org.chiba.xml.xforms.exception.XFormsLinkException: could not load > linked schema > at org.chiba.xml.xforms.core.Model.loadLinkedSchemas > (Model.java:1002) > at org.chiba.xml.xforms.core.Model.modelConstruct(Model.java:837) > at org.chiba.xml.xforms.core.Model.performDefault(Model.java:750) > at org.chiba.xml.events.impl.DefaultXMLEventService.dispatch > (DefaultXMLEventService.java:286) > at org.chiba.xml.xforms.Container.dispatch(Container.java:486) > at org.chiba.xml.xforms.Container.dispatch(Container.java:464) > at org.chiba.xml.xforms.Container.initModels (Container.java:704) > at org.chiba.xml.xforms.Container.init(Container.java:327) > at org.chiba.xml.xforms.ChibaBean.init(ChibaBean.java:420) > at org.chiba.web.WebAdapter.init(WebAdapter.java:198) > at org.chiba.web.flux.FluxAdapter.init(FluxAdapter.java:151) > at > org.chiba.web.session.impl.XFormsSessionBase.init(XFormsSessionBase.java:299) > at org.chiba.web.filter.XFormsFilter.doFilter > (XFormsFilter.java:126) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java > :198) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) > at > org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) > at org.apache.catalina.core.StandardPipeline.doInvoke > (StandardPipeline.java:577) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) > at org.apache.catalina.core.StandardPipeline.doInvoke > (StandardPipeline.java:632) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) > at org.apache.catalina.core.ContainerBase.invoke > (ContainerBase.java:1080) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) > at > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) > at org.apache.catalina.core.ContainerBase.invoke > (ContainerBase.java:1080) > at > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:268) > at > com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java > :637) > at > com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568) > at > com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java > :813) > at > com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339) > at > com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java > :261) > at > com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212) > at > com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java > :361) > at > com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265) > at > com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) > > The 3 possible causes for this error that the logs tell me are not valid > because: > 1) If I put the xsd URL on my browser, the xsd is founded. > 2) I have all needed permissions to access the file. > 3) My XSD's root's element is <xsd:schema> > > I tried also to remove the xsd validation by removing the schema > attribute from the instance tag and all works fine. But I want to > validate my instance over the schema. > > I'm using Glassfish AS and Chiba Web 2.1.0, I followed the installation > instructions and copied the xerces implementation that Chiba uses into > the endorsed lib. > Another point is that all of chiba examples are working but neither one > of them uses linked schema but internal schemas instead. > > Thanks in advanced and I wish someone could help me. > > Mickael Pinheiro. > > > The XForms files that used are listed bellow: > > The instance (xml): > > <?xml version="1.0" encoding="UTF-8"?> > <ins:iinstance xmlns:ins="http://www.ipleiria.pt/forms" > > <ins:name /> > <ins:age /> > </ins:iinstance> > > The schema (xsd): > > <?xml version="1.0" encoding="UTF-8"?> > <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace=" > http://www.ipleiria.pt/forms" xmlns:ins="http://www.ipleiria.pt/forms" > > > <simpleType name="field2_type" > > <restriction base="string" > > </restriction> > </simpleType> > > <element name="name" type="ins:field2_type" /> > > <simpleType name="field3_type" > > <restriction base="string" > > </restriction> > </simpleType> > > <element name="age" type="ins:field3_type" /> > > <element name="iinstance"> > <complexType> > <sequence minOccurs="1" maxOccurs="1"> > <element ref="ins:name" /> > <element ref="ins:age" /> > </sequence> > </complexType> > </element> > > </schema> > > The xform (xhtml): > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html xmlns=" http://www.w3.org/1999/xhtml" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events > <http://www.w3.org/2001/xml-events>" > xmlns:ins="http://www.ipleiria.pt/forms" > > <head> > <title>simple-form</title> > > <xforms:model id="imodel" schema=" simple-form-iinstance.xsd"> > <xforms:instance id="iinstance" > src="simple-form-iinstance.xml" /> > <xforms:bind nodeset="instance('iinstance')/ins:name" > id="b_field2" /> > <xforms:bind nodeset="instance('iinstance')/ins:age" > id="b_field3" constraint=".>1" /> > <xforms:submission id="sub4" > ref="instance('iinstance')" > action="http://xformstest.org/cgi-bin/showinstance.sh" > method="post" > > > </xforms:submission> > </xforms:model> > </head> > <body> > <div id="default_id"> > <p> > <span>Name: </span> > <xforms:input id="name" model="imodel" > ref="instance('iinstance')/ins:name" navindex="1" ></xforms:input> > </p> > > <p> > <span>Age: </span> > <xforms:input id="age" model="imodel" > ref="instance('iinstance')/ins:age" navindex="2" ></xforms:input> > </p> > > <p> > <xforms:submit id="submitBtn" submission="sub4" > navindex="3" > > <xforms:label>Submit</xforms:label> > </xforms:submit> > </p> > </div> > </body> > </html> > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Chiba-users mailing list > Chi...@li... > https://lists.sourceforge.net/lists/listinfo/chiba-users |