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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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  ?



   
  
  
factoryorg.apache.commons.dbcp.BasicDataSourceFactory
driverClassNameorg.postgresql.Driver
urljdbc:postgresql://127.0.0.1:5432/larco
maxActive60
maxIdle20
username*
password*
  



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:
 For additional
commands, e-mail: 





--
To unsubscribe, e-mail:
 For additional
commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




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

2003-01-13 Thread Peng Tuck Kwok
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:   
For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: