AnsweredAssumed Answered

There is already an object named 'pddd_courseToInstructor_fk1' in the database.

Question asked by mohamed95 on Mar 18, 2019
Latest reply on Mar 24, 2019 by mohamed95

Hello everyone,

currently I am working in a B2 that has its own table in BB DB. In that table there is a foreign key to the users table. each time I upload the B2 I get the following error

 

Caused by: com.inet.tds.Tds4SQLException: Msg 2714, Level 16, State 5, Line 1, Sqlstate S0001

[LMS-TEST\BLACKBOARD]There is already an object named 'pddd_courseToInstructor_fk1' in the database.

at com.inet.tds.ab.a(Tds4Factory.java:176)

at com.inet.tds.ap.b(TdsConnection.java:2593)

at com.inet.tds.ap.a(TdsConnection.java:2304)

at com.inet.tds.ap.a(TdsConnection.java:2298)

at com.inet.tds.bh.d(TdsStatement.java:520)

at com.inet.tds.bh.execute(TdsStatement.java:206)

at sun.reflect.GeneratedMethodAccessor1297.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:138)

at com.sun.proxy.$Proxy160.execute(Unknown Source)

at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)

at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)

at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)

at blackboard.db.impl.SafetyNetStatement.execute(SafetyNetStatement.java:58)

at blackboard.db.schema.impl.AbstractDbSchema.executeSQL(AbstractDbSchema.java:605)

... 14 more

 

this is how the foreign key is defined in schema.xml

        <foreign-key name="pddd_courseToInstructor_fk1" reference-table="users" on-delete="setnull">

            <columnref name="instructorID" />

        </foreign-key>

Outcomes