I'm running Orbeon 4.3.1 PE with Mysql setup. Everytime I go to save a form I receive an error dialog relating to the DB. Further inspection of Orbeon's log shows that the SQL prepared statement is referencing the 'username' column twice. Has anyone had this error before? Thanks!!
***Server.xml*** <Context path="/forms" docBase="forms" reloadable="false" override="true" allowLinking="true"> <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="orbeon" password="orbeon" url="jdbc:mysql://10.4.125.35:3306/orbeon?useUnicode=true&characterEncoding=UTF8"/> <Valve className="org.apache.catalina.authenticator.BasicAuthenticator" changeSessionIdOnAuthentication="false"/> </Context> ***Properties-local.xml*** <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/> <property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="mysql"/> ***Web.xml*** <resource-ref> <description>DataSource</description> <res-ref-name>jdbc/mysql</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> ***Orbeon.log*** 2013-09-03 15:13:20,875 INFO ProcessorService - /fr/service/mysql/crud/orbeon/builder/data/df4bf3675b3894d54ba8bff66f2d9860e8e275b6/data.xml - Received req uest 2013-09-03 15:13:20,986 ERROR SQLProcessor - PreparedStatement: insert into orbeon_form_data ( created, last_modified, username, app, form, document_id, deleted , xml, username, groupname ) values ( ? , ? , ? , ? , ? , ? , 'N' , ? , ? , ? ) 2013-09-03 15:13:20,989 ERROR PageFlowControllerProcessor - error caught {controller: "oxf:/apps/fr/page-flow.xml", method: "PUT", path: "/fr/service/mysql/ crud/orbeon/builder/data/df4bf3675b3894d54ba8bff66f2d9860e8e275b6/data.xml"} 2013-09-03 15:13:21,097 ERROR PageFlowControllerProcessor - +----------------------------------------------------------------------------------------------------------------------+ |An Error has Occurred | |----------------------------------------------------------------------------------------------------------------------| |Column 'username' specified twice | |----------------------------------------------------------------------------------------------------------------------| |Application Call Stack | |----------------------------------------------------------------------------------------------------------------------| |oxf:/apps/fr/page-flow.xml |reading page model data output| 55| |······················································································································| |element=<service path="/fr/service/mysql/crud/([^/]+/[^/]+/(form/[^/]+|(data|draft)/([^/]+/[^/]+)?))" model="persisten| |model =persistence/mysql/crud.xpl | |----------------------------------------------------------------------------------------------------------------------| |oxf:/apps/fr/persistence/mysql/crud.xpl |executing processor | 414| |······················································································································| |element=<p:processor name="oxf:sql">[...]</p:processor> | |name ={http://www.orbeon.com/oxf/processors}sql | |----------------------------------------------------------------------------------------------------------------------| |----------------------------------------------------------------------------------------------------------------------| |Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException | |----------------------------------------------------------------------------------------------------------------------| |sun.reflect.NativeConstructorAccessorImpl |newInstance0 |NativeConstructorAccessorImpl.| | |sun.reflect.NativeConstructorAccessorImpl |newInstance |NativeConstructorAccessorImpl.| 57| |sun.reflect.DelegatingConstructorAccessorImpl |newInstance |DelegatingConstructorAccessorI| 45| |java.lang.reflect.Constructor |newInstance |Constructor.java | 526| |com.mysql.jdbc.Util |handleNewInstance |Util.java | 411| |com.mysql.jdbc.Util |getInstance |Util.java | 386| |com.mysql.jdbc.SQLError |createSQLException |SQLError.java |1054| |com.mysql.jdbc.MysqlIO |checkErrorPacket |MysqlIO.java |4190| |com.mysql.jdbc.MysqlIO |checkErrorPacket |MysqlIO.java |4122| |com.mysql.jdbc.MysqlIO |sendCommand |MysqlIO.java |2570| |com.mysql.jdbc.MysqlIO |sqlQueryDirect |MysqlIO.java |2731| |com.mysql.jdbc.ConnectionImpl |execSQL |ConnectionImpl.java |2818| |com.mysql.jdbc.PreparedStatement |executeInternal |PreparedStatement.java |2157| |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2460| |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2377| |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2361| |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| |eon.oxf.processor.sql.interpreters.QueryInterpreter|end |QueryInterpreter.java | 604| -- 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]. |
Administrator
|
I haven't yet reproduced but if it happens it's a bug. Entered an issue:
https://github.com/orbeon/orbeon-forms/issues/1246 -Erik On Tue, Sep 3, 2013 at 2:31 PM, <[hidden email]> wrote: > I'm running Orbeon 4.3.1 PE with Mysql setup. Everytime I go to save a form I receive an error dialog relating to the DB. Further inspection of Orbeon's log shows that the SQL prepared statement is referencing the 'username' column twice. Has anyone had this error before? Thanks!! > > ***Server.xml*** > > <Context path="/forms" docBase="forms" reloadable="false" override="true" allowLinking="true"> > > <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="orbeon" > password="orbeon" > url="jdbc:mysql://10.4.125.35:3306/orbeon?useUnicode=true&characterEncoding=UTF8"/> > > > <Valve className="org.apache.catalina.authenticator.BasicAuthenticator" > changeSessionIdOnAuthentication="false"/> > > </Context> > > > > ***Properties-local.xml*** > > <property as="xs:string" name="oxf.fr.persistence.provider.*.*.*" value="mysql"/> > <property as="xs:string" name="oxf.fr.persistence.mysql.datasource" value="mysql"/> > > > ***Web.xml*** > > <resource-ref> > <description>DataSource</description> > <res-ref-name>jdbc/mysql</res-ref-name> > <res-type>javax.sql.DataSource</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > > > ***Orbeon.log*** > > 2013-09-03 15:13:20,875 INFO ProcessorService - /fr/service/mysql/crud/orbeon/builder/data/df4bf3675b3894d54ba8bff66f2d9860e8e275b6/data.xml - Received req > uest > 2013-09-03 15:13:20,986 ERROR SQLProcessor - PreparedStatement: > > insert into orbeon_form_data > ( > created, > last_modified, > username, > app, form, > document_id, > deleted > , xml, username, groupname > ) > values > ( > ? , > ? , > ? , > ? , > ? , > ? , > 'N' > > , ? > , ? > , ? > ) > > 2013-09-03 15:13:20,989 ERROR PageFlowControllerProcessor - error caught {controller: "oxf:/apps/fr/page-flow.xml", method: "PUT", path: "/fr/service/mysql/ > crud/orbeon/builder/data/df4bf3675b3894d54ba8bff66f2d9860e8e275b6/data.xml"} > 2013-09-03 15:13:21,097 ERROR PageFlowControllerProcessor - > +----------------------------------------------------------------------------------------------------------------------+ > |An Error has Occurred | > |----------------------------------------------------------------------------------------------------------------------| > |Column 'username' specified twice | > |----------------------------------------------------------------------------------------------------------------------| > |Application Call Stack | > |----------------------------------------------------------------------------------------------------------------------| > |oxf:/apps/fr/page-flow.xml |reading page model data output| 55| > |······················································································································| > |element=<service path="/fr/service/mysql/crud/([^/]+/[^/]+/(form/[^/]+|(data|draft)/([^/]+/[^/]+)?))" model="persisten| > |model =persistence/mysql/crud.xpl | > |----------------------------------------------------------------------------------------------------------------------| > |oxf:/apps/fr/persistence/mysql/crud.xpl |executing processor | 414| > |······················································································································| > |element=<p:processor name="oxf:sql">[...]</p:processor> | > |name ={http://www.orbeon.com/oxf/processors}sql | > |----------------------------------------------------------------------------------------------------------------------| > |----------------------------------------------------------------------------------------------------------------------| > |Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException | > |----------------------------------------------------------------------------------------------------------------------| > |sun.reflect.NativeConstructorAccessorImpl |newInstance0 |NativeConstructorAccessorImpl.| | > |sun.reflect.NativeConstructorAccessorImpl |newInstance |NativeConstructorAccessorImpl.| 57| > |sun.reflect.DelegatingConstructorAccessorImpl |newInstance |DelegatingConstructorAccessorI| 45| > |java.lang.reflect.Constructor |newInstance |Constructor.java | 526| > |com.mysql.jdbc.Util |handleNewInstance |Util.java | 411| > |com.mysql.jdbc.Util |getInstance |Util.java | 386| > |com.mysql.jdbc.SQLError |createSQLException |SQLError.java |1054| > |com.mysql.jdbc.MysqlIO |checkErrorPacket |MysqlIO.java |4190| > |com.mysql.jdbc.MysqlIO |checkErrorPacket |MysqlIO.java |4122| > |com.mysql.jdbc.MysqlIO |sendCommand |MysqlIO.java |2570| > |com.mysql.jdbc.MysqlIO |sqlQueryDirect |MysqlIO.java |2731| > |com.mysql.jdbc.ConnectionImpl |execSQL |ConnectionImpl.java |2818| > |com.mysql.jdbc.PreparedStatement |executeInternal |PreparedStatement.java |2157| > |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2460| > |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2377| > |com.mysql.jdbc.PreparedStatement |executeUpdate |PreparedStatement.java |2361| > |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| > |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| > |apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement|executeUpdate |DelegatingPreparedStatement.ja| 105| > |eon.oxf.processor.sql.interpreters.QueryInterpreter|end |QueryInterpreter.java | 604| > > -- > 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]. -- 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]. |
Administrator
|
In reply to this post by jcarfagno0702
You can end up in this situation if you set the oxf.fr.support-autosave property to true, but not the oxf.fr.support-owner-group to true. Would this be your case? If it is, could you try setting oxf.fr.support-owner-group to true as well, also making sure your MySQL schema has been updated with both the "owner group" and "autosave" changes for MySQL, documented on these 2 pages:
http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/access-control#TOC-Permissions-for-owner-group-members http://wiki.orbeon.com/forms/doc/developer-guide/form-runner/autosave#TOC-Availability-and-configuration The autosave documentation didn't mention this, so I added a note about this. This is a bit messy, but bear with us: in a future release, we plan to remove those flags, and have those two features always on. Since this will require people to update their MySQL schema when upgrading, and we might still make changes to the schema in the near future, for 4.3 we opted to put those feature "behind flags", so most people (i.e. those who don't need those features) can upgrade without worrying about modifying their schema. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
Is this still a current issue for you? Any update on my previous message. If we can't verify this issue, we'll close the issue in about a week.
Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi, I also have same issue in Orbeon 4.3.
I have not change any of the parameters that you mention (oxf.fr.support-autosave). And by default are disable as I have read on the documentation. As suggested by: http://discuss.orbeon.com/Column-username-not-found-error-when-searching-or-showing-form-summary-tp4657308.html I am going to downgrade to version 4.2 to see if it works correctly or not. |
Administrator
|
Hi Jorge,
Sorry for the trouble. We're changing, unifying, and simplifying the persistence code for 4.4, and hopefully this will resolve those problems. And in the meantime, I hope using 4.2 will solve the problem for you. Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |