Re: Problem with using tomcat Datasource inside a servlet.

2006-01-29 Thread Peter Rossbach

Sorry,

I think you define your DataSource inside the GlobalNamingResources  
section, but your first jndi parameter are correct (java:comp/env/ 
jdbc/be_Publisher).


You need a ResourceLink inside you app context.

Define a file META-INF/context.xml

Context
   ResourceLink
name=jdbc/be_Publisher
global=jdbc/be_Publisher
type=java.sql.DataSource
  /
/Context


Links:
http://tomcat.apache.org/tomcat-5.5-doc/config/globalresources.html
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html#Resource% 
20Links
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples- 
howto.html


Peter



Am 28.01.2006 um 14:54 schrieb Legolas Woodland:


Peter Rossbach wrote:

Wrong lookup name:

Use:

java:comp/jdbc/be_Publisher

Peer


Am 28.01.2006 um 11:03 schrieb Legolas Woodland:


java:comp/env/jdbc/be_Publisher);


I change it according to your advice but it still return the same  
error.
some more description : when i deploy the application  , if i add  
the same data source as that image shows to my application data  
sources node it will works
but in test env , it is very hard to define a data source each time  
that i run the application.


Thank you

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






Re: Problem with using tomcat Datasource inside a servlet.

2006-01-28 Thread Peter Rossbach

Wrong lookup name:

Use:

java:comp/jdbc/be_Publisher

Peer


Am 28.01.2006 um 11:03 schrieb Legolas Woodland:


java:comp/env/jdbc/be_Publisher);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with using tomcat Datasource inside a servlet.

2006-01-28 Thread Legolas Woodland

Peter Rossbach wrote:

Wrong lookup name:

Use:

java:comp/jdbc/be_Publisher

Peer


Am 28.01.2006 um 11:03 schrieb Legolas Woodland:


java:comp/env/jdbc/be_Publisher);



I change it according to your advice but it still return the same error.
some more description : when i deploy the application  , if i add the 
same data source as that image shows to my application data sources node 
it will works
but in test env , it is very hard to define a data source each time that 
i run the application.


Thank you

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]