Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 63522 invoked from network); 21 Jun 2002 16:44:11 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Jun 2002 16:44:11 -0000 Received: (qmail 19192 invoked by uid 97); 21 Jun 2002 16:44:02 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 19154 invoked by uid 97); 21 Jun 2002 16:44:01 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 19142 invoked by uid 98); 21 Jun 2002 16:44:01 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Subject: Re: [jdbc2pool] Database "" does not exist in the system catalog ???? From: John McNally To: Jakarta Commons Developers List In-Reply-To: <20020621131641.90247.qmail@web20507.mail.yahoo.com> References: <20020621131641.90247.qmail@web20507.mail.yahoo.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.3 Date: 21 Jun 2002 09:43:44 -0700 Message-Id: <1024677824.1593.25.camel@localhost.localdomain> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm not sure on the 4.1 part either. There has been no release of jdbc2pool. the jar should have the 1.0-dev modifier. The tomcat code is just the configuration code needed to use the pool within tomcat. Tomcat documentation shows several examples, the code Brian showed was specific to jdbc2pool. john mcnally On Fri, 2002-06-21 at 06:16, Randy Speh wrote: > Could you guys elaborate on where this tomcat code > resides and where the jdbc2pool-4.1.jar is. I've been > using the jdbc2pool code a while now, but I'm not sure > where besides Torque that the jdbc2pool code is used. > > Thanks, > Randy Speh > > --- John McNally wrote: > > I have a similar setup and it is working, it is > > using mysql though. > > Are you able to access the db using the driver > > directly? The error you > > are seeing is coming from the database server, i > > think. The database > > does not appear to be setup. > > > > john mcnally > > > > > > On Thu, 2002-06-20 at 11:56, Brian Millett wrote: > > > I am running tomcat 4.1.3-b, latest cvs co (this > > am) of commons-sandbox > > > (commons-lang-1.0-dev.jar, jdbc2pool-4.1.jar, > > commons-pool.jar, & > > > commons-dbcp.jar) on a redhat 7.2, jdk build > > 1.4.0_01-b03. > > > > > > My server.xml cruft is: (inside of the /examples > > context) > > > > > > > > auth="Container" > > > > > > type="org.apache.commons.jdbc2pool.adapter.DriverAdapterCPDS"/> > > > > > > parameter>factory > > > > > > > > > org.apache.commons.jdbc2pool.adapter.DriverAdapterCPDS > > > > > > > > > maxActive100 > > > > > > maxIdle30000 > > > > > > maxWait100 > > > > > > userXXXXXX > > > > > > passwordXXXXX > > > > > > driver > > > > > org.postgresql.Driver > > > > > > url > > > > > jdbc:postgresql://vlad:5432/tropicos > > > > > > > > > > > > > > > > > type="org.apache.commons.jdbc2pool.Jdbc2PoolDataSource"/> > > > > > > factory > > > > > > org.apache.commons.jdbc2pool.Jdbc2PoolDataSource > > > > > > dataSourceName > > > > > java:comp/env/jdbc/tropicosDB > > > > > > > > > defaultMaxConnections30 > > > maxExpiryTime3600 > > > connectionWaitTimeout10 > > > logInterval10 > > > > > > > > > > > > OK, now in the web.xml in the /examples/WEB-INF > > dir I have: > > > > > > > > > Resource reference to a factory for > > java.sql.Connection > > > instances that may be used for talking > > to a particular > > > database that is configured in the > > server.xml file. > > > > > > jdbc/tropicosDB > > > > > > > > > org.apache.commons.jdbc2pool.adapter.DriverAdapterCPDS > > > Container > > > > > > > > > > > > Resource reference to a factory for > > java.sql.Connection > > > instances that may be used for talking > > to a particular > > > database that is configured in the > > server.xml file. > > > > > > jdbc/tropicos > > > > > > > > > org.apache.commons.jdbc2pool.Jdbc2PoolDataSource > > > Container > > > > > > > > > > > > OK, I now try to access a servlet DBDumperPool > > where this section of > > > code causes an error: > > > Context initCtx = new InitialContext(); > > > Context envCtx = (Context) > > initCtx.lookup("java:comp/env"); > > > DataSource ds = > > (DataSource)envCtx.lookup("jdbc/tropicos"); > > > // Connect to database > > > out.println("

Connecting to Database JNI > > Context = > > > jdbc/tropicos

"); > > > Connection conn = ds.getConnection(); > > > out.println("

Connected...Now creating a > > statement

"); > > > st = conn.createStatement(); > > > > > > > > > The error is: > > > java.lang.RuntimeException: Backend start-up > > failed: FATAL 1: Database > > > "tropicos" does not exist in the system catalog. > > > > > > at > > > > > > org.apache.commons.jdbc2pool.KeyedCPDSConnectionFactory.makeObject(KeyedCPDSConnectionFactory.java:173) > > > at > > > > > > org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(Unknown > > > Source) > > > at > > > > > > org.apache.commons.jdbc2pool.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:879) > > > at > > > > > > org.apache.commons.jdbc2pool.Jdbc2PoolDataSource.getConnection(Jdbc2PoolDataSource.java:821) > > > at DBDumperPool.testDB(DBDumperPool.java:105) > > > at DBDumperPool.doGet(DBDumperPool.java:29) > > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > > > > > > > Line 105 is Connection conn = ds.getConnection();. > > > > > > > > > I've tried real hard to understand how to setup > > the jdbc2pool package > > > with tomcat. I do not know what a > > KeyedCPDSConnection is. > > > > > > What is the correct steps? > > > > > > Any hints, ideas, etc would be very helpful. > > > > > > Thanks. > > > -- > > > Brian Millett > > > Enterprise Consulting Group "Shifts in > > paradigms > > > (314) 205-9030 often cause > > nose bleeds." > > > bpm@ec-group.com Greg Glenn > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > > > For additional commands, e-mail: > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > > > For additional commands, e-mail: > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: