Re: EJB 2.1 CMR Bi-Directional with Compound Key
Hi Mark, I had a look to the openejb-jar DD and I think you need to drop the foreign-key-column-on-source/ element from the Committee- CommitteeMembers relation. This optional element means that the foreign key columns declared in the following cmr-field-mapping elements are defined by the CMP declared by relationship-role-source. So, this should work: ejb-relation ejb-relation-nameCommittee-CommitteeMembers/ejb-relation-name ejb-relationship-role ejb-relationship-role-nameCommittee-has-many-CommitteeMembers/ ejb-relationship-role-name relationship-role-source ejb-nameCommitteeEntity/ejb-name /relationship-role-source cmr-field cmr-field-namecommitteeMembers/cmr-field-name /cmr-field role-mapping cmr-field-mapping key-columnCommitteeId/key-column foreign-key-columnCommitteeId/foreign-key-column /cmr-field-mapping /role-mapping /ejb-relationship-role /ejb-relation Also, you do not need to declare both sides of a relationship: the above is enough to declare the CMR mapping for the Committee- CommitteeMembers relation. BTW, I strongly recommend you to upgrade to OpenEJB3: this should be a seamless migration from a CMP perspective as the OpenEJB guys have done a fantastic work at writing an OpenEJB2 schema converter. Thanks, Gianny On 30/05/2007, at 1:07 AM, Mark Aufdencamp wrote: I could really use some help on this! I have a two Entity beans with a bi-directional relationship, committees and committee_members. Committees has a single field primary key of committeeId. Committee_members has a compound primary key of CommitteeId+UserId. A Foreign Key constraint has been defined for the committee_members table based on the committeeId. I can't seem to get this to deploy and believe it's my openejb-jar.xml deployment descriptor in the relationship section. I've looked at examples from JBoss and Sun, so I'm fairly certain my ejb- jar.xml is correct. Does anyone have a working example of a bi-directional relatioship where the many table has a compound key that I can take a look at? Where can I find documentation on how OpenEJB and TranQL interact to create the O/R map? This knowledge are really seems to be lacking documentation in Geronimo. I'd really like to draw some pretty pictures of tables and beans with the seven different relationship types defined for EJB 2.1. This would be good preliminary work for documenting EJB 3.0 examples. Please help me learn, so I can contribute:) TIA, Mark Aufdencamp [EMAIL PROTECTED]
Re: Safe shutdown
I should probably go into more detail the issue we are having: We are wrapping Geronimo in a windows service using JavaService (http://forge.objectweb.org/projects/javaservice/). It is similar to Java Service Wrapper. You can specify the java class path as a systme property when the application the service wraps startsup and shuts down. You also provide the start class as well as optionally the stop class. You can only provide one classpath -- to be used for the start class as well as the stop class. So we configure the start class as org.apache.geronimo.system.main.Daemon and for the stop class: org.apache.geronimo.deployment.cli.StopServer. In order for that stop method to be on the classpath we configure the classpath as follows: bin/server.jar;bin/shutdown.jar. If we leave out shutdown.jar, the StopServer.jar is missing. So far so good, and that works out ok, but here is the rub: hot deployment will not work. We get the dreaded ClassNotFOundException: Exception in thread Geronimo hot deploy scanner java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/plugin/ConfigIDExtractor at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.apache.geronimo.deployment.hot.DirectoryMonitor.calculateModuleId(DirectoryMonitor.java:358) at org.apache.geronimo.deployment.hot.DirectoryMonitor.initialize(DirectoryMonitor.java:230) at org.apache.geronimo.deployment.hot.DirectoryMonitor.run(DirectoryMonitor.java:206) at java.lang.Thread.run(Thread.java:619) There seems to be some sort of class loader clash. Now, if we remove the server.jar from the classpath, hot deployment works just fine, but of course we can't use the shutdown class then. That prompted my original question. The JavaService states: If no stop_class is specified, the process containing the Virtual Machine is simply terminated when the service is stopped. I do notice much less logging when removing the stop class, so it seems like the shutdown hooks are not called. So do I have any options to get both the shutdown hook and hot deployment? Thanks, Yoel Spotts David Jencks [EMAIL PROTECTED] oo.comTo user@geronimo.apache.org 05/29/2007 07:18 cc PM Subject Re: Safe shutdown Please respond to [EMAIL PROTECTED] che.org On May 29, 2007, at 3:09 PM, Mark Aufdencamp wrote: I would guess this probably depends on your application, but it doesnt sound like a good idea. I would think that an EJB container would need to be able to safely complete transactions and passivate/deallocate it's Beans particular CMP Entity Beans. The Web container might also maintain Application scoped information that needs a clean safe shutdown as well. However, both the shutdown jar or console command and hitting ctrl-c on your
Re: Safe shutdown
I don't immediately see why this is happening but also don't see a likely way out. One approach might be to write a couple classes that are basically scripts that start the appropriate jar in a new vm. thanks david jencks On May 30, 2007, at 5:03 AM, Joel Spotts wrote: I should probably go into more detail the issue we are having: We are wrapping Geronimo in a windows service using JavaService (http://forge.objectweb.org/projects/javaservice/). It is similar to Java Service Wrapper. You can specify the java class path as a systme property when the application the service wraps startsup and shuts down. You also provide the start class as well as optionally the stop class. You can only provide one classpath -- to be used for the start class as well as the stop class. So we configure the start class as org.apache.geronimo.system.main.Daemon and for the stop class: org.apache.geronimo.deployment.cli.StopServer. In order for that stop method to be on the classpath we configure the classpath as follows: bin/server.jar;bin/shutdown.jar. If we leave out shutdown.jar, the StopServer.jar is missing. So far so good, and that works out ok, but here is the rub: hot deployment will not work. We get the dreaded ClassNotFOundException: Exception in thread Geronimo hot deploy scanner java.lang.NoClassDefFoundError: org/apache/geronimo/deployment/ plugin/ConfigIDExtractor at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass (MultiParentClassLoader.java:227) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at org.apache.geronimo.deployment.hot.DirectoryMonitor.calculateModuleId( DirectoryMonitor.java:358) at org.apache.geronimo.deployment.hot.DirectoryMonitor.initialize (DirectoryMonitor.java:230) at org.apache.geronimo.deployment.hot.DirectoryMonitor.run (DirectoryMonitor.java:206) at java.lang.Thread.run(Thread.java:619) There seems to be some sort of class loader clash. Now, if we remove the server.jar from the classpath, hot deployment works just fine, but of course we can't use the shutdown class then. That prompted my original question. The JavaService states: If no stop_class is specified, the process containing the Virtual Machine is simply terminated when the service is stopped. I do notice much less logging when removing the stop class, so it seems like the shutdown hooks are not called. So do I have any options to get both the shutdown hook and hot deployment? Thanks, Yoel Spotts graycol.gif David Jencks [EMAIL PROTECTED] David Jencks [EMAIL PROTECTED] 05/29/2007 07:18 PM Please respond to user@geronimo.apache.org ecblank.gif To ecblank.gif user@geronimo.apache.org ecblank.gif cc ecblank.gif ecblank.gif Subject ecblank.gif Re: Safe shutdown ecblank.gif ecblank.gif On May 29, 2007, at 3:09 PM, Mark Aufdencamp wrote: I would guess this probably depends on your application, but it doesnt sound like a good idea. I would think that an EJB container would need to be able to safely complete transactions and passivate/ deallocate it's Beans particular CMP Entity Beans. The Web container might also maintain Application scoped information that needs a clean safe shutdown as well. However, both the shutdown jar or console command and hitting ctrl- c on your console have approximately the same effect in code -- calling the shutdown hook that stops and unloads all the running configurations in reverse order of their starting.If your application uses transactions properly any kind of shutdown shouldn't result in data corruption, but you may lose partially computed results in process. We don't make any attempt I'm aware of to finish processing in flight requests before turning off a gbean. thanks david jencks Mark Aufdencamp [EMAIL PROTECTED] Original Message Subject: Safe shutdown From: Joel Spotts [EMAIL
Re: WTP server adapter for Geronimo 2.0.M5
thanks for your response. I will rather wait :-) in that case. thanks, robin Vadim Dmitriev wrote: Hi! If a recall it right - officially released eclipse plugin for geronimo supports only version 1.1.x and prior to it. If you seek geronimo 2.0 support, than you should try unofficial daily drivers here: http://people.apache.org/dist/geronimo/eclipse/unstable/ (can't start geronimo2.0 with latest posted version though, but seems it will be fixed soon ) Note, that it requires WTP2.0. And since all of WTP 2.0 prerequisites are still milestones or RCs - complete distributions won't be available (Callisto included). I'm afraid you have to choose between tested and safe IDE with geronimo 1.1.x or RC with geronimo2.0. I think eclipse 3.3 will be released within a month or two (most of subprojects will stick to it's release date), so if you are really not in a hurry - you can just wait :) Good luck! Hi All, I just downloaded Geronimo 2.0.M5 from http://geronimo.apache.org/apache-geronimo-v20-m5-release.html and also downloaded the Eclipse Callisto all in one package from IBM's website http://www.ibm.com/developerworks/eclipse/downloads/ (its called Enterprise Bundle and includes core Eclipse 3.2.2, Eclipse Web Tools Platform (WTP) 1.5.3, Eclipse Test and Performance Tools Platform (TPTP) 4.2.2, Eclipse Graphical Modeling Framework (GMF) 1.0.3, and all prerequisites) When I try to create a new server, I only see Geronimo 1.0 and 1.1 listed, I am surprised to see that there's no support for Geronimo 2.0 in latest greatest Enterprise Bundle. Should I try some other Eclipse distro.. or is just not available anywhere ??? thanks for your help in advance, robin -- View this message in context: http://www.nabble.com/WTP-server-adapter-for-Geronimo-2.0.M5-tf3837325s134.html#a10876645 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
exceptions while running Geronimo 1.1.1 first time
Hi All, I am getting the following exception while running Geronimo 1.1.1 that i downloaded from http://geronimo.apache.org/apache-geronimo-v111-release.html I get it while running from command line (using startup.bat or java -jar bin/server.jar commands) as well running from within WTP 1.5.3 Can someone please point out what's wrong. Seemingly the database is not started.. but why ?? And is there a guide to use postgreSQL or mySQL database backend with geronimo instead of Derby ? Booting Geronimo Kernel (in Java 1.4.2_12)... Module 1/20 geronimo/rmi-naming/1.1.1/car started in .422s Module 2/20 geronimo/j2ee-server/1.1.1/car started in .687s Module 3/20 geronimo/j2ee-security/1.1.1/car started in .750s Module 4/20 geronimo/axis/1.1.1/carstarted in .094s Module 5/20 geronimo/openejb/1.1.1/car started in .453s Module 6/20 geronimo/system-database/1.1.1/car12:03:52,553 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName=geronimo/system-database/1.1.1/car?J2EEApplication=null,ResourceAdapterModule=geronimo/system-database/1.1.1/car,j2eeType=GBean,name=TransactionalThreadPooledTimer SQL Exception: Failed to create database 'SystemDatabase', see the next exception for details. at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.init(Unknown Source) at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.setupResourceAdapter(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.getXAConnection(Unknown Source) at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:74) at org.tranql.connector.derby.EmbeddedXAMCF.createManagedConnection(EmbeddedXAMCF.java:52) at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41) at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41) at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63) at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73) at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47) at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86) at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43) at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39) at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66) at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61) at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56) at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(generated) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:54) at $javax.sql.DataSource$$EnhancerByCGLIB$$2a52535c.getConnection(generated) at org.apache.geronimo.timer.jdbc.JDBCWorkerPersistence.execSQL(JDBCWorkerPersistence.java:313) at org.apache.geronimo.timer.jdbc.JDBCWorkerPersistence.init(JDBCWorkerPersistence.java:68) at org.apache.geronimo.timer.jdbc.JDBCStoreThreadPooledTransactionalTimer.init(JDBCStoreThreadPooledTransactionalTimer.java:49) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at
Re: Safe shutdown
On May 30, 2007, at 8:03 AM, Joel Spotts wrote: I should probably go into more detail the issue we are having: We are wrapping Geronimo in a windows service using JavaService (http://forge.objectweb.org/projects/javaservice/). It is similar to Java Service Wrapper. You can specify the java class path as a systme property when the application the service wraps startsup and shuts down. You also provide the start class as well as optionally the stop class. You can only provide one classpath -- to be used for the start class as well as the stop class. So we configure the start class as org.apache.geronimo.system.main.Daemon and for the stop class: org.apache.geronimo.deployment.cli.StopServer. In order for that stop method to be on the classpath we configure the classpath as follows: bin/server.jar;bin/shutdown.jar. If we leave out shutdown.jar, the StopServer.jar is missing. So far so good, and that works out ok, but here is the rub: hot deployment will not work. We get the dreaded ClassNotFOundException: Strange. Could you try setting your classpath to: bin/server.jar;../lib/geronimo-common-1.1.1.jar;../lib/geronimo- deploy-tool-1.1.1.jar Not sure if that will work, or not. If not, then there may still be some sort of interference going on with geronimo-common or geronimo- deploy-tool being loaded from within multiple classloaders. --kevan
Re: exceptions while running Geronimo 1.1.1 first time
I downloaded geronimo 1.1 (compared to my previous, failing 1.1.1) http://geronimo.apache.org/apache-geronimo-v11-release.html and it works fine. I don't know, may be 1.1.1 is broken . But from the versioning, it looks like the next version of 1.1 , so if 1.1 is stable, its strange that 1.1.1 is broken. anyway, i am off to the start, lets see how the rest goes.. thanks anyways, robin robinbajaj wrote: Hi All, I am getting the following exception while running Geronimo 1.1.1 that i downloaded from http://geronimo.apache.org/apache-geronimo-v111-release.html I get it while running from command line (using startup.bat or java -jar bin/server.jar commands) as well running from within WTP 1.5.3 Can someone please point out what's wrong. Seemingly the database is not started.. but why ?? And is there a guide to use postgreSQL or mySQL database backend with geronimo instead of Derby ? Booting Geronimo Kernel (in Java 1.4.2_12)... Module 1/20 geronimo/rmi-naming/1.1.1/car started in .422s Module 2/20 geronimo/j2ee-server/1.1.1/car started in .687s Module 3/20 geronimo/j2ee-security/1.1.1/car started in .750s Module 4/20 geronimo/axis/1.1.1/carstarted in .094s Module 5/20 geronimo/openejb/1.1.1/car started in .453s Module 6/20 geronimo/system-database/1.1.1/car12:03:52,553 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName=geronimo/system-database/1.1.1/car?J2EEApplication=null,ResourceAdapterModule=geronimo/system-database/1.1.1/car,j2eeType=GBean,name=TransactionalThreadPooledTimer SQL Exception: Failed to create database 'SystemDatabase', see the next exception for details. at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.init(Unknown Source) at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.setupResourceAdapter(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.getXAConnection(Unknown Source) at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:74) at org.tranql.connector.derby.EmbeddedXAMCF.createManagedConnection(EmbeddedXAMCF.java:52) at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41) at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41) at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63) at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73) at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47) at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86) at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43) at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39) at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66) at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61) at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56) at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(generated) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(ConnectorMethodInterceptor.java:54) at $javax.sql.DataSource$$EnhancerByCGLIB$$2a52535c.getConnection(generated) at org.apache.geronimo.timer.jdbc.JDBCWorkerPersistence.execSQL(JDBCWorkerPersistence.java:313) at
RE: exceptions while running Geronimo 1.1.1 first time
You'll want to use 1.1.1. I'm running the Windows Tomcat build from that URL on W2K3 server with no problem. Here'sa few trouble shooting questions I'd ask for an initial installation. Can you elaborate on your OS (Linux/Windows XP/Windows 2K3 Server) and which build (Tomcat/Jetty)? Whatuser context of your operating system(root/Administrator/plain user)? Did the jar get downloaded properly and pass the check sum test? Did it get fully extracted properly when it was installed? What does the OS path look like? What does the Classpath look like? It looks like a system database is created/accessed in Derby by the server when it's initially started? Can someone enlighten us on this? I'm wondering if you have OS access rights to the location of the database, presuming all else was in order. Original Message Subject: exceptions while running Geronimo 1.1.1 first timeFrom: robinbajaj [EMAIL PROTECTED]Date: Wed, May 30, 2007 12:12 pmTo: user@geronimo.apache.orgHi All, I am getting the following exception while running Geronimo 1.1.1 that i downloaded from http://geronimo.apache.org/apache-geronimo-v111-release.html I get it while running from command line (using startup.bat or java -jar bin/server.jar commands) as well running from within WTP 1.5.3 Can someone please point out what's wrong. Seemingly the database is not started.. but why ?? And is there a guide to use postgreSQL or mySQL database backend with geronimo instead of Derby ? Booting Geronimo Kernel (in Java 1.4.2_12)... Module 1/20 geronimo/rmi-naming/1.1.1/car started in .422s Module 2/20 geronimo/j2ee-server/1.1.1/car started in .687s Module 3/20 geronimo/j2ee-security/1.1.1/car started in .750s Module 4/20 geronimo/axis/1.1.1/carstarted in .094s Module 5/20 geronimo/openejb/1.1.1/car started in .453s Module 6/20 geronimo/system-database/1.1.1/car12:03:52,553 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="geronimo/system-database/1.1.1/car?J2EEApplication=null,ResourceAdapterModule=geronimo/system-database/1.1.1/car,j2eeType=GBean,name=TransactionalThreadPooledTimer" SQL Exception: Failed to create database 'SystemDatabase', see the next exception for details. at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.createDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.init(Unknown Source) at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.setupResourceAdapter(Unknown Source) at org.apache.derby.jdbc.EmbeddedXADataSource.getXAConnection(Unknown Source) at org.tranql.connector.jdbc.AbstractXADataSourceMCF.getPhysicalConnection(AbstractXADataSourceMCF.java:74) at org.tranql.connector.derby.EmbeddedXAMCF.createManagedConnection(EmbeddedXAMCF.java:52) at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:41) at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41) at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:63) at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:73) at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:47) at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:86) at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.getConnection(ConnectionHandleInterceptor.java:43) at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39) at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.getConnection(ConnectionTrackingInterceptor.java:66) at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:61) at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56) at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(generated) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at
RE: EJB 2.1 CMR Bi-Directional with Compound Key
Thanks for the response Gianny. I've wacked out a small demo that I'm working on right now with a session facade, the three beans, and the database tables. I'll let you all know how it goes:) I'm planning on hittting EJB 3.0 hard once I understand this. I want to comprehend the legacy way first! Original Message Subject: Re: EJB 2.1 CMR Bi-Directional with Compound KeyFrom: Gianny Damour [EMAIL PROTECTED]Date: Wed, May 30, 2007 7:07 amTo: user@geronimo.apache.orgHi Mark, I had a look to the openejb-jar DD and I think you need to drop the foreign-key-column-on-source/ element from the Committee- CommitteeMembers relation. This optional element means that the foreign key columns declared in the following cmr-field-mapping elements are defined by the CMP declared by relationship-role-source. So, this should work: ejb-relation ejb-relation-nameCommittee-CommitteeMembers/ejb-relation-name ejb-relationship-role ejb-relationship-role-nameCommittee-has-many-CommitteeMembers/ ejb-relationship-role-name relationship-role-source ejb-nameCommitteeEntity/ejb-name /relationship-role-source cmr-field cmr-field-namecommitteeMembers/cmr-field-name /cmr-field role-mapping cmr-field-mapping key-columnCommitteeId/key-column foreign-key-columnCommitteeId/foreign-key-column /cmr-field-mapping /role-mapping /ejb-relationship-role /ejb-relation Also, you do not need to declare both sides of a relationship: the above is enough to declare the CMR mapping for the Committee- CommitteeMembers relation. BTW, I strongly recommend you to upgrade to OpenEJB3: this should be a seamless migration from a CMP perspective as the OpenEJB guys have done a fantastic work at writing an OpenEJB2 schema converter. Thanks, Gianny On 30/05/2007, at 1:07 AM, Mark Aufdencamp wrote: I could really use some help on this! I have a two Entity beans with a bi-directional relationship, committees and committee_members. Committees has a single field primary key of committeeId. Committee_members has a compound primary key of CommitteeId+UserId. A Foreign Key constraint has been defined for the committee_members table based on the committeeId. I can't seem to get this to deploy and believe it's my openejb-jar.xml deployment descriptor in the relationship section. I've looked at examples from JBoss and Sun, so I'm fairly certain my ejb- jar.xml is correct. Does anyone have a working example of a bi-directional relatioship where the many table has a compound key that I can take a look at? Where can I find documentation on how OpenEJB and TranQL interact to create the O/R map? This knowledge are really seems to be lacking documentation in Geronimo. I'd really like to draw some pretty pictures of tables and beans with the seven different relationship types defined for EJB 2.1. This would be good preliminary work for documenting EJB 3.0 examples. Please help me learn, so I can contribute:) TIA, Mark Aufdencamp Mark@Aufdencamp.com
Re: EJB 2.1 CMR Bi-Directional with Compound Key
Mark, I thought about suggesting that you use JPA, but I wasn't sure if there was a reason 'bigger than you' that was requiring you to use EJB2. I tried to learn how to use EJB2 entity beans and I was defeated. I am _very_ glad that OpenJPA is integrated into Geronimo now - It is making my life much easier. If you have any questions once you start working with it I'd be happy to answer any questions you have (if I can). (BTW: Thanks to any and every one who had a part in getting JPA working in Geronimo!) Jay Mark Aufdencamp wrote: Thanks for the response Gianny. I've wacked out a small demo that I'm working on right now with a session facade, the three beans, and the database tables. I'll let you all know how it goes:) I'm planning on hittting EJB 3.0 hard once I understand this. I want to comprehend the legacy way first! Original Message Subject: Re: EJB 2.1 CMR Bi-Directional with Compound Key From: Gianny Damour [EMAIL PROTECTED] Date: Wed, May 30, 2007 7:07 am To: user@geronimo.apache.org Hi Mark, I had a look to the openejb-jar DD and I think you need to drop the foreign-key-column-on-source/ element from the Committee- CommitteeMembers relation. This optional element means that the foreign key columns declared in the following cmr-field-mapping elements are defined by the CMP declared by relationship-role-source. So, this should work: ejb-relation ejb-relation-nameCommittee-CommitteeMembers/ejb-relation-name ejb-relationship-role ejb-relationship-role-nameCommittee-has-many-CommitteeMembers/ ejb-relationship-role-name relationship-role-source ejb-nameCommitteeEntity/ejb-name /relationship-role-source cmr-field cmr-field-namecommitteeMembers/cmr-field-name /cmr-field role-mapping cmr-field-mapping key-columnCommitteeId/key-column foreign-key-columnCommitteeId/foreign-key-column /cmr-field-mapping /role-mapping /ejb-relationship-role /ejb-relation Also, you do not need to declare both sides of a relationship: the above is enough to declare the CMR mapping for the Committee- CommitteeMembers relation. BTW, I strongly recommend you to upgrade to OpenEJB3: this should be a seamless migration from a CMP perspective as the OpenEJB guys have done a fantastic work at writing an OpenEJB2 schema converter. Thanks, Gianny On 30/05/2007, at 1:07 AM, Mark Aufdencamp wrote: I could really use some help on this! I have a two Entity beans with a bi-directional relationship, committees and committee_members. Committees has a single field primary key of committeeId. Committee_members has a compound primary key of CommitteeId+UserId. A Foreign Key constraint has been defined for the committee_members table based on the committeeId. I can't seem to get this to deploy and believe it's my openejb-jar.xml deployment descriptor in the relationship section. I've looked at examples from JBoss and Sun, so I'm fairly certain my ejb- jar.xml is correct. Does anyone have a working example of a bi-directional relatioship where the many table has a compound key that I can take a look at? Where can I find documentation on how OpenEJB and TranQL interact to create the O/R map? This knowledge are really seems to be lacking documentation in Geronimo. I'd really like to draw some pretty pictures of tables and beans with the seven different relationship types defined for EJB 2.1. This would be good preliminary work for documenting EJB 3.0 examples. Please help me learn, so I can contribute:) TIA, Mark Aufdencamp [EMAIL PROTECTED] http://email.secureserver.net/pcompose.php?aEmlPart=0type=replyfolder=INBOX.Apache.Geronimo.Usersuid=108#Compose
Re: EJB 2.1 CMR Bi-Directional with Compound Key
I also suggest you skip CMP and move directly to JPA. Knowing CMP isn't going to help you lean JPA at all. -dain On May 30, 2007, at 1:17 PM, Jay D. McHugh wrote: Mark, I thought about suggesting that you use JPA, but I wasn't sure if there was a reason 'bigger than you' that was requiring you to use EJB2. I tried to learn how to use EJB2 entity beans and I was defeated. I am _very_ glad that OpenJPA is integrated into Geronimo now - It is making my life much easier. If you have any questions once you start working with it I'd be happy to answer any questions you have (if I can). (BTW: Thanks to any and every one who had a part in getting JPA working in Geronimo!) Jay Mark Aufdencamp wrote: Thanks for the response Gianny. I've wacked out a small demo that I'm working on right now with a session facade, the three beans, and the database tables. I'll let you all know how it goes:) I'm planning on hittting EJB 3.0 hard once I understand this. I want to comprehend the legacy way first! Original Message Subject: Re: EJB 2.1 CMR Bi-Directional with Compound Key From: Gianny Damour [EMAIL PROTECTED] Date: Wed, May 30, 2007 7:07 am To: user@geronimo.apache.org Hi Mark, I had a look to the openejb-jar DD and I think you need to drop the foreign-key-column-on-source/ element from the Committee- CommitteeMembers relation. This optional element means that the foreign key columns declared in the following cmr-field-mapping elements are defined by the CMP declared by relationship-role-source. So, this should work: ejb-relation ejb-relation-nameCommittee-CommitteeMembers/ejb-relation- name ejb-relationship-role ejb-relationship-role-nameCommittee-has-many- CommitteeMembers/ ejb-relationship-role-name relationship-role-source ejb-nameCommitteeEntity/ejb-name /relationship-role-source cmr-field cmr-field-namecommitteeMembers/cmr-field-name /cmr-field role-mapping cmr-field-mapping key-columnCommitteeId/key-column foreign-key-columnCommitteeId/foreign-key-column /cmr-field-mapping /role-mapping /ejb-relationship-role /ejb-relation Also, you do not need to declare both sides of a relationship: the above is enough to declare the CMR mapping for the Committee- CommitteeMembers relation. BTW, I strongly recommend you to upgrade to OpenEJB3: this should be a seamless migration from a CMP perspective as the OpenEJB guys have done a fantastic work at writing an OpenEJB2 schema converter. Thanks, Gianny On 30/05/2007, at 1:07 AM, Mark Aufdencamp wrote: I could really use some help on this! I have a two Entity beans with a bi-directional relationship, committees and committee_members. Committees has a single field primary key of committeeId. Committee_members has a compound primary key of CommitteeId+UserId. A Foreign Key constraint has been defined for the committee_members table based on the committeeId. I can't seem to get this to deploy and believe it's my openejb-jar.xml deployment descriptor in the relationship section. I've looked at examples from JBoss and Sun, so I'm fairly certain my ejb- jar.xml is correct. Does anyone have a working example of a bi-directional relatioship where the many table has a compound key that I can take a look at? Where can I find documentation on how OpenEJB and TranQL interact to create the O/R map? This knowledge are really seems to be lacking documentation in Geronimo. I'd really like to draw some pretty pictures of tables and beans with the seven different relationship types defined for EJB 2.1. This would be good preliminary work for documenting EJB 3.0 examples. Please help me learn, so I can contribute:) TIA, Mark Aufdencamp [EMAIL PROTECTED] http://email.secureserver.net/ pcompose.php? aEmlPart=0type=replyfolder=INBOX.Apache.Geronimo.Usersuid=108#Comp ose
RE: EJB 2.1 CMR Bi-Directional with Compound Key
Thanks for the help guys. I got it to deploy and the queries look right this time. I need to test the relationships tomorrow, but it looks a lot better this week than it did last week!:) Original Message Subject: Re: EJB 2.1 CMR Bi-Directional with Compound KeyFrom: Dain Sundstrom [EMAIL PROTECTED]Date: Wed, May 30, 2007 7:21 pmTo: user@geronimo.apache.org I also suggest you skip CMP and move directly to JPA. Knowing CMP isn't going to help you lean JPA at all. -dain On May 30, 2007, at 1:17 PM, Jay D. McHugh wrote: Mark, I thought about suggesting that you use JPA, but I wasn't sure if there was a reason 'bigger than you' that was requiring you to use EJB2. I tried to learn how to use EJB2 entity beans and I was defeated. I am _very_ glad that OpenJPA is integrated into Geronimo now - It is making my life much easier. If you have any questions once you start working with it I'd be happy to answer any questions you have (if I can). (BTW: Thanks to any and every one who had a part in getting JPA working in Geronimo!) Jay Mark Aufdencamp wrote: Thanks for the response Gianny. I've wacked out a small demo that I'm working on right now with a session facade, the three beans, and the database tables. I'll let you all know how it goes:) I'm planning on hittting EJB 3.0 hard once I understand this. I want to comprehend the legacy way first! Original Message Subject: Re: EJB 2.1 CMR Bi-Directional with Compound Key From: Gianny Damour gianny.damour@optusnet.com.au Date: Wed, May 30, 2007 7:07 am To: user@geronimo.apache.org Hi Mark, I had a look to the openejb-jar DD and I think you need to drop the foreign-key-column-on-source/ element from the Committee- CommitteeMembers relation. This optional element means that the foreign key columns declared in the following cmr-field-mapping elements are defined by the CMP declared by relationship-role-source. So, this should work: ejb-relation ejb-relation-nameCommittee-CommitteeMembers/ejb-relation- name ejb-relationship-role ejb-relationship-role-nameCommittee-has-many- CommitteeMembers/ ejb-relationship-role-name relationship-role-source ejb-nameCommitteeEntity/ejb-name /relationship-role-source cmr-field cmr-field-namecommitteeMembers/cmr-field-name /cmr-field role-mapping cmr-field-mapping key-columnCommitteeId/key-column foreign-key-columnCommitteeId/foreign-key-column /cmr-field-mapping /role-mapping /ejb-relationship-role /ejb-relation Also, you do not need to declare both sides of a relationship: the above is enough to declare the CMR mapping for the Committee- CommitteeMembers relation. BTW, I strongly recommend you to upgrade to OpenEJB3: this should be a seamless migration from a CMP perspective as the OpenEJB guys have done a fantastic work at writing an OpenEJB2 schema converter. Thanks, Gianny On 30/05/2007, at 1:07 AM, Mark Aufdencamp wrote: I could really use some help on this! I have a two Entity beans with a bi-directional relationship, committees and committee_members. Committees has a single field primary key of committeeId. Committee_members has a compound primary key of CommitteeId+UserId. A Foreign Key constraint has been defined for the committee_members table based on the committeeId. I can't seem to get this to deploy and believe it's my openejb-jar.xml deployment descriptor in the relationship section. I've looked at examples from JBoss and Sun, so I'm fairly certain my ejb- jar.xml is correct. Does anyone have a working example of a bi-directional relatioship where the many table has a compound key that I can take a look at? Where can I find documentation on how OpenEJB and TranQL interact to create the O/R map? This knowledge are really seems to be lacking documentation in Geronimo. I'd really like to draw some pretty pictures of tables and beans with the seven different relationship types defined for EJB 2.1. This would be good preliminary work for documenting EJB 3.0 examples. Please help me learn, so I can contribute:) TIA, Mark Aufdencamp Mark@Aufdencamp.com http://email.secureserver.net/ pcompose.php? aEmlPart=0type=replyfolder=INBOX.Apache.Geronimo.Usersuid=108#Comp ose