I'm using 0.9.6 on hsqldb and am getting exceptions like this
periodically:
<0|false|0.9.6-incubating>
org.apache.openjpa.persistence.PersistenceException: Index already
exists: I_BNJBBTB_A1 in statement [CREATE INDEX I_BNJBBTB_A1 ON
BEANEJB_MXM_UNI_BTOB] {stmnt 7870505 CREATE INDEX I_BNJBBTB_A1 ON
BEANEJB_MXM_UNI_BTOB (FK1_FOR_AEJB_MXM_UNI_BTOB)} [code=-23,
state=S0011]
at org.apache.openjpa.jdbc.meta.MappingTool.record
(MappingTool.java:536)
at
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings
(JDBCBrokerFactory.java:167)
at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl
(JDBCBrokerFactory.java:127)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker
(AbstractBrokerFactory.java:164)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker
(DelegatingBrokerFactory.java:139)
The problem seems to be a problem with not inspecting the catalog to
determine if an index is already exists with that name, or if it even
needs to define the fk constraint at all. I have OpenJPA managing
the schema of this application and it successfully creates the table,
and when the application is redeployed doesn't try to recreate the
table.
Anyway, is this a know problem with 0.9.6? Is there a way I can turn
off the index creation while to avoid this problem? I tried setting
this openjpa.jdbc.SynchronizeMappings=buildSchema(ForeignKeys=false)
but it seemed to have no effect.
Thanks for any help,
-dain