Dear Friends,
We are trying to connect to Oracle via Tomcat and are facing few problems. Our Configuration is as follows: Web.xml ============================================ <resource-ref> <description>DataSource</description> <res-ref-name>jdbc/oracle</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> ============================================ properties_local.xml ============================================ <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <property as="xs:anyURI" name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/oracle"/> </properties> ============================================ server.xml ============================================ <Context path="/OrbeonPE" reloadable="true" docBase="/home/abhishek/workspace/OrbeonPE" workDir="/home/abhishek/workspace/OrbeonPE/work"> <Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" removeAbandoned="true" removeAbandonedTimeout="30" maxActive="100" maxIdle="30" maxWait="10000" username="orbeon" password="orbeon" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@our_server:1521:our_instance"/> </Context> ================================================================== We are able to create and save forms using Form Builder but when we try to publish them, a dialog box pops up with the following error: There was an error during form publishing. The Following are the contents of Orbeon.log: ============================================================ 2010-08-13 17:47:52,045 ERROR SQLProcessor - PreparedStatement: declare last_last_modified timestamp; last_created timestamp; last_deleted char(1); begin select max(last_modified), max(created) into last_last_modified, last_created from ( ( select max(last_modified) last_modified, max(created) created from orbeon_form_definition where app = ? and form = ? ) union all ( select null last_modified, null created from dual ) ) ; if last_last_modified is not null then select deleted into last_deleted from orbeon_form_definition where app = ? and form = ? and last_modified = last_last_modified ; end if; if last_deleted is null or last_deleted = 'Y' then last_created := ? ; end if; insert into orbeon_form_definition (created, last_modified, username, app, form, deleted, xml) values ( last_created, ? , ? , ? , ? , 'N', XMLType( ? ) ); end; 2010-08-13 17:47:52,046 INFO DatabaseContext - Rolling back JDBC connection for datasource: jdbc/oracle. 2010-08-13 17:47:52,049 ERROR ProcessorService - Exception at java.sql.SQLException: ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00216: invalid character 244 (0xF4) Error at line 73 ORA-06512: at "SYS.XMLTYPE", line 254 ORA-06512: at line 1 ORA-06512: at line 32 ============================================================ Form Runner is able to save the form data in orbeon_form_data table, so we guess that Runner is not having any problem in database access. Why, then, is it not able to publish forms created by Builder. Kindly help us in this regard. Thanks & Regards, Seema Shukla |
Define your connection in context.xml in Tomcat:
<Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@ip:1521:SID" validationQuery="select 1 from dual" testOnBorrow="true" username="X" password="X" maxActive="X" maxIdle="X" amxWait="X" />
replace jdbc/oracle with whatever name you want your connection jdbc/X
replace ip and SID in url
replace all Xs
Then in your xpl files reference this resource but do not put jdbc/oracle, just put oracle or whatever name you put in name attribute in Resource. <sql:datasource>oracle</sql:datasource>
Hope this helps. Contact information below.
PS - make sure you have oracle driver in tomcat common/lib
Brian Steuhl home office: 732-961-3187 From: Seema Shukla <[hidden email]> To: [hidden email] Sent: Fri, August 13, 2010 8:28:47 AM Subject: [ops-users] Problem in connecting to Oracle Dear Friends, We are trying to connect to Oracle via Tomcat and are facing few problems. Our Configuration is as follows: Web.xml ============================================ <resource-ref> <description>DataSource</description> <res-ref-name>jdbc/oracle</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> ============================================ properties_local.xml ============================================ <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <property as="xs:anyURI" name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/oracle"/> </properties> ============================================ server.xml ============================================ <Context path="/OrbeonPE" reloadable="true" docBase="/home/abhishek/workspace/OrbeonPE" workDir="/home/abhishek/workspace/OrbeonPE/work"> <!-- <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" driverClassName="com.mysql.jdbc.Driver" poolPreparedStatements="true" username="our_username" password="our_password" url="jdbc:mysql://localhost:3306/orbeon"/> --> <Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" removeAbandoned="true" removeAbandonedTimeout="30" maxActive="100" maxIdle="30" maxWait="10000" username="orbeon" password="orbeon" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@our_server:1521:our_instance"/> </Context> ================================================================== We are able to create and save forms using Form Builder but when we try to publish them, a dialog box pops up with the following error: There was an error during form publishing. The Following are the contents of Orbeon.log: ============================================================ 2010-08-13 17:47:52,045 ERROR SQLProcessor - PreparedStatement: declare last_last_modified timestamp; last_created timestamp; last_deleted char(1); begin select max(last_modified), max(created) into last_last_modified, last_created from ( ( select max(last_modified) last_modified, max(created) created from orbeon_form_definition where app = ? and form = ? ) union all ( select null last_modified, null created from dual ) ) ; if last_last_modified is not null then select deleted into last_deleted from orbeon_form_definition where app = ? and form = ? and last_modified = last_last_modified ; end if; if last_deleted is null or last_deleted = 'Y' then last_created := ? ; end if; insert into orbeon_form_definition (created, last_modified, username, app, form, deleted, xml) values ( last_created, ? , ? , ? , ? , 'N', XMLType( ? ) ); end; 2010-08-13 17:47:52,046 INFO DatabaseContext - Rolling back JDBC connection for datasource: jdbc/oracle. 2010-08-13 17:47:52,049 ERROR ProcessorService - Exception at java.sql.SQLException: ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00216: invalid character 244 (0xF4) Error at line 73 ORA-06512: at "SYS.XMLTYPE", line 254 ORA-06512: at line 1 ORA-06512: at line 32 ============================================================ Form Runner is able to save the form data in orbeon_form_data table, so we guess that Runner is not having any problem in database access. Why, then, is it not able to publish forms created by Builder. Kindly help us in this regard. Thanks & Regards, Seema Shukla -- View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-in-connecting-to-Oracle-tp2324122p2324122.html Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 |
In reply to this post by Seema Shukla
Sorry - did not see the entire email and I see you are able to connnect but have different issue - read the title of email and made assumption. Sorry. Do not use form builder. Create forms without formbuilder.
Brian Steuhl home office: 732-961-3187 From: Seema Shukla <[hidden email]> To: [hidden email] Sent: Fri, August 13, 2010 8:28:47 AM Subject: [ops-users] Problem in connecting to Oracle Dear Friends, We are trying to connect to Oracle via Tomcat and are facing few problems. Our Configuration is as follows: Web.xml ============================================ <resource-ref> <description>DataSource</description> <res-ref-name>jdbc/oracle</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> ============================================ properties_local.xml ============================================ <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <property as="xs:anyURI" name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" value="/fr/service/oracle"/> </properties> ============================================ server.xml ============================================ <Context path="/OrbeonPE" reloadable="true" docBase="/home/abhishek/workspace/OrbeonPE" workDir="/home/abhishek/workspace/OrbeonPE/work"> <!-- <Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource" initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" driverClassName="com.mysql.jdbc.Driver" poolPreparedStatements="true" username="our_username" password="our_password" url="jdbc:mysql://localhost:3306/orbeon"/> --> <Resource name="jdbc/oracle" auth="Container" type="javax.sql.DataSource" removeAbandoned="true" removeAbandonedTimeout="30" maxActive="100" maxIdle="30" maxWait="10000" username="orbeon" password="orbeon" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@our_server:1521:our_instance"/> </Context> ================================================================== We are able to create and save forms using Form Builder but when we try to publish them, a dialog box pops up with the following error: There was an error during form publishing. The Following are the contents of Orbeon.log: ============================================================ 2010-08-13 17:47:52,045 ERROR SQLProcessor - PreparedStatement: declare last_last_modified timestamp; last_created timestamp; last_deleted char(1); begin select max(last_modified), max(created) into last_last_modified, last_created from ( ( select max(last_modified) last_modified, max(created) created from orbeon_form_definition where app = ? and form = ? ) union all ( select null last_modified, null created from dual ) ) ; if last_last_modified is not null then select deleted into last_deleted from orbeon_form_definition where app = ? and form = ? and last_modified = last_last_modified ; end if; if last_deleted is null or last_deleted = 'Y' then last_created := ? ; end if; insert into orbeon_form_definition (created, last_modified, username, app, form, deleted, xml) values ( last_created, ? , ? , ? , ? , 'N', XMLType( ? ) ); end; 2010-08-13 17:47:52,046 INFO DatabaseContext - Rolling back JDBC connection for datasource: jdbc/oracle. 2010-08-13 17:47:52,049 ERROR ProcessorService - Exception at java.sql.SQLException: ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00216: invalid character 244 (0xF4) Error at line 73 ORA-06512: at "SYS.XMLTYPE", line 254 ORA-06512: at line 1 ORA-06512: at line 32 ============================================================ Form Runner is able to save the form data in orbeon_form_data table, so we guess that Runner is not having any problem in database access. Why, then, is it not able to publish forms created by Builder. Kindly help us in this regard. Thanks & Regards, Seema Shukla -- View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-in-connecting-to-Oracle-tp2324122p2324122.html Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 |
Administrator
|
In reply to this post by Seema Shukla
This point to an invalid character (244) in some XML. Can you use a
tool to access Oracle directly and try to examine the content of the inserted XML? Does it in fact have that character? -Erik On Fri, Aug 13, 2010 at 5:28 AM, Seema Shukla <[hidden email]> wrote: > > Dear Friends, > We are trying to connect to Oracle via Tomcat and are > facing few problems. Our Configuration is as follows: > > Web.xml > ============================================ > > <resource-ref> > <description>DataSource</description> > <res-ref-name>jdbc/oracle</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > ============================================ > > properties_local.xml > ============================================ > > <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:oxf="http://www.orbeon.com/oxf/processors"> > <property as="xs:anyURI" > name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/> > <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" > value="/fr/service/oracle"/> > </properties> > > ============================================ > > server.xml > ============================================ > <Context path="/OrbeonPE" reloadable="true" > docBase="/home/abhishek/workspace/OrbeonPE" > workDir="/home/abhishek/workspace/OrbeonPE/work"> > > <!-- <Resource name="jdbc/mysql" auth="Container" > type="javax.sql.DataSource" > initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" > driverClassName="com.mysql.jdbc.Driver" > poolPreparedStatements="true" > username="our_username" > password="our_password" > url="jdbc:mysql://localhost:3306/orbeon"/> > --> > <Resource name="jdbc/oracle" auth="Container" > type="javax.sql.DataSource" removeAbandoned="true" > removeAbandonedTimeout="30" maxActive="100" > maxIdle="30" maxWait="10000" > username="orbeon" > password="orbeon" > driverClassName="oracle.jdbc.OracleDriver" > url="jdbc:oracle:thin:@our_server:1521:our_instance"/> > </Context> > ================================================================== > > We are able to create and save forms using Form Builder but when we try to > publish them, a dialog box pops up with the following error: There was an > error during form publishing. > > > The Following are the contents of Orbeon.log: > ============================================================ > > 2010-08-13 17:47:52,045 ERROR SQLProcessor - PreparedStatement: > > declare > last_last_modified > timestamp; > last_created timestamp; > last_deleted char(1); > begin > > select > max(last_modified), max(created) into last_last_modified, last_created > from ( > ( > select > max(last_modified) last_modified, max(created) created > from > orbeon_form_definition > where > app = ? > and form = > ? > ) union all ( select > null last_modified, null created from dual ) > ) ; > > if last_last_modified is > not null then > select deleted into > last_deleted > from > orbeon_form_definition > where > app = ? > and form = ? > and > last_modified = last_last_modified ; > end if; > > if last_deleted is null > or last_deleted = 'Y' then > last_created := ? ; > end if; > > insert > into > orbeon_form_definition > (created, > last_modified, username, app, form, deleted, > xml) > values ( > last_created, > ? , > ? , > ? , > ? , > > 'N', > > XMLType( ? ) > > > > ); > end; > > 2010-08-13 17:47:52,046 INFO DatabaseContext - Rolling back JDBC > connection for datasource: jdbc/oracle. > 2010-08-13 17:47:52,049 ERROR ProcessorService - Exception at > java.sql.SQLException: ORA-31011: XML parsing failed > ORA-19202: Error occurred in XML processing > LPX-00216: invalid character 244 (0xF4) > Error at line 73 > ORA-06512: at "SYS.XMLTYPE", line 254 > ORA-06512: at line 1 > ORA-06512: at line 32 > > ============================================================ > > Form Runner is able to save the form data in orbeon_form_data table, so we > guess that Runner is not having any problem in database access. Why, then, > is it not able to publish forms created by Builder. > Kindly help us in this regard. > > Thanks & Regards, > Seema Shukla > > > > > -- > View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-in-connecting-to-Oracle-tp2324122p2324122.html > Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 > > -- 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 |
Administrator
|
Seema,
Following up on Erik's response, are you just getting this error when publishing forms? Have you been using any special character in your form? Can you reproduce this by: 1. Opening the form you can't deploy in Form Builder. 2. Go to Advanced / Edit Source, copy the XML. 3. Create a new form. 4. Go to Advanced / Edit Source, paste the XML you copied earlier. 5. Publish this new form. If this fails, could you save the XML in a new file, and attach it to your response, so we can try this here? Alex On Fri, Aug 20, 2010 at 6:51 PM, Erik Bruchez <[hidden email]> wrote: > This point to an invalid character (244) in some XML. Can you use a > tool to access Oracle directly and try to examine the content of the > inserted XML? Does it in fact have that character? > > -Erik > > On Fri, Aug 13, 2010 at 5:28 AM, Seema Shukla <[hidden email]> wrote: >> >> Dear Friends, >> We are trying to connect to Oracle via Tomcat and are >> facing few problems. Our Configuration is as follows: >> >> Web.xml >> ============================================ >> >> <resource-ref> >> <description>DataSource</description> >> <res-ref-name>jdbc/oracle</res-ref-name> >> <res-type>javax.sql.DataSource</res-type> >> <res-auth>Container</res-auth> >> </resource-ref> >> >> ============================================ >> >> properties_local.xml >> ============================================ >> >> <properties xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:oxf="http://www.orbeon.com/oxf/processors"> >> <property as="xs:anyURI" >> name="oxf.fr.persistence.service.oracle.datasource" value="oracle"/> >> <property as="xs:anyURI" name="oxf.fr.persistence.app.uri.*.*.*" >> value="/fr/service/oracle"/> >> </properties> >> >> ============================================ >> >> server.xml >> ============================================ >> <Context path="/OrbeonPE" reloadable="true" >> docBase="/home/abhishek/workspace/OrbeonPE" >> workDir="/home/abhishek/workspace/OrbeonPE/work"> >> >> <!-- <Resource name="jdbc/mysql" auth="Container" >> type="javax.sql.DataSource" >> initialSize="3" maxActive="10" maxIdle="20" maxWait="30000" >> driverClassName="com.mysql.jdbc.Driver" >> poolPreparedStatements="true" >> username="our_username" >> password="our_password" >> url="jdbc:mysql://localhost:3306/orbeon"/> >> --> >> <Resource name="jdbc/oracle" auth="Container" >> type="javax.sql.DataSource" removeAbandoned="true" >> removeAbandonedTimeout="30" maxActive="100" >> maxIdle="30" maxWait="10000" >> username="orbeon" >> password="orbeon" >> driverClassName="oracle.jdbc.OracleDriver" >> url="jdbc:oracle:thin:@our_server:1521:our_instance"/> >> </Context> >> ================================================================== >> >> We are able to create and save forms using Form Builder but when we try to >> publish them, a dialog box pops up with the following error: There was an >> error during form publishing. >> >> >> The Following are the contents of Orbeon.log: >> ============================================================ >> >> 2010-08-13 17:47:52,045 ERROR SQLProcessor - PreparedStatement: >> >> declare >> last_last_modified >> timestamp; >> last_created timestamp; >> last_deleted char(1); >> begin >> >> select >> max(last_modified), max(created) into last_last_modified, last_created >> from ( >> ( >> select >> max(last_modified) last_modified, max(created) created >> from >> orbeon_form_definition >> where >> app = ? >> and form = >> ? >> ) union all ( select >> null last_modified, null created from dual ) >> ) ; >> >> if last_last_modified is >> not null then >> select deleted into >> last_deleted >> from >> orbeon_form_definition >> where >> app = ? >> and form = ? >> and >> last_modified = last_last_modified ; >> end if; >> >> if last_deleted is null >> or last_deleted = 'Y' then >> last_created := ? ; >> end if; >> >> insert >> into >> orbeon_form_definition >> (created, >> last_modified, username, app, form, deleted, >> xml) >> values ( >> last_created, >> ? , >> ? , >> ? , >> ? , >> >> 'N', >> >> XMLType( ? ) >> >> >> >> ); >> end; >> >> 2010-08-13 17:47:52,046 INFO DatabaseContext - Rolling back JDBC >> connection for datasource: jdbc/oracle. >> 2010-08-13 17:47:52,049 ERROR ProcessorService - Exception at >> java.sql.SQLException: ORA-31011: XML parsing failed >> ORA-19202: Error occurred in XML processing >> LPX-00216: invalid character 244 (0xF4) >> Error at line 73 >> ORA-06512: at "SYS.XMLTYPE", line 254 >> ORA-06512: at line 1 >> ORA-06512: at line 32 >> >> ============================================================ >> >> Form Runner is able to save the form data in orbeon_form_data table, so we >> guess that Runner is not having any problem in database access. Why, then, >> is it not able to publish forms created by Builder. >> Kindly help us in this regard. >> >> Thanks & Regards, >> Seema Shukla >> >> >> >> >> -- >> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Problem-in-connecting-to-Oracle-tp2324122p2324122.html >> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.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 >> >> > > > -- > 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 > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |