Thanks,but it didn't help.
Here is the log of the deployment:
00:53:44,421 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=ApplicationFacadeBean, class=com.gint.scm.ejb.facade.ApplicationFacadeBean, type=STATELESS
00:53:44,453 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=CityFacadeBean, class=com.gint.scm.ejb.facade.CityFacadeBean, type=STATELESS
00:53:44,484 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=EditionFacadeBean, class=com.gint.scm.ejb.facade.EditionFacadeBean, type=STATELESS
00:53:44,515 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=OrganisationFacadeBean, class=com.gint.scm.ejb.facade.OrganisationFacadeBean, type=STATELESS
00:53:44,546 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=VersionFacadeBean, class=com.gint.scm.ejb.facade.VersionFacadeBean, type=STATELESS
00:53:44,546 FATAL [PersistenceXmlLoader] apptracker JTA
00:53:44,546 INFO [Ejb3Deployment] EJB3 deployment time took: 203
00:53:44,562 INFO [JmxKernelAbstraction] installing MBean: persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker with dependencies:
00:53:44,562 INFO [JmxKernelAbstraction] jboss.jca:name=MySqlDS,service=DataSourceBinding
00:53:44,609 INFO [Ejb3Configuration] found EJB3 Entity bean: com.gint.scm.ejb.entity.Application
00:53:44,609 INFO [Ejb3Configuration] found EJB3 Entity bean: com.gint.scm.ejb.entity.City
00:53:44,609 INFO [Ejb3Configuration] found EJB3 Entity bean: com.gint.scm.ejb.entity.Edition
00:53:44,609 INFO [Ejb3Configuration] found EJB3 @Embeddable: com.gint.scm.ejb.entity.EditionPK
00:53:44,625 INFO [Ejb3Configuration] found EJB3 Entity bean: com.gint.scm.ejb.entity.Organisation
00:53:44,625 INFO [Ejb3Configuration] found EJB3 Entity bean: com.gint.scm.ejb.entity.Version
00:53:44,625 INFO [Ejb3Configuration] found EJB3 @Embeddable: com.gint.scm.ejb.entity.VersionPK
00:53:44,687 INFO [AnnotationBinder] Binding entity from annotated class: com.gint.scm.ejb.entity.Application
00:53:44,687 INFO [EntityBinder] Bind entity com.gint.scm.ejb.entity.Application on table application
00:53:44,687 INFO [AnnotationBinder] Binding entity from annotated class: com.gint.scm.ejb.entity.City
00:53:44,687 INFO [EntityBinder] Bind entity com.gint.scm.ejb.entity.City on table city
00:53:44,734 INFO [AnnotationBinder] Binding entity from annotated class: com.gint.scm.ejb.entity.Edition
00:53:44,734 INFO [EntityBinder] Bind entity com.gint.scm.ejb.entity.Edition on table edition
00:53:44,750 INFO [AnnotationBinder] Binding entity from annotated class: com.gint.scm.ejb.entity.Organisation
00:53:44,750 INFO [EntityBinder] Bind entity com.gint.scm.ejb.entity.Organisation on table organisation
00:53:44,750 INFO [AnnotationBinder] Binding entity from annotated class: com.gint.scm.ejb.entity.Version
00:53:44,750 INFO [EntityBinder] Bind entity com.gint.scm.ejb.entity.Version on table version
00:53:44,765 INFO [CollectionBinder] Mapping collection: com.gint.scm.ejb.entity.Version.editions -> edition
00:53:44,921 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
00:53:44,921 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
00:53:44,937 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.17-nt
00:53:44,937 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.0.14-production ( $Date: 2004/04/24 15:49:43 $, $Revision: 1.27.2.39 $ )
00:53:44,937 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
00:53:44,937 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
00:53:44,937 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
00:53:44,937 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
00:53:44,937 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
00:53:44,937 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
00:53:44,937 INFO [SettingsFactory] JDBC batch size: 15
00:53:44,937 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
00:53:44,937 INFO [SettingsFactory] Scrollable result sets: enabled
00:53:44,937 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
00:53:44,937 INFO [SettingsFactory] Connection release mode: after_statement
00:53:44,937 INFO [SettingsFactory] Maximum outer join fetch depth: 2
00:53:44,937 INFO [SettingsFactory] Default batch fetch size: 1
00:53:44,937 INFO [SettingsFactory] Generate SQL with comments: disabled
00:53:44,937 INFO [SettingsFactory] Order SQL updates by primary key: disabled
00:53:44,937 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
00:53:44,937 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
00:53:44,937 INFO [SettingsFactory] Query language substitutions: {}
00:53:44,937 INFO [SettingsFactory] Second-level cache: enabled
00:53:44,937 INFO [SettingsFactory] Query cache: disabled
00:53:44,937 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
00:53:44,937 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
00:53:44,937 INFO [SettingsFactory] Structured second-level cache entries: disabled
00:53:44,937 INFO [SettingsFactory] Echoing all SQL to stdout
00:53:44,937 INFO [SettingsFactory] Statistics: disabled
00:53:44,937 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
00:53:44,937 INFO [SettingsFactory] Default entity-mode: pojo
00:53:44,968 INFO [SessionFactoryImpl] building session factory
00:53:45,234 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
00:53:45,234 INFO [SchemaUpdate] Running hbm2ddl schema update
00:53:45,234 INFO [SchemaUpdate] fetching database metadata
00:53:45,234 INFO [SchemaUpdate] updating schema
00:53:45,234 INFO [DatabaseMetadata] table not found: application
00:53:45,234 INFO [DatabaseMetadata] table not found: application_version
00:53:45,234 INFO [DatabaseMetadata] table not found: city
00:53:45,234 INFO [DatabaseMetadata] table not found: city_organisation
00:53:45,234 INFO [DatabaseMetadata] table not found: edition
00:53:45,234 INFO [DatabaseMetadata] table not found: organisation
00:53:45,234 INFO [DatabaseMetadata] table not found: version
00:53:45,250 INFO [DatabaseMetadata] table not found: application
00:53:45,250 INFO [DatabaseMetadata] table not found: application_version
00:53:45,250 INFO [DatabaseMetadata] table not found: city
00:53:45,250 INFO [DatabaseMetadata] table not found: city_organisation
00:53:45,250 INFO [DatabaseMetadata] table not found: edition
00:53:45,250 INFO [DatabaseMetadata] table not found: organisation
00:53:45,250 INFO [DatabaseMetadata] table not found: version
00:53:45,468 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@79ae24[state=NORMAL mc=org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@11a9732 handles=1 lastUse=1138924424937 permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1b1ebe5 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@1f61490 xaResource=org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@bc7a23 txSync=null]
java.sql.SQLException: General error, message from server: "Can't create table '.\apptracker\#sql-118_3.frm' (errno: 150)"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1977)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1272)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2233)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2181)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1254)
at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1200)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:161)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:152)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:295)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:231)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:97)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy94.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:76)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:608)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:452)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:139)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy35.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:365)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:489)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
00:53:45,484 ERROR [SchemaUpdate] Unsuccessful: alter table edition add index FK8F77F5BEB2B27E78 (versionMark, applicationId), add constraint FK8F77F5BEB2B27E78 foreign key (versionMark, applicationId) references version (applicationId, versionMark)
00:53:45,484 ERROR [SchemaUpdate] General error, message from server: "Can't create table '.\apptracker\#sql-118_3.frm' (errno: 150)"
00:53:45,484 ERROR [SchemaUpdate] Unsuccessful: alter table organisation add index FK3A5300DAE46A344A (city_id), add constraint FK3A5300DAE46A344A foreign key (city_id) references city (id)
00:53:45,484 ERROR [SchemaUpdate] Connection handle is not currently associated with a ManagedConnection
00:53:45,484 ERROR [SchemaUpdate] Unsuccessful: alter table version add index FK14F51CD8F183274B (applicationId), add constraint FK14F51CD8F183274B foreign key (applicationId) references application (id)
00:53:45,484 ERROR [SchemaUpdate] Connection handle is not currently associated with a ManagedConnection
00:53:45,484 INFO [SchemaUpdate] schema update complete
00:53:45,484 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
00:53:45,531 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=SCMEJB.ejb3,name=ApplicationFacadeBean with dependencies:
00:53:45,531 INFO [JmxKernelAbstraction] persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker
00:53:45,875 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=SCMEJB.ejb3,name=CityFacadeBean with dependencies:
00:53:45,875 INFO [JmxKernelAbstraction] persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker
00:53:46,046 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=SCMEJB.ejb3,name=EditionFacadeBean with dependencies:
00:53:46,046 INFO [JmxKernelAbstraction] persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker
00:53:46,265 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=SCMEJB.ejb3,name=OrganisationFacadeBean with dependencies:
00:53:46,265 INFO [JmxKernelAbstraction] persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker
00:53:46,468 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:service=EJB3,jar=SCMEJB.ejb3,name=VersionFacadeBean with dependencies:
00:53:46,468 INFO [JmxKernelAbstraction] persistence.units:jar=SCMEJB.ejb3.jar,unitName=apptracker
00:53:46,734 INFO [EJB3Deployer] Deployed: file:/E:/JBoss/jboss-4.0.3SP1/server/default/deploy/SCMEJB.ejb3
As you can see there is "alter table" error. I thought it was MySQL issue, but then I got it on SAP (MaxDB),too. Any ideas.