Hello Alexey,
The SQL-statement that JBoss tries to execute is:
anonymous wrote : Executing SQL: INSERT INTO COMPONENTFIELDVALUE (CONTRACT, COMPONENT,
FIELDNAME, SEQUENCE, VALUE, contract, component)
| VALUES (?, ?, ?, ?, ?, ?, ?)
I switched the Datasource to Oracle in the meantime and got the same error. The error
message is ORA-00957 and states, that the column is specified twice.
Is the Hypersonic database case-sensitive ?? It's logical that you can't have two
identical column names in the same table and I never really noticed this. The funny
thing is that everything works fine in the Hypersonic database.
The database table only consists of 5 columns (Contract, Component, Fieldname,
Sequence, Value).
The table has a compound primary key consisting of contract, component, fieldname and
sequence -- contract and component are supposed to be foreign keys as well.
At the moment I'm pretty stuck. Maybe someone could give me a hint on how to solve
this.
Error Messages:
2004-08-03 13:54:49,991 DEBUG
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ComponentFieldValue]
| Executing SQL: INSERT INTO COMPONENTFIELDVALUE (CONTRACT, COMPONENT, FIELDNAME,
SEQUENCE, VALUE, contract, component)
| VALUES (?, ?, ?, ?, ?, ?, ?)
| 2004-08-03 13:54:50,021 ERROR
[org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ComponentFieldValue] Could not
create entity
| java.sql.SQLException: ORA-00957: duplicate column name
|
| at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
| at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
| at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
| at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
| at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
| at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
| at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
| at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
| at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
| at
ejb-jar.xml:
|
|
|
|
|
|
| ComponentFieldValue
|
|
webservices.interfaces.ComponentFieldValueLocalHome
| webservices.interfaces.ComponentFieldValueLocal
|
| webservices.ejb.ComponentFieldValueBean
| Container
| webservices.ejb.ComponentFieldValuePK
| False
| 2.x
| componentFieldValueSchema
|
|
| contract
|
|
|
| component
|
|
|
| fieldname
|
|
|
| sequence
|
|
|
| value
|
|
|
|
|
|
|
|
|
|
|
|
| ContractAndCFValueRelation
|
|
|
CFValueHasContract
| Many
|
|
|ComponentFieldValue
|
|
|contractCMR
|
|
|
|
|
ContractHasCFValues
| One
|
|Contract
|
|
|componentFieldValuesCMR
|java.util.Collection
|
|
|
|
|
jbosscmp-jdbc.xml:
|
|
| ComponentFieldValue
|
| COMPONENTFIELDVALUE
|
|
| contract
| CONTRACT
|
|
|
| component
| COMPONENT
|
|
|
| fieldname
| FIELDNAME
|
|
|
| sequence
| SEQUENCE
|
|
|
| value
| VALUE
|
|
|
|
|
|
|
| ContractAndCFValueRelation
|
|
|
CFValueHasContract
| true
|
|
|
|
|
ContractHasCFValues
|
|
|id
|contract
|
|
|
|
|
|
| ComponentAndCFValueRelation
|
|
|
CFValueHasComponent
| true
|
|
|
|
|
ComponentHasCFValue
|
|
|id
|component_id
|
|
|
|
|
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=38440