You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gmail <sr...@jsrsys.com> on 2013/01/19 20:32:30 UTC
Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Due to a hard disk failure, I had to reinstall Tomcat 5.0.28 and MySQL 5.0.8 on my WindowsXP development machine.
I have updated sever.xml and context.xml using the parameters from my production Linux Ubuntu server, adding Global Naming Resources to server.xml and creating context.xml (which both reside in etc/Tomcat5.5 on the server).
I located both files in Tomcat5.0/conf directory. I am using Eclipse to develop code to be deployed to the Linux server. When I start Tomcat, I don't get any errors, but when I try to access MySQL in get the Name jdbc... error. I have been tweaking the parameters, following many Q&A sites via Goggling. At one point I moved the context.xml to the Catalina/localhost directory. That time I could see context.xml being read, but it also threw a 'path not found' exception. From the Tomcat 5 documentation it seems that it should not matter whether context.xml is in ... conf or ... localhost directories, so I can't explain the different behavior.
If context.xml needs to be in localhost, then what should the path= parameter be. I did not have it coded, then added path="/", which did not seem to make any difference.
Thanks for any advice. I had hoped to find a "sample" of server.xml and context.xml for WindowsXP. Thanks in advance for any help steering me in the right direction. Part of the problem is that I did the original Windows XP installation in 2006, and I have lost a few brain cells since then.
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Steve,
On 1/22/13 11:59 PM, sryder@jsrsys.com wrote:
> I thought you had hit the nail on the head of 5.0 vs. 5.5, but when
> I recoded the short form into the long form I still get the same
> error. I am ready to install a new Tomcat. Is there any reason to
> NOT go to most recent 7.x release?
In general, there's no reason not to upgrade all the way. I personally
went from 4.1 up through 7.0 over the past few years because I wanted
as few surprises as possible. I probably wasted my own time. The
biggest jump for me was going from 4.1 -> 5.5 because of many
configuration changes. Most of those were in 5.0 so you should have
less of a headache than I did.
As long as your web app doesn't rely on some weird old bug, you should
be able to simply drop it into a running Tomcat 7 instance with no
additional configuration and have it auto-deploy and "just work". That
is, if you have META-INF/context.xml setup properly with your JNDI
DataSource.
Since you want a shared data source, your best bet is to put a
<Resource> element (<ResourceParams are no longer required) in
conf/server.xml and a <ResourceLink> in each webapp's
META-INF/context.xml. I prefer the use of META-INF/context.xml because
then the app generally works when you move it between container
installs, rather than having some magic make it work in one place but
not another. If you don't have a META-INF/context.xml, you may
completely forget that the server-default links a JNDI object for you
and you won't be able to figure out why it does work one place and not
in another. Sounds familiar, huh?
> I realize that as long as I stay at Java 5 and MySQL 5 I don't have
> to worry about writing code that won't work on the production
> machine (which is more difficult to change).
Java 5 and MySQL 5 should be fine. Tomcat 7 actually requires Java 6,
though. I believe that every system on which Java runs can tolerate
more than one Java version installed side-by-side, so you might want
to talk to your NOC team about installing Java 1.7 before Java 1.8
ships in November.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlEAIMQACgkQ9CaO5/Lv0PDuPACgksD7m8kcC4PHCJLJTOHjIwX8
znQAn07eisQGFN0UZd7Yy1rnPZFu/ET3
=aNAU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Posted by sr...@jsrsys.com.
I thought you had hit the nail on the head of 5.0 vs. 5.5, but when I
recoded the short form into the long form I still get the same error. I am
ready to install a new Tomcat. Is there any reason to NOT go to most
recent 7.x release?
I realize that as long as I stay at Java 5 and MySQL 5 I don't have to worry
about writing code that won't work on the production machine (which is more
difficult to change).
I really do appreciate the thought you have given this, above and beyond.
Thank you.
You commented:
It's possible that Tomcat 5.0 doesn't support the short-form of
<Resource> like Tomcat 5.5, 6.0, and 7.0 do. You might have to do it
the long-way like you have in server.xml.
I find it odd that you are defining once in server.xml and once in
context.xml. How about this:
server.xml
<Resource name="jdbc/MySqlDB" ... />
<ResourceParams>
...
</ResourceParams>
context.xml
<Context>
<ResourceLink name="jdbc/MySql"
type="javax.sql.DataSource"
global="jdbc/MySqlDB" />
</Context>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 1/22/13 1:50 PM, sryder@jsrsys.com wrote:
> conf is: Program Files/Apache Software Foundation/Tomcat5.0/conf
> (where server xml resides).
>
> When I put context.xml in that directory, it seemed to be ignored.
If the file is in fact named context.xml, it should set the defaults
for all loaded applications. You may not get a message on stdout
saying that it is processed, but that doesn't mean it's not being
processed.
Remember that you are using an ancient, unsupported, buggy, and likely
vulnerable version of Tomcat. My comments and suggestions reflect
current best practices and how Tomcat currently works with a
properly-supported version. YMMV.
> I did some experimenting moving it around and when I put it in:
> Program Files/Apache Software
> Foundation/Tomcat5.0/conf/Catalina/localhost the console log in
> Eclipse showed it was being processed AND gave me the path error.
If the file was called context.xml, then you were trying to deploy a
web application on the URL patn "/context". That's probably not what
you wanted.
> The max active 3 is for my development environment only so I will
> catch my failure to do an sql.close() during testing on the
> development machine.
Why not 1? If anything else, you run the risk of deadlocking your DBCP
in production.
> Yes, I want one shared connection pool. Security is provided via
> application code, and I personally code ALL the apps. each app has
> it's own database.
So you have separate databases but you want a shared connection pool?
Odd, but it should work.
> I attach the two files that are now both in ONLY the Program
> Files/Apache Software Foundation/Tomcat5.0/conf directory.
>
> The exception stack is: :*WARNING*Connection to jdbc/MySql::
> connect Other exception: Name jdbc is not bound in this Context
> 2013-01-22
> 12:42:00:Stack(6)=org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
>
> 2013-01-22
> 12:42:00:Stack(5)=org.apache.jsp.SQLRep_jsp._jspService(SQLRep_jsp.java:610)
>
> 2013-01-22
> 12:42:00:Stack(4)=com.jsrsys.web.JsrSQL.(JsrSQL.java:42)
> 2013-01-22
> 12:42:00:Stack(3)=com.jsrsys.web.JsrSQL.setDataBaseName(JsrSQL.java:86)
>
>
2013-01-22 12:42:00:Stack(2)=com.jsrsys.web.JsrSQL.connect(JsrSQL.java:504)
> 2013-01-22
> 12:42:00:Stack(1)=org.apache.naming.NamingContext.lookup(NamingContext.java:151)
>
> 2013-01-22
> 12:42:00:Stack(0)=org.apache.naming.NamingContext.lookup(NamingContext.java:768)
>
> 2013-01-22 12:42:00:JsrSQL: Context cast successfull
>
> SQLRep is the jsp page, JsrSQL is my class that handles all SQL.
> The base errors seems to be the NamingContextLookup error from
> Apache tomcat.
Okay.
context.xml
- -----------
<?xml version="1.0" encoding="UTF-8"?>
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/MySql" auth="Container"
type="javax.sql.DataSource"
url="jdbc:mysql://localhost/autoReconnect=true"
driverClassName="com.mysql.jdbc.Driver"
password="jsrsys" username="jsrsys"
maxWait="10000" maxActive="200" maxIdle="5"
removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true"
validationQuery="SELECT 1" testOnBorrow="true"
/>
</Context>
It's possible that Tomcat 5.0 doesn't support the short-form of
<Resource> like Tomcat 5.5, 6.0, and 7.0 do. You might have to do it
the long-way like you have in server.xml.
I find it odd that you are defining once in server.xml and once in
context.xml. How about this:
server.xml
<Resource name="jdbc/MySqlDB" ... />
<ResourceParams>
...
</ResourceParams>
context.xml
<Context>
<ResourceLink name="jdbc/MySql"
type="javax.sql.DataSource"
global="jdbc/MySqlDB" />
</Context>
That should give you a single connection pool and then all web
applications should get a link to it.
I'm still not sure why you wouldn't just have a META-INF/context.xml
file in each of your web applications... setting global defaults in
conf/context.xml is usually not a great idea.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlD+4+EACgkQ9CaO5/Lv0PAMrACfaEzuSJKmWqVkKcmFH7hkoTbG
CY4AoKD9QBI5cYEdrNo0fuubRLnlgdsB
=t+eC
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Posted by sr...@jsrsys.com.
conf is: Program Files/Apache Software Foundation/Tomcat5.0/conf (where
server xml resides).
When I put context.xml in that directory, it seemed to be ignored. I did
some experimenting moving it around and when I put it in: Program
Files/Apache Software Foundation/Tomcat5.0/conf/Catalina/localhost
the console log in Eclipse showed it was being processed AND gave me the
path error.
The max active 3 is for my development environment only so I will catch my
failure to do an sql.close() during testing on the development machine. The
production machine has 200.
Yes, I want one shared connection pool. Security is provided via
application code, and I personally code ALL the apps.
each app has it's own database.
I have made all the changes you suggested below and still get the error.
I have deleted the context.xml in localhost. I attach the two files that
are now both in ONLY the
Program Files/Apache Software Foundation/Tomcat5.0/conf directory.
The exception stack is:
:*WARNING*Connection to jdbc/MySql:: connect Other exception: Name jdbc is
not bound in this Context
2013-01-22
12:42:00:Stack(6)=org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
2013-01-22
12:42:00:Stack(5)=org.apache.jsp.SQLRep_jsp._jspService(SQLRep_jsp.java:610)
2013-01-22 12:42:00:Stack(4)=com.jsrsys.web.JsrSQL.(JsrSQL.java:42)
2013-01-22
12:42:00:Stack(3)=com.jsrsys.web.JsrSQL.setDataBaseName(JsrSQL.java:86)
2013-01-22 12:42:00:Stack(2)=com.jsrsys.web.JsrSQL.connect(JsrSQL.java:504)
2013-01-22
12:42:00:Stack(1)=org.apache.naming.NamingContext.lookup(NamingContext.java:151)
2013-01-22
12:42:00:Stack(0)=org.apache.naming.NamingContext.lookup(NamingContext.java:768)
2013-01-22 12:42:00:JsrSQL: Context cast successfull
SQLRep is the jsp page, JsrSQL is my class that handles all SQL. The base
errors seems to be the NamingContextLookup error from Apache tomcat.
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Dude,
On 1/21/13 11:32 PM, sryder@jsrsys.com wrote:
>> Why don't you show us what you've got, and we can suggest some
>> improvements?
>
> Thank you. This one is in localhost: <Context path="/"> <!--
> put this one in localhost add path because of "Context path is
> required" error-->
What do you mean "in localhost"? Please give full paths. Unless it's
in server.xml, it shouldn't have a "path" attribute. This is in 5.0.x,
and I can't remember how it all worked way back then. You really need
to upgrade.
> <ResourceLink name="jdbc/MySql" type="javax.sql.DataSource"
> global="jdbc/MySqlDB" />
If you have your <Resource> (below) defined within the <Context>, you
don't need a <ResourceLink>. Also, it appears that you have defined
this DataSource twice: once locally and once globally.
> <!-- below all copied from ...conf context.xml file-->
What does ...conf context.xml mean? Again, please give a full path.
> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Resource
> name="jdbc/MySql" auth="Container" type="javax.sql.DataSource"
> url="jdbc:mysql://localhost/autoReconnect=true"
> factory="org.apache.commons.dbcp.BasicDataSourceFactory"
Don't specify the factory unless you really want to be absolutely sure
that factory gets used. Tomcat knows what factory to use by default,
and I believe what you have there is the default.
> Below is near top of server.xml in conf directory <!-- Global JNDI
> resources --> <GlobalNamingResources> <Environment
> name="simpleValue" type="java.lang.Integer" value="30"/> <Resource
> auth="Container" description="User database that can be updated and
> saved" name="UserDatabase"
> type="org.apache.catalina.UserDatabase"/>
Do you need Tomcat's UserDatabase? Check to see if you do.
> <Resource auth="Container" name="jdbc/MySqlDB"
> type="javax.sql.DataSource"/>
Do you really need a globally-accessible DataSource? How many webapps
do you have? They all use the same username/password and same
database? You want a shared connection pool for them all?
> <ResourceParams name="UserDatabase"> <parameter>
> <name>factory</name>
> <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
WTF?
> </parameter> <parameter> <name>pathname</name>
> <value>conf/tomcat-users.xml</value> </parameter>
> </ResourceParams> <ResourceParams name="jdbc/MySqlDB"> <parameter>
> <name>factory</name>
> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
You are specifying the "factory" twice. Stop that.
> </parameter> <parameter> <name>url</name>
> <value>jdbc:mysql://localhost/autoReconnect=true</value>
Read the MySQL Connector/J manual about "autoReconnect". Remember you
are using a connection pool which is already capable of testing
connections and re-connecting for you.
> <parameter> <name>maxActive</name> <value>3</value> <!-- so will
> fail early if sql.close() missing --> </parameter>
The comment here does not make any sense. If you want to catch
connections that aren't returned to the pool, you'll want to use the
"abandoned" capabilities of the pool. See
http://commons.apache.org/dbcp/configuration.html
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlD+o8MACgkQ9CaO5/Lv0PDrcQCgpErUILnl9O+YTx5kM8ROxKC4
H+8AnjRd2mPg8BL0XIF9jZQz8ySxEcj+
=1l4p
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Posted by sr...@jsrsys.com.
> Why don't you show us what you've got, and we can suggest some
> improvements?
Thank you. This one is in localhost:
<Context path="/"> <!-- put this one in localhost add path because of
"Context path is required" error-->
<ResourceLink name="jdbc/MySql" type="javax.sql.DataSource"
global="jdbc/MySqlDB" />
<!-- below all copied from ...conf context.xml file-->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource name="jdbc/MySql" auth="Container" type="javax.sql.DataSource"
url="jdbc:mysql://localhost/autoReconnect=true"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"
driverClassName="com.mysql.jdbc.Driver"
password="******" username="jsrsys"
maxWait="10000" maxActive="200" maxIdle="5"
removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true"
validationQuery="SELECT 1" testOnBorrow="true"
/>
</Context>
Below is near top of server.xml in conf directory
<!-- Global JNDI resources -->
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Resource auth="Container" description="User database that can be
updated and saved"
name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
<Resource auth="Container" name="jdbc/MySqlDB"
type="javax.sql.DataSource"/>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
<ResourceParams name="jdbc/MySqlDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/autoReconnect=true</value>
</parameter>
<parameter>
<name>password</name>
<value>********</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>3</value> <!-- so will fail early if sql.close() missing -->
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>jsrsys</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>5</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
To whom it may concern,
On 1/20/13 2:49 PM, sryder@jsrsys.com wrote:
> "shouldn't it be easy to determine where the file should go in
> your development environment?" One would think so. On the linux
> environment it is under etc/Tomcat5.5/ the same directory as
> server.xml
If it's under /etc/, then it's probably using a package-managed
version of Tomcat, which routinely have files in surprising locations.
I don't believe there are any package-managers for Windows that
support Tomcat, so you are probably using one directly from Apache (or
you should be).
> However, when I put it in the ...conf directory on Windows, it
> appears that it is ignored, in the eclipse console startup log I
> don't see any entry for context.xml.
So you went from using a package-managed version on Linux to an
Eclipse-deployed version on Microsoft Windows? No wonder you are
confused. I personally have no idea how Tomcat works through Eclipse.
I tend to stay-away from anything that "magically" works. Start Tomcat
using the command-line scripts or as a Windows Service with the
service runner that comes with Tomcat. You'll be a lot happier with
that configuration over time. ... unless you want to deploy to
production through Eclipse for some reason.
> I have tried to find Tomcat5 documentation on placement of
> context.xml file.
A file called context.xml exists in conf/context.xml and you may add
one under META-INF/context.xml in any web application. The former is
the global, default context.xml for the whole server and the latter is
obviously per-webapp. It's up to you which is more appropriate for
your needs.
> Even better would be sample code for jdbc context.xml.
There are samples in the Tomcat users' guide.
> I don't want to have a copy for each webapp, just one that applies
> to all webapps.
You want the same JDBC resource for all of your webapps? I would
recommend against doing it using conf/context.xml, but that would be
the way to do it.
Why don't you show us what you've got, and we can suggest some
improvements?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlD95gcACgkQ9CaO5/Lv0PDHTQCeLWjXUzkCCdAK+G4Bm8VHydE7
RtsAn1ZCsoS+suDlj0+yngA1Fw2HzFye
=UH0J
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Posted by sr...@jsrsys.com.
"shouldn't it be easy to determine where the file should go in your
development environment?"
One would think so. On the linux environment it is under etc/Tomcat5.5/
the same directory as server.xml
However, when I put it in the ...conf directory on Windows, it appears that
it is ignored, in the eclipse console startup log I don't see any entry for
context.xml.
I have tried to find Tomcat5 documentation on placement of context.xml file.
Even better would be sample code for jdbc context.xml. I don't want to
have a copy for each webapp, just one that applies to all webapps.
----- Original Message -----
From: "Christopher Schultz" <ch...@christopherschultz.net>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Sunday, January 20, 2013 11:13 AM
Subject: Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> To whom it may concern,
>
> On 1/19/13 10:54 PM, Gmail wrote:
>> The production machine (Ubuntu) is Tomcat 5.0, which is why I need
>> to keep my development machine at the same level so I can test
>> changes to xml files, and then upload to the server. Only in this
>> case I am going backwards due to a disk crash. I am confident
>> the files are correct as they are working on the Ubuntu server.
>> What I don't know is in which directory I need to put the
>> context.xml file. According to the 5.0 doc it should not matter
>> whether if the file in in ...conf or ... localhost, yet I get
>> different behavior depending on which place I put it. I get no
>> startup messages about context.xml when in ...conf (home of
>> server.xml), I do see startup messages about other xml files in
>> local host, which is why I moved it there, thus getting the path
>> missing error. I know 5.0 is old, but it is what I am stuck with.
>
> If you have a running production instance with context.xml in the
> right place, shouldn't it be easy to determine where the file should
> go in your development environment?
>
> FWIW, I think your primary objective should be to get your webapp
> running on a supported version of Tomcat: there are known security
> vulnerabilities in 5.0 that will never be patched.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEAREIAAYFAlD8JbwACgkQ9CaO5/Lv0PCeIwCgwfKROCGal4IenW3vPWHqAmIi
> hvIAn1vxCMQpNjzRkcuyxnQZ+84fKWKZ
> =zaQ7
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
To whom it may concern,
On 1/19/13 10:54 PM, Gmail wrote:
> The production machine (Ubuntu) is Tomcat 5.0, which is why I need
> to keep my development machine at the same level so I can test
> changes to xml files, and then upload to the server. Only in this
> case I am going backwards due to a disk crash. I am confident
> the files are correct as they are working on the Ubuntu server.
> What I don't know is in which directory I need to put the
> context.xml file. According to the 5.0 doc it should not matter
> whether if the file in in ...conf or ... localhost, yet I get
> different behavior depending on which place I put it. I get no
> startup messages about context.xml when in ...conf (home of
> server.xml), I do see startup messages about other xml files in
> local host, which is why I moved it there, thus getting the path
> missing error. I know 5.0 is old, but it is what I am stuck with.
If you have a running production instance with context.xml in the
right place, shouldn't it be easy to determine where the file should
go in your development environment?
FWIW, I think your primary objective should be to get your webapp
running on a supported version of Tomcat: there are known security
vulnerabilities in 5.0 that will never be patched.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEAREIAAYFAlD8JbwACgkQ9CaO5/Lv0PCeIwCgwfKROCGal4IenW3vPWHqAmIi
hvIAn1vxCMQpNjzRkcuyxnQZ+84fKWKZ
=zaQ7
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
Posted by Gmail <sr...@jsrsys.com>.
The production machine (Ubuntu) is Tomcat 5.0, which is why I need to keep
my development machine at the same level so I can test changes to xml files,
and then upload to the server. Only in this case I am going backwards due
to a disk crash. I am confident the files are correct as they are working
on the Ubuntu server. What I don't know is in which directory I need to put
the context.xml file. According to the 5.0 doc it should not matter
whether if the file in in ...conf or ... localhost, yet I get different
behavior depending on which place I put it. I get no startup messages about
context.xml when in ...conf (home of server.xml), I do see startup messages
about other xml files in local host, which is why I moved it there, thus
getting the path missing error. I know 5.0 is old, but it is what I am
stuck with.
----- Original Message -----
From: "Caldarale, Charles R" <Ch...@unisys.com>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Saturday, January 19, 2013 2:51 PM
Subject: RE: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
> From: Mark Eggers [mailto:its_toasted@yahoo.com]
> Subject: Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
> Context" on WindowsXP.
> In short, upgrade to at least 6.0 (6.0.36 as I write this).
7.0 would be better.
Also, never, never copy configuration elements from one major level of
Tomcat to another. The syntax and semantics pretty much always change, and
configuration errors are often not detectable programmatically.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mark Eggers [mailto:its_toasted@yahoo.com]
> Subject: Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this Context" on WindowsXP.
> In short, upgrade to at least 6.0 (6.0.36 as I write this).
7.0 would be better.
Also, never, never copy configuration elements from one major level of Tomcat to another. The syntax and semantics pretty much always change, and configuration errors are often not detectable programmatically.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Fw: Tomcat 5.0.28 jdbc error "Name jdbc is not bound in this
Context" on WindowsXP.
Posted by Mark Eggers <it...@yahoo.com>.
On 1/19/2013 11:32 AM, Gmail wrote:
> Due to a hard disk failure, I had to reinstall Tomcat 5.0.28 and
> MySQL 5.0.8 on my WindowsXP development machine.
>
> I have updated sever.xml and context.xml using the parameters from my
> production Linux Ubuntu server, adding Global Naming Resources to
> server.xml and creating context.xml (which both reside in
> etc/Tomcat5.5 on the server).
>
> I located both files in Tomcat5.0/conf directory. I am using
> Eclipse to develop code to be deployed to the Linux server. When I
> start Tomcat, I don't get any errors, but when I try to access MySQL
> in get the Name jdbc... error. I have been tweaking the parameters,
> following many Q&A sites via Goggling. At one point I moved the
> context.xml to the Catalina/localhost directory. That time I could
> see context.xml being read, but it also threw a 'path not found'
> exception. From the Tomcat 5 documentation it seems that it should
> not matter whether context.xml is in ... conf or ... localhost
> directories, so I can't explain the different behavior.
>
> If context.xml needs to be in localhost, then what should the path=
> parameter be. I did not have it coded, then added path="/", which
> did not seem to make any difference.
>
> Thanks for any advice. I had hoped to find a "sample" of server.xml
> and context.xml for WindowsXP. Thanks in advance for any help
> steering me in the right direction. Part of the problem is that I
> did the original Windows XP installation in 2006, and I have lost a
> few brain cells since then.
>
I don't even know how old 5.0.x is these days. It hasn't been worked on
in a long time.
5.5.x reached end of life a bit ago.
In short, upgrade to at least 6.0 (6.0.36 as I write this).
Same for MySQL. Current version is 5.5.29.
1. Start with a fresh install of 6.0.36 and MySQL 5.5.29.
2. Use an updated version of J2EE Eclipse (or switch to NetBeans)
3. Associate Tomcat 6.0.36 with Eclipse - Server project
4. Follow the instructions on the Tomcat web site.
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
. . . . just my two cents.
/mde/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org