Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 27973 invoked from network); 18 Jun 2005 04:32:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jun 2005 04:32:31 -0000 Received: (qmail 52821 invoked by uid 500); 18 Jun 2005 04:32:27 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 52769 invoked by uid 500); 18 Jun 2005 04:32:27 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 52755 invoked by uid 99); 18 Jun 2005 04:32:26 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from shawidc-mo1.cg.shawcable.net (HELO pd4mo1so.prod.shaw.ca) (24.71.223.10) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2005 21:32:26 -0700 Received: from pd4mr4so.prod.shaw.ca (pd4mr4so-qfe3.prod.shaw.ca [10.0.141.215]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0II9004QTJ7AEJC0@l-daemon> for dev@geronimo.apache.org; Fri, 17 Jun 2005 22:30:46 -0600 (MDT) Received: from pn2ml5so.prod.shaw.ca ([10.0.121.149]) by pd4mr4so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0II900NJ9J7A2Y60@pd4mr4so.prod.shaw.ca> for dev@geronimo.apache.org; Fri, 17 Jun 2005 22:30:46 -0600 (MDT) Received: from nsdev.org (S01060080c6f962f3.cg.shawcable.net [68.146.99.67]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0II900C5DJ7AQF@l-daemon> for dev@geronimo.apache.org; Fri, 17 Jun 2005 22:30:46 -0600 (MDT) Received: from [10.0.0.7] (speedy.nsdev.org [10.0.0.7]) by nsdev.org (Postfix) with ESMTP id A46E73C008 for ; Sat, 18 Jun 2005 02:13:51 -0400 (EDT) Date: Fri, 17 Jun 2005 22:30:38 -0600 From: Neal Sanche Subject: Application Scoped JDBC Connector for CMP To: dev@geronimo.apache.org Message-id: <42B3A36E.3060608@nsdev.org> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi All, I'm currently having trouble with a CMP bean getting access to a MySql database when the deployment plans for the JDBC Connector are application scoped. Here's what I've done, can you see something wrong with what I'm doing? application.xml phonebook-ejb.jar phonebook.war /phonebook tranql-connector-1.0-SNAPSHOT.rar geronimo-application.xml tranql-connector-1.0-SNAPSHOT.rar mysql-plan.xml mysql-plan.xml mysql/jars/mysql-connector-java-3.1.8-bin.jar javax.sql.DataSource MysqlDataSource geronimo geronimo com.mysql.jdbc.Driver jdbc:mysql://localhost/geronimo false org.tranql.connector.NoExceptionsAreFatalSorter 10 0 5000 30 jdbc/MysqlDatabase openejb-jar.xml org/acme/PhoneBook MysqlDatabase MysqlDataSource PhoneBookEntry PhoneBookEntry java:comp/env/ejb/PhoneBookEntryLocal phone name name phoneNumber phone jdbc/basic/entityDatabase null MysqlDatabase PhonebookDBPool PhoneBookSession org.acme.phonebook.ejb/PhoneBookSession/Home java:comp/env/ejb/PhoneBookSessionLocal and finally, in my ejb-jar.xml inside the I have this: jdbc/basic/entityDatabase javax.sql.DataSource Container Now, the strange thing is that if I deploy the mysql-plan.xml file in the global scoped fashion, I can write the the database by creating CMP beans. But if I use the application scoped method, I get the following error: 22:15:19,898 WARN [SystemExceptionInterceptor] PhoneBookSession java.lang.NullPointerException at org.tranql.sql.DataSourceDelegate.getConnection(DataSourceDelegate.ja va:36) at org.tranql.sql.jdbc.JDBCUpdateCommand.execute(JDBCUpdateCommand.java: 62) at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:5 9) at org.tranql.cache.SimpleFlushStrategy.flush(SimpleFlushStrategy.java:4 6) at org.tranql.cache.InTxCache.flush(InTxCache.java:85) at org.apache.geronimo.transaction.context.AbstractTransactionContext.fl ushState(AbstractTransactionContext.java:116) at org.apache.geronimo.transaction.context.InheritableTransactionContext .complete(InheritableTransactionContext.java:172) at org.apache.geronimo.transaction.context.InheritableTransactionContext .commit(InheritableTransactionContext.java:143) at org.openejb.transaction.ContainerPolicy$TxRequiresNew.invoke(Containe rPolicy.java:246) at org.openejb.transaction.TransactionContextInterceptor.invoke(Transact ionContextInterceptor.java:80) at org.openejb.slsb.StatelessInstanceInterceptor.invoke(StatelessInstanc eInterceptor.java:98) at org.openejb.transaction.ContainerPolicy$TxRequiresNew.invoke(Containe rPolicy.java:234) at org.openejb.transaction.TransactionContextInterceptor.invoke(Transact... What am I doing wrong for Application scoping my database configuration? Thanks in advance, and sorry for all of the cut-n-pasting here. Cheers. -Neal