Geert,

I keep running into the exception pasted below, when I try to do a
simple insertion into one of my tables. This happens while trying to
test the app with testng, using the RunWithEngineClassLoader that is
also pasted. Any pointers?

thanks,
Emmanuel

        <target name="run" depends="build">
                <!--delete dir="${out.dir}" /-->

                <!--testng outputDir="${out.dir}">
                    <classpath>
                            <path refid="tests.classpath"/>
                    </classpath>
                <xmlfileset dir="${basedir}" includes="testng.xml"/>
            </testng-->
                <java classname="com.uwyn.rife.test.RunWithEngineClassLoader"
                        dir="${basedir}"
                        fork="yes"
                        failonerror="yes">
                        <classpath>
                                <path refid="tests.classpath" />
                                <pathelement location="${build.classes}"/>
                        </classpath>
                        <jvmarg line="-ea" />
                        <arg line="org.testng.TestNG testng.xml" />
                </java>
                
        </target>
        


--- EXCEPTION ---

[java] com.uwyn.rife.database.exceptions.ExecutionErrorException:
Error while executing the SQL 'INSERT INTO account (birthdate,
country, created, email, firstname, lastname, location, sex, userId,
visibility) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'.
     [java]     at
com.uwyn.rife.database.DbPreparedStatement.executeUpdate(DbPreparedStatement.java:236)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.databasedrivers.org_apache_derby_jdbc_EmbeddedDriver$1.performUpdate(org_apache_derby_jdbc_EmbeddedDriver.java:106)
     [java]     at
com.uwyn.rife.database.DbQueryManager.executeUpdate(DbQueryManager.java:259)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.databasedrivers.org_apache_derby_jdbc_EmbeddedDriver._insertWithoutCallbacks(org_apache_derby_jdbc_EmbeddedDriver.java:91)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.AbstractGenericQueryManager$3.useTransaction(AbstractGenericQueryManager.java:470)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.AbstractGenericQueryManager$3.useTransaction(AbstractGenericQueryManager.java:381)
     [java]     at
com.uwyn.rife.database.DbQueryManager.inTransaction(DbQueryManager.java:2783)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.AbstractGenericQueryManager._save(AbstractGenericQueryManager.java:380)
     [java]     at
com.uwyn.rife.database.querymanagers.generic.databasedrivers.generic.save(generic.java:117)
     [java]     at friends.test.TestsBase.createAccounts(TestsBase.java:125)
     [java]     at friends.test.TestsBase.setup(TestsBase.java:90)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at
org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:352)
     [java]     at
org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:282)
     [java]     at
org.testng.internal.Invoker.invokeConfigurations(Invoker.java:151)
     [java]     at org.testng.internal.Invoker.invokeMethod(Invoker.java:316)
     [java]     at
org.testng.internal.Invoker.invokeTestMethods(Invoker.java:509)
     [java]     at
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:90)
     [java]     at org.testng.TestRunner.privateRun(TestRunner.java:620)
     [java]     at org.testng.TestRunner.run(TestRunner.java:503)
     [java]     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:200)
     [java]     at org.testng.SuiteRunner.run(SuiteRunner.java:126)
     [java]     at org.testng.TestNG.run(TestNG.java:285)
     [java]     at org.testng.TestNG.privateMain(TestNG.java:372)
     [java]     at org.testng.TestNG.main(TestNG.java:321)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:585)
     [java]     at
com.uwyn.rife.test.RunWithEngineClassLoader.main(RunWithEngineClassLoader.java:44)
     [java] Caused by: SQL Exception: The check constraint
'SQL051127032913372' was violated while performing an INSERT or UPDATE
on table 'APP.ACCOUNT'.
     [java]     at
org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
     [java]     at
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
     [java]     at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown
Source)
     [java]     at
com.uwyn.rife.database.DbPreparedStatement.executeUpdate(DbPreparedStatement.java:228)
     [java]     ... 32 more
     [java] [Invoker 25300442] Invoking friends.test.AccountTests.testAccounts
_______________________________________________
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to