Re: [JBoss-user] Bug when generating foreign keys with mySQL
Took some time, xmas and all... Here you go.. This application is deployed with an empty database, and fk-constraint set to true. Using 3.2.2 this works. The primary keys are simple (Strings and Integers). Could it be something I do wrong? The log file is located here: http://olvesh.no-ip.org/jboss/log_with_errors.txt Thanx Olve S. Hansen 18.12.2003 21:18 : Could you increase the log level to debug for org.jboss.ejb.plugins.cmp and see what's wrong with the issued SQL. Do you use composite or simple primary keys? Olve S. Hansen wrote: In jboss 3.2.2 I deployed to my InnoDB MySql without problems, but with 3.2.3 I experience problems generating foreign-keys when the flag fk-constraint is set to true in my applications jbosscmp-jdbc.xml. This worked very well in 3.2.2 Is this bug reported? The bug system at sf.net does not have a search facility (as I found)... Thanx 2003-12-18 18:39:20,562 ERROR [org.jboss.ejb.EntityContainer] Starting failed org.jboss.deployment.DeploymentException: Error while adding foreign key constraint; - nested throwable: (java.sql.SQLException: General error, message from server: "Can't create table '.\bite2\#sql-754_236.frm' (errno: 150)") at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:724) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:637) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:177) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388) at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152) at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976) at $Proxy14.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:394) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy30.start(Unknown Source) at org.jboss.ejb.EjbModule.startService(EjbModule.java:331) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976) at $Proxy14.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:394) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy12.start(Unknown Source) at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.
[JBoss-user] Bug when generating foreign keys with mySQL
In jboss 3.2.2 I deployed to my InnoDB MySql without problems, but with 3.2.3 I experience problems generating foreign-keys when the flag fk-constraint is set to true in my applications jbosscmp-jdbc.xml. This worked very well in 3.2.2 Is this bug reported? The bug system at sf.net does not have a search facility (as I found)... Thanx -- Olve S. Hansen Intermedia (http://www.intermedia.uib.no) 2003-12-18 18:39:20,562 ERROR [org.jboss.ejb.EntityContainer] Starting failed org.jboss.deployment.DeploymentException: Error while adding foreign key constraint; - nested throwable: (java.sql.SQLException: General error, message from server: "Can't create table '.\bite2\#sql-754_236.frm' (errno: 150)") at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:724) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.addForeignKeyConstraint(JDBCStartCommand.java:637) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:177) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:484) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:388) at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:152) at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:342) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976) at $Proxy14.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:394) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy30.start(Unknown Source) at org.jboss.ejb.EjbModule.startService(EjbModule.java:331) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976) at $Proxy14.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:394) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy12.start(Unknown Source) at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy6.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSca
Re: [JBoss-user] optimize question
My mistake, I meant A but said B. A double check of my jboss.xml surely states that we are running commit-option A. But I was really convinced I put B in.. But it is B which is the default option, right? Wellwell, the misunderstanding is cleared... --Olve --- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] optimize question
[EMAIL PROTECTED] wrote: Hi all, I have modifieed my beans as follows in the deployment descriptor (jboss.xml): [snip] I also switched to commit option 'A', because the container is the only application modifying the database data: CMP 2.x and Cache A Look at the pay-for documentation for jboss page 290, or page 264 in the EJB 2.0 spec from sun. Commit option A means that: •For commit-option ‘A’, this instance is cached and used between transactions. •For commit-optoin ‘B’, this instance is cached and used between transactions, but is marked as ‘dirty’ at the end of a transaction. This means that at the start of a new transaction ejbLoad must be called. •For commit-option ‘C’, this instance is marked as ‘dirty’, released from the cache, and marked for passivation at the end of a transaction. And the JBoss specific: •For commit-option ‘D’, a background refresh thread periodically calls ejbLoad on stale beans within the cache. Otherwise, this option works in the same way as ‘A’. This means that the commit-option a is the one requiring most DB lookups. We switched from A to B and now only the first big lookups take time, the following DB requests are retrieved from the cache. Option B and C means that the DB can be in inconsisten states, since the updated version are in the JBoss cahce only. This also means that the only DB updates happening should run through your JBoss app. Hope this helps.. Regards, Olve --- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user