Article View: borland.public.jbuilder.linux
Article #312jBuilderX, Tomcat, and JNDI
From: Edward A Thompson
Date: Sun, 25 Jan 2004 14:16
Date: Sun, 25 Jan 2004 14:16
97 lines
3880 bytes
3880 bytes
I have seen posts on this sort of thing before, but never a solution.
I am trying to run Tomcat under jBuilder X, but while my standalone
Tomcat works fine, calling from jbuilder does not. I get a Naming
exception when I try to reference my datasource.
javax.naming.NameNotFoundException: Name java:comp is not bound in
this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:811)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.ed4becky.mComics.ProfileDAO.<init>(ProfileDAO.java:24)
Here is my server8080.xml file. Ay suggestions? What am I not
setting up properly?
<?xml version="1.0" encoding="UTF-8"?>
<Server debug="0" port="8081" shutdown="SHUTDOWN">
<Service name="Tomcat-Standalone">
<Connector acceptCount="10"
className="org.apache.coyote.tomcat4.CoyoteConnector"
connectionTimeout="60000" debug="0" maxProcessors="75"
minProcessors="5" port="8080"/>
<Engine debug="0" defaultHost="localhost" name="Standalone">
<Host appBase="D:\MYDATA\JavaProjects\mComics\Tomcat\webapps"
debug="0" name="localhost" unpackWARs="true">
<!-- Ed's comics Context -->
<Context path="/mComics" docBase="/mComics" debug="1"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="comics_log." suffix=".txt"
timestamp="true"/>
<Resources className="org.apache.naming.resources.FileDirContext"
allowLinking="true" />
<Resource name="jdbc/ComicAppDB"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/ComicAppDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>4</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>*******</value>
</parameter>
<parameter>
<name>password</name>
<value>*******</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://*******/comics</value>
</parameter>
</ResourceParams>
</Context>
</Host>
</Engine>
</Service>
</Server>
Technical Details
Message-ID:
<d913df37.0401250616.4f0025a@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107590,6d2bc75d10075a59,start X-Google-Attributes: gid107590,public X-Google-ArrivalTime: 2004-01-25 06:16:47 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: ed4becky_2000@yahoo.com (Edward A Thompson) Newsgroups: borland.public.jbuilder.linux Subject: jBuilderX, Tomcat, and JNDI Date: 25 Jan 2004 06:16:47 -0800 Organization: http://groups.google.com Lines: 97 Message-ID: <d913df37.0401250616.4f0025a@posting.google.com> NNTP-Posting-Host: 24.25.86.107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1075040207 1550 127.0.0.1 (25 Jan 2004 14:16:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Jan 2004 14:16:47 +0000 (UTC)