On Thu, 14 Aug 2003 19:52:55 +0300, Alexey Loubyansky <[EMAIL PROTECTED]> wrote:

Hello Stefan,

it should not happen. First, a table is created. Then, foreign key
constraints are generated only if the related table exists.

What JBoss version you are using?

(jboss-3.2.0_tomcat-4.1.24)


Hi,

last time I wrote that I reordered the ejb-jar.xml according to the dependencies. However the effekt is still the same:

Here is a log sniplett:

09:10:05,305 INFO [KeyCuMitarbeiterEJB] Created table 'MITARBEITER' successfully.
09:10:05,306 DEBUG [KeyCuMitarbeiterEJB] Executing SQL: ALTER TABLE KAUFPREISANPASSUNG ADD CONSTRAINT FK_KAUFPREISANPASSUNG_18X7E81 FOREI
GN KEY (FK_FACHVER_MITARBEITER) REFERENCES MITARBEITER (MA_NR)
09:10:05,438 WARN [KeyCuMitarbeiterEJB] Could not add foreign key constraint: table=KAUFPREISANPASSUNG
09:10:05,485 ERROR [EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Error while adding foreign key constraint; - nested throwable: (java.sql.SQLException: ORA-0094
2: table or view does not exist
)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:412)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:332)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:130)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:499)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
.....


The error occur on deployment, when I let jboss generate the schema. On next deployment the error doesn't occur, but the same type
occurs for a different table. After a cycle of about 10 deployments no error occurs, becuase all tables have been created in the
meantime...


Cheers,

Stefan



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to