You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peng Tuck Kwok <pe...@makmal.net> on 2003/01/13 10:34:01 UTC

Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

The name is not defined correctly in that context.
What kind of a resource is it  ?

David Durst wrote:
> Does anyone know what this is caused by?????
> I have admin/larco defined as a resource in server.xml
> and I am using the resource under admin.
> 
> Why is this causing a problem????
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat Won't start on NT

Posted by Raj <n_...@chennai.tcs.co.in>.
In Control Panel>Services, Tomcat is Started. In the processes list, I can
see Tomcat.exe, but it is not running because I can't view localhost:8080. I
even tried reading the startup.bat file and figured out that it calls
CATALINA.bat with a start option. So, I typed catalina start, but didn't
work.

----- Original Message -----
From: Triptpal Singh Lamba <tr...@cs.sunysb.edu>
To: 'Tomcat Users List' <to...@jakarta.apache.org>
Sent: Monday, January 13, 2003 5:01 PM
Subject: RE: Tomcat Won't start on NT


>
> Raj do a ctrl alt delete and tell us if tomcat the process is running or
> not. It is possible that you chose run as a system process while
> installing on NT.
>
> To do a double check run it as you are and then check
> http://localhost:portno/
>
> If u see the page - it means tomcat is running as a background process
> and u need to make it not "disappear". If not then tomcat could be
> throwing some expceptions which is the 2nd thing we will go for.
>
> Tript Singh
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat Won't start on NT

Posted by Triptpal Singh Lamba <tr...@cs.sunysb.edu>.
Raj do a ctrl alt delete and tell us if tomcat the process is running or
not. It is possible that you chose run as a system process while
installing on NT.

To do a double check run it as you are and then check
http://localhost:portno/

If u see the page - it means tomcat is running as a background process
and u need to make it not "disappear". If not then tomcat could be
throwing some expceptions which is the 2nd thing we will go for.

Tript Singh


-----Original Message-----
From: Raj [mailto:n_rajmohan@chennai.tcs.co.in]
Sent: Monday, January 13, 2003 5:51 AM
To: Tomcat Users List
Subject: Tomcat Won't start on NT


Hi,
I installed Tomcat 4.1.17 on Win NT 4. Installation went through fine
without any problems. Previously, I have installed JDK 1.3.0. When I
started installing, it said "Using JDK found in c:\jdk1.3". Then, when I
click on
Start>Program Files>Apache Group>Start Tomcat, nothing happens. The
Start>console
window comes up, stays for a second, and then vanishes....It is working
on a different Win NT machine. What could be the problem?

Thanks and regards,
Raj


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Tomcat Won't start on NT

Posted by Raj <n_...@chennai.tcs.co.in>.
Hi,
I installed Tomcat 4.1.17 on Win NT 4. Installation went through fine
without any problems. Previously, I have installed JDK 1.3.0. When I started
installing, it said "Using JDK found in c:\jdk1.3". Then, when I click on
Start>Program Files>Apache Group>Start Tomcat, nothing happens. The console
window comes up, stays for a second, and then vanishes....It is working on a
different Win NT machine. What could be the problem?

Thanks and regards,
Raj


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
David Durst wrote:
>>I've used DBCP on 4.1.12 and 4.0.X
> 
> 
> well, its now working.
> Strangely enough haveing the driver in WEB-INF/lib causes a problem,
> somone should document that on the page (Specifically telling people where to
> put the jar)
Strangely enough they did. If you have some time and go through the 
docs(which you should anyway) it is mentioned there.



> 
> Thanks for the help
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> I've used DBCP on 4.1.12 and 4.0.X

well, its now working.
Strangely enough haveing the driver in WEB-INF/lib causes a problem,
somone should document that on the page (Specifically telling people where to
put the jar)

Thanks for the help



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
print out the connection object. See what it says.
For example in this code fragment :

  datafinder = new JNDIFinder("java:comp/env/jdbc/AthenaDB") ;
  ds = datafinder.ReturnDataSource() ;
  if(ds!=null){
  	Connection conn = ds.getConnection() ;
	System.out.println(conn.toString()) ;


Should result in some text with the word DBCP being printed out along 
with a number.

David Durst wrote:
>>I've used DBCP on 4.1.12 and 4.0.X
> 
> BTW how do you verify that the connections are being pooled????
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> I've used DBCP on 4.1.12 and 4.0.X
BTW how do you verify that the connections are being pooled????



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
I've used DBCP on 4.1.12 and 4.0.X

David Durst wrote:
>>David Durst wrote:
>>
>>>>Sounds like you don't have the appropiate driver loaded or you have
>>>>incorrectly specified your pgsql driver in server.xml. Double check
>>>>the values. I make that mistake alot.
>>>
>>>
>>>I have gotten that answer like 10 times now :(
>>>I have the correct driver specified :)
>>>I must have because I had this all working up until about 30 minutes
>>>ago.
>>
>>Well ....
>>
>>
>>>I have the jar in both common/lib/ and sfadmin/WEB-INF/lib
>>
>>You should only have it in common/lib, for this purpose.
> 
> I will remove it from sfadmin/WEB-INF/lib
> see what I get.
> 
> BTW what version of Tomcat are you using???
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> David Durst wrote:
>>>Sounds like you don't have the appropiate driver loaded or you have
>>> incorrectly specified your pgsql driver in server.xml. Double check
>>> the values. I make that mistake alot.
>>
>>
>> I have gotten that answer like 10 times now :(
>> I have the correct driver specified :)
>> I must have because I had this all working up until about 30 minutes
>> ago.
> Well ....
>
>>
>> I have the jar in both common/lib/ and sfadmin/WEB-INF/lib
> You should only have it in common/lib, for this purpose.
I will remove it from sfadmin/WEB-INF/lib
see what I get.

BTW what version of Tomcat are you using???



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
David Durst wrote:
>>Sounds like you don't have the appropiate driver loaded or you have
>>incorrectly specified your pgsql driver in server.xml. Double check the
>>values. I make that mistake alot.
> 
> 
> I have gotten that answer like 10 times now :(
> I have the correct driver specified :)
> I must have because I had this all working up until about 30 minutes ago.
Well ....

> 
> I have the jar in both common/lib/ and sfadmin/WEB-INF/lib
You should only have it in common/lib, for this purpose.


> 
> I am starting to think the whole DBCP thing is very unstable.
It's working for me and quite a few other people who have been using it.
I've used it on postgresql as well. Works like a charm. Currently using 
it on sapdb, about three to four sites. Some other guy I know is using 
oracle.


> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> Sounds like you don't have the appropiate driver loaded or you have
> incorrectly specified your pgsql driver in server.xml. Double check the
> values. I make that mistake alot.

I have gotten that answer like 10 times now :(
I have the correct driver specified :)
I must have because I had this all working up until about 30 minutes ago.

I have the jar in both common/lib/ and sfadmin/WEB-INF/lib

I am starting to think the whole DBCP thing is very unstable.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
Sounds like you don't have the appropiate driver loaded or you have 
incorrectly specified your pgsql driver in server.xml. Double check the 
values. I make that mistake alot.

David Durst wrote:
>>Sure it won't work.
>>Check out the res-ref-name. Here you claim it is admin/larco , but in
>>server.xml you tell tomcat it is jdbc/larco. So if you do a lookup for
>>jdbc/larco or admin/larco the name is not bound to the context.
>>admin/larco should be jdbc/larco.
>>Make the changes and see if it works.
> 
> Sorry that is because I had been moving the names back and forth to try to
> get them to work.
> 
> I just un-commented, changed the name, stopped & started tomcat.
> 
> This is what I get now :)
> java.sql.SQLException: Cannot load JDBC driver class 'null'
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> Sure it won't work.
> Check out the res-ref-name. Here you claim it is admin/larco , but in
> server.xml you tell tomcat it is jdbc/larco. So if you do a lookup for
> jdbc/larco or admin/larco the name is not bound to the context.
> admin/larco should be jdbc/larco.
> Make the changes and see if it works.
Sorry that is because I had been moving the names back and forth to try to
get them to work.

I just un-commented, changed the name, stopped & started tomcat.

This is what I get now :)
java.sql.SQLException: Cannot load JDBC driver class 'null'



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
Sure it won't work.
Check out the res-ref-name. Here you claim it is admin/larco , but in 
server.xml you tell tomcat it is jdbc/larco. So if you do a lookup for 
jdbc/larco or admin/larco the name is not bound to the context. 
admin/larco should be jdbc/larco.
Make the changes and see if it works.

David Durst wrote:
>>The server.xml looks right .
>>What about the web.xml in your webapp ?
>>How does it look like ?
> 
> The strange thing is, I don't have it defined in the web.xml.
> 
> That is because as soon as I do it I got a jdbc connection 'null' can't be
> loaded or something like that.
> 
> But I had it working w/ out it for the last 3 hours.
> 
> Now it won't work.
> 
> but here is the web.xml nyways
> 
> <web-app>
> <!--  <resource-ref>
>     <description>postgreSQL Datasource example</description>
>     <res-ref-name>admin/larco</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>   </resource-ref> -->
> </web-app>
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> The server.xml looks right .
> What about the web.xml in your webapp ?
> How does it look like ?
The strange thing is, I don't have it defined in the web.xml.

That is because as soon as I do it I got a jdbc connection 'null' can't be
loaded or something like that.

But I had it working w/ out it for the last 3 hours.

Now it won't work.

but here is the web.xml nyways

<web-app>
<!--  <resource-ref>
    <description>postgreSQL Datasource example</description>
    <res-ref-name>admin/larco</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref> -->
</web-app>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by Peng Tuck Kwok <pe...@makmal.net>.
The server.xml looks right .
What about the web.xml in your webapp ?
How does it look like ?

David Durst wrote:
>>The name is not defined correctly in that context.
>>What kind of a resource is it  ?
>>
> 
>        <Context path="/admin" docBase="sfadmin" debug="1">
>           <Resource name="jdbc/larco" auth="Container"
> type="javax.sql.DataSource"/>
>           <ResourceParams name="jdbc/larco">
>             <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
>             <parameter><name>driverClassName</name><value>org.postgresql.Driver</value></parameter>
>             <parameter><name>url</name><value>jdbc:postgresql://127.0.0.1:5432/larco</value></parameter>
>             <parameter><name>maxActive</name><value>60</value></parameter>
>             <parameter><name>maxIdle</name><value>20</value></parameter>
>             <parameter><name>username</name><value>*****</value></parameter>
>             <parameter><name>password</name><value>*****</value></parameter>
>           </ResourceParams>
>         </Context>
> 
>>David Durst wrote:
>>
>>>Does anyone know what this is caused by?????
>>>I have admin/larco defined as a resource in server.xml
>>>and I am using the resource under admin.
>>>
>>>Why is this causing a problem????
>>>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><ma...@jakarta.apache.org> For additional
>>>commands, e-mail: <ma...@jakarta.apache.org>
>>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><ma...@jakarta.apache.org> For additional
>>commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: javax.naming.NameNotFoundException: Name admin is not bound in this Context

Posted by David Durst <dd...@larubber.com>.
> The name is not defined correctly in that context.
> What kind of a resource is it  ?
>
       <Context path="/admin" docBase="sfadmin" debug="1">
          <Resource name="jdbc/larco" auth="Container"
type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/larco">
            <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
            <parameter><name>driverClassName</name><value>org.postgresql.Driver</value></parameter>
            <parameter><name>url</name><value>jdbc:postgresql://127.0.0.1:5432/larco</value></parameter>
            <parameter><name>maxActive</name><value>60</value></parameter>
            <parameter><name>maxIdle</name><value>20</value></parameter>
            <parameter><name>username</name><value>*****</value></parameter>
            <parameter><name>password</name><value>*****</value></parameter>
          </ResourceParams>
        </Context>

> David Durst wrote:
>> Does anyone know what this is caused by?????
>> I have admin/larco defined as a resource in server.xml
>> and I am using the resource under admin.
>>
>> Why is this causing a problem????
>>
>>
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org> For additional
>> commands, e-mail: <ma...@jakarta.apache.org>
>>
>>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org> For additional
> commands, e-mail: <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>