Re: Re: Tomcat Struts Datasource problem

2005-07-29 Thread Anoop kumar V
Another link - describing a similar problem as yours:

http://www.theserverside.com/discussions/thread.tss?thread_id=25459

Check it out.
Anoop

On 7/29/05, Kristofer Le Bras [EMAIL PROTECTED] wrote:
 Thank you for your answer Anoop ;)
 but I already see website of jakarta (it dosen't work)
 Kris74
 
  De: Anoop kumar V [EMAIL PROTECTED]
  A: Kris74 [EMAIL PROTECTED], Tomcat Users List 
  tomcat-user@jakarta.apache.org
  Objet: Re: Tomcat Struts Datasource problem
  Date: Thu, 28 Jul 2005 14:50:21 -0400
 
  Did you check out this link:
 
  a 
  href=http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.htmlhttp://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html/a
  HTH,
  Anoop
 
  On 7/27/05, Kris74 [EMAIL PROTECTED] wrote:
   Thank you for your answer on my topic.
  
   I am using Tomcat 5, (I have 2 versions : 5.0.28 and 5.5.9)
  
   I have post also in group Apache
   tomcat:a 
   href=http://groups.google.fr/group/Apache-Tomcat/browse_thread/thread/ad6e86c0a1dc7568/9e9f70211f4d5076#9e9f70211f4d5076http://groups.google.fr/group/Apache-Tomcat/browse_thread/thread/ad6e86c0a1dc7568/9e9f70211f4d5076#9e9f70211f4d5076/a
   Where are Tomcat users list? On the Website of Tomcat?
  
   Thank you.
  
   Kris74
  
  --
  Thanks and best regards,
  Anoop
 
 Protek-on: CaraMail met en oeuvre un nouveau Concept de Sécurité Globale - 
 www.caramail.com
 


-- 
Thanks and best regards,
Anoop

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



Re: Tomcat Struts Datasource problem

2005-07-28 Thread Anoop kumar V
Did you check out this link:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

HTH,
Anoop

On 7/27/05, Kris74 [EMAIL PROTECTED] wrote:
 Thank you for your answer on my topic.
 
 I am using Tomcat 5, (I have 2 versions : 5.0.28 and 5.5.9)
 
 I have post also in group Apache
 tomcat:http://groups.google.fr/group/Apache-Tomcat/browse_thread/thread/ad6e86c0a1dc7568/9e9f70211f4d5076#9e9f70211f4d5076
 
 Where are Tomcat users list? On the Website of Tomcat?
 
 Thank you.
 
 Kris74
 
 


-- 
Thanks and best regards,
Anoop

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



DataSource problem

2004-02-20 Thread Nathan Maves
Hey guys just joined the alias today!

I am getting the following error from my web app.

NotifyUtil::java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at  
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.init(HttpClient.java:306)
at sun.net.www.http.HttpClient.init(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at  
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnecti 
on.java:512)
at  
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.ja 
va:489)
at  
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConne 
ction.java:560)
at  
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(Noti 
fyUtil.java:237)

What does this mean.  My app seems to be running fine but these errors  
are streaming by in the log.  Here is my server.xml file

ResourceParams name=jdbc/webapps
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@Server_Name:1541:SID/value
  /parameter
  parameter
namepassword/name
valuepassword/value
  /parameter
  parameter
namemaxActive/name
value32/value
  /parameter
  parameter
namemaxWait/name
value5000/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameusername/name
valueuser_name/value
  /parameter
  parameter
namemaxIdle/name
value2/value
  /parameter
/ResourceParams
I am connection to an Oracle 9 DB us iBatis and Struts.

Nathan Maves
Sun Microsystems

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

Re: DataSource problem

2004-02-20 Thread Antonio Fiol Bonnín
This sounds as anything but a DataSource problem.

What are you using NetBeans web monitor module for?

Antonio Fiol

Nathan Maves wrote:

Hey guys just joined the alias today!

I am getting the following error from my web app.

NotifyUtil::java.net.ConnectException: Connection refused


Means server not responding (refusing the connection).

at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at  
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)


Clearly protocol is HTTP.

at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.init(HttpClient.java:306)
at sun.net.www.http.HttpClient.init(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at  
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512) 

at  
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489) 

at  
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:560) 



And finally something that may tell you something...

at  
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:237) 

What does this mean.  


Well... no idea :-(

What are you trying?

Antonio Fiol



smime.p7s
Description: S/MIME Cryptographic Signature


Re: DataSource problem

2004-02-20 Thread Nathan Maves
I was not aware that I was :)

I have turned this off in net beans.  I just use this for my  
development and create a war file with it.  I just drop this war in the  
webapps dir of tomcat.  Now I can't seem to get rid of it!

Nathan

On Feb 20, 2004, at 1:55 PM, Antonio Fiol Bonnín wrote:

This sounds as anything but a DataSource problem.

What are you using NetBeans web monitor module for?

Antonio Fiol

Nathan Maves wrote:

Hey guys just joined the alias today!

I am getting the following error from my web app.

NotifyUtil::java.net.ConnectException: Connection refused


Means server not responding (refusing the connection).

at java.net.PlainSocketImpl.socketConnect(Native Method)
at  
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at   
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)


Clearly protocol is HTTP.

at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient.init(HttpClient.java:306)
at sun.net.www.http.HttpClient.init(HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at   
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnec 
tion.java:512)
at   
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection. 
java:489)
at   
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLCon 
nection.java:560)


And finally something that may tell you something...

at   
org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(No 
tifyUtil.java:237)

What does this mean.


Well... no idea :-(

What are you trying?

Antonio Fiol



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


Datasource problem upgrading from 4.06

2003-11-26 Thread Jim Kennedy
Below is a little bit of the trace I'm seeing.


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'com.
microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'null', cause:
java.lang.NullPointerException
at java.lang.String.regionMatches(String.java:967)
at com.microsoft.jdbc.base.BaseURLParser.parse(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.acceptsURL(Unknown Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.
java:743)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.jav
a:518)
.


I just upgraded from Tomcat 4.06 to 4.1.29.  I've made no changes to code or web.xml.  
Just a straight copy of my app over to the new server.  Here's a snippet of my 
server.xml.  The below config for the context is the same (which worked on 4.06).  I'm 
having problems with the jdbc/eaglepro datasource.

Context path=/cds docBase=D:\serverapps\Tomcat 4.1\webapps-noauto\cds 
reloadable=true debug=0 crossContext=true
Logger className=org.apache.catalina.logger.FileLogger 
prefix=localhost_cds_log. suffix=.log timestamp=true/
Environment name=maxExemptions type=java.lang.Integer value=15/
Parameter name=context.param.name value=context.param.value override=false/
Resource name=jdbc/eaglepro auth=SERVLET type=javax.sql.DataSource/
ResourceParams name=jdbc/eaglepro
parameternameuser/name
valueeflowuser_t/value
/parameter
parameternamepassword/name
value#$%^*/value
/parameter
parameternamedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameternamedriverName/name
   
valuejdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=jtest;SelectMethod=cursor/value
/parameter
/ResourceParams

Resource name=mail/bay4 auth=Container type=javax.mail.Session/ 
ResourceParams name=mail/bay4 
parameter namemail.smtp.host/name 
valuesmtp.algx.net/value 
/parameter 
/ResourceParams 

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
connectionURL=jdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=eflow_dev;User=eflowadmin;Password=#$%^*;SelectMethod=cursor
userTable=ef_users userNameCol=user_name userCredCol=user_password
userRoleTable=j2ee_user_roles roleNameCol=role_name/

/Context


RE: Datasource problem upgrading from 4.06

2003-11-26 Thread Shapira, Yoav

Howdy,
You need a ResourceParam for the DB URL.  It looks like your driver name
me be the URL?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:30 PM
To: Tomcat Users List
Subject: Datasource problem upgrading from 4.06

Below is a little bit of the trace I'm seeing.


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class 'com.
microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'null',
cause:
java.lang.NullPointerException
at java.lang.String.regionMatches(String.java:967)
at com.microsoft.jdbc.base.BaseURLParser.parse(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.acceptsURL(Unknown
Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.
java:743)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
av
a:518)
.


I just upgraded from Tomcat 4.06 to 4.1.29.  I've made no changes to
code
or web.xml.  Just a straight copy of my app over to the new server.
Here's
a snippet of my server.xml.  The below config for the context is the
same
(which worked on 4.06).  I'm having problems with the jdbc/eaglepro
datasource.

Context path=/cds docBase=D:\serverapps\Tomcat
4.1\webapps-noauto\cds
reloadable=true debug=0 crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_cds_log. suffix=.log timestamp=true/
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name value=context.param.value
override=false/
Resource name=jdbc/eaglepro auth=SERVLET
type=javax.sql.DataSource/
ResourceParams name=jdbc/eaglepro
parameternameuser/name
valueeflowuser_t/value
/parameter
parameternamepassword/name
value#$%^*/value
/parameter
parameternamedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameternamedriverName/name

valuejdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=jtest;
Sele
ctMethod=cursor/value
/parameter
/ResourceParams

Resource name=mail/bay4 auth=Container
type=javax.mail.Session/
ResourceParams name=mail/bay4
parameter namemail.smtp.host/name
valuesmtp.algx.net/value
/parameter
/ResourceParams

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
connectionURL=jdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseNam
e=ef
low_dev;User=eflowadmin;Password=#$%^*;SelectMethod=cursor
userTable=ef_users userNameCol=user_name
userCredCol=user_password
userRoleTable=j2ee_user_roles roleNameCol=role_name/

/Context



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Datasource problem upgrading from 4.06

2003-11-26 Thread Jim Kennedy
How do I define host and database name with this version?

Need a good example to look at.  Thanks

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:41 PM
Subject: RE: Datasource problem upgrading from 4.06



Howdy,
You need a ResourceParam for the DB URL.  It looks like your driver name
me be the URL?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:30 PM
To: Tomcat Users List
Subject: Datasource problem upgrading from 4.06

Below is a little bit of the trace I'm seeing.


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class 'com.
microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'null',
cause:
java.lang.NullPointerException
at java.lang.String.regionMatches(String.java:967)
at com.microsoft.jdbc.base.BaseURLParser.parse(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.acceptsURL(Unknown
Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSourc
e.
java:743)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
av
a:518)
.


I just upgraded from Tomcat 4.06 to 4.1.29.  I've made no changes to
code
or web.xml.  Just a straight copy of my app over to the new server.
Here's
a snippet of my server.xml.  The below config for the context is the
same
(which worked on 4.06).  I'm having problems with the jdbc/eaglepro
datasource.

Context path=/cds docBase=D:\serverapps\Tomcat
4.1\webapps-noauto\cds
reloadable=true debug=0 crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_cds_log. suffix=.log timestamp=true/
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name value=context.param.value
override=false/
Resource name=jdbc/eaglepro auth=SERVLET
type=javax.sql.DataSource/
ResourceParams name=jdbc/eaglepro
parameternameuser/name
valueeflowuser_t/value
/parameter
parameternamepassword/name
value#$%^*/value
/parameter
parameternamedriverClassName/name
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameternamedriverName/name

valuejdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=jtest;
Sele
ctMethod=cursor/value
/parameter
/ResourceParams

Resource name=mail/bay4 auth=Container
type=javax.mail.Session/
ResourceParams name=mail/bay4
parameter namemail.smtp.host/name
valuesmtp.algx.net/value
/parameter
/ResourceParams

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
connectionURL=jdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseNam
e=ef
low_dev;User=eflowadmin;Password=#$%^*;SelectMethod=cursor
userTable=ef_users userNameCol=user_name
userCredCol=user_password
userRoleTable=j2ee_user_roles roleNameCol=role_name/

/Context



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



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



RE: Datasource problem upgrading from 4.06

2003-11-26 Thread Shapira, Yoav

Howdy,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:47 PM
To: Tomcat Users List
Subject: Re: Datasource problem upgrading from 4.06

How do I define host and database name with this version?

Need a good example to look at.  Thanks

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:41 PM
Subject: RE: Datasource problem upgrading from 4.06



Howdy,
You need a ResourceParam for the DB URL.  It looks like your driver
name
me be the URL?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:30 PM
To: Tomcat Users List
Subject: Datasource problem upgrading from 4.06

Below is a little bit of the trace I'm seeing.


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class 'com.
microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'null',
cause:
java.lang.NullPointerException
at java.lang.String.regionMatches(String.java:967)
at com.microsoft.jdbc.base.BaseURLParser.parse(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.acceptsURL(Unknown
Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSour
c
e.
java:743)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.
j
av
a:518)
.


I just upgraded from Tomcat 4.06 to 4.1.29.  I've made no changes to
code
or web.xml.  Just a straight copy of my app over to the new server.
Here's
a snippet of my server.xml.  The below config for the context is the
same
(which worked on 4.06).  I'm having problems with the jdbc/eaglepro
datasource.

Context path=/cds docBase=D:\serverapps\Tomcat
4.1\webapps-noauto\cds
reloadable=true debug=0 crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_cds_log. suffix=.log timestamp=true/
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name value=context.param.value
override=false/
Resource name=jdbc/eaglepro auth=SERVLET
type=javax.sql.DataSource/
ResourceParams name=jdbc/eaglepro
parameternameuser/name
valueeflowuser_t/value
/parameter
parameternamepassword/name
value#$%^*/value
/parameter
parameternamedriverClassName/name

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameternamedriverName/name

valuejdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=jtest
;
Sele
ctMethod=cursor/value
/parameter
/ResourceParams

Resource name=mail/bay4 auth=Container
type=javax.mail.Session/
ResourceParams name=mail/bay4
parameter namemail.smtp.host/name
valuesmtp.algx.net/value
/parameter
/ResourceParams

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
connectionURL=jdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseNa
m
e=ef
low_dev;User=eflowadmin;Password=#$%^*;SelectMethod=cursor
userTable=ef_users userNameCol=user_name
userCredCol=user_password
userRoleTable=j2ee_user_roles roleNameCol=role_name/

/Context



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary
and/or privileged.  This e-mail is intended only for the individual(s)
to
whom it is addressed, and may not be saved, copied, printed, disclosed
or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



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




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Datasource problem upgrading from 4.06

2003-11-26 Thread Jim Kennedy
Much thanks, I can figure it out from here.

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

Actual link above.

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:57 PM
Subject: RE: Datasource problem upgrading from 4.06



Howdy,
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples
-howto.html

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:47 PM
To: Tomcat Users List
Subject: Re: Datasource problem upgrading from 4.06

How do I define host and database name with this version?

Need a good example to look at.  Thanks

Jim Kennedy
IT Consultant
Mobile Phone: 813-503-1484
-


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:41 PM
Subject: RE: Datasource problem upgrading from 4.06



Howdy,
You need a ResourceParam for the DB URL.  It looks like your driver
name
me be the URL?

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Jim Kennedy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 12:30 PM
To: Tomcat Users List
Subject: Datasource problem upgrading from 4.06

Below is a little bit of the trace I'm seeing.


org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
class 'com.
microsoft.jdbc.sqlserver.SQLServerDriver' for connect URL 'null',
cause:
java.lang.NullPointerException
at java.lang.String.regionMatches(String.java:967)
at com.microsoft.jdbc.base.BaseURLParser.parse(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.acceptsURL(Unknown
Source)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSour
c
e.
java:743)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.
j
av
a:518)
.


I just upgraded from Tomcat 4.06 to 4.1.29.  I've made no changes to
code
or web.xml.  Just a straight copy of my app over to the new server.
Here's
a snippet of my server.xml.  The below config for the context is the
same
(which worked on 4.06).  I'm having problems with the jdbc/eaglepro
datasource.

Context path=/cds docBase=D:\serverapps\Tomcat
4.1\webapps-noauto\cds
reloadable=true debug=0 crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_cds_log. suffix=.log timestamp=true/
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name value=context.param.value
override=false/
Resource name=jdbc/eaglepro auth=SERVLET
type=javax.sql.DataSource/
ResourceParams name=jdbc/eaglepro
parameternameuser/name
valueeflowuser_t/value
/parameter
parameternamepassword/name
value#$%^*/value
/parameter
parameternamedriverClassName/name

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameternamedriverName/name

valuejdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseName=jtest
;
Sele
ctMethod=cursor/value
/parameter
/ResourceParams

Resource name=mail/bay4 auth=Container
type=javax.mail.Session/
ResourceParams name=mail/bay4
parameter namemail.smtp.host/name
valuesmtp.algx.net/value
/parameter
/ResourceParams

Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
connectionURL=jdbc:microsoft:sqlserver://192.168.2.14:1433;DatabaseNa
m
e=ef
low_dev;User=eflowadmin;Password=#$%^*;SelectMethod=cursor
userTable=ef_users userNameCol=user_name
userCredCol=user_password
userRoleTable=j2ee_user_roles roleNameCol=role_name/

/Context



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential,
proprietary
and/or privileged.  This e-mail is intended only for the individual(s)
to
whom it is addressed, and may not be saved, copied, printed, disclosed
or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



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




This e-mail, including any attachments, is a confidential business
communication, and may contain information

Datasource Problem - NameNotFoundException

2003-03-19 Thread Perez Pola, Jorge
Hello all,

I got a problem trying to configure tomcat in order to use a Datasource.
 
The server is running SunOs 5.8. with tomcat 4.1.18
 
I have this context defined in the server.xml
 

!--=== TEST CONTEXT
 --
Context className=org.apache.catalina.core.StandardContext
crossContext=false reloadable=false
mapperClass=org.apache.catalina.core.StandardContextMapper
useNaming=false debug=0 swallowOutput=false privileged=false
wrapperClass=org.apache.catalina.core.StandardWrapper docBase=gmep
cookies=true path=/gmep cachingAllowed=true
charsetMapperClass=org.apache.catalina.util.CharsetMapper
 
Realm className=org.apache.catalina.realm.JDBCRealm debug=99
driverName=oracle.jdbc.driver.OracleDriver userNameCol=user_id
connectionName=xx userTable=USER_ID userCredCol=user_passwd
digest=MD5 validate=true
connectionURL=jdbc:oracle:thin:@2xx.239.1xx.235:1521:gmep
userRoleTable=USER_ID roleNameCol=user_group
connectionPassword=appassword/
 
Resource name=jdbc/gmepDB scope=Shareable type=javax.sql.DataSource/
 ResourceParams name=jdbc/gmepDB
  parameter
   namevalidationQuery/name
   valueselect * from user_id/value
  /parameter
  parameter
   namemaxWait/name
   value5000/value
  /parameter
  parameter
   namemaxActive/name
   value4/value
  /parameter
  parameter
   namepassword/name
   valueanypassword/value
  /parameter
  parameter
   nameurl/name
   valuejdbc:oracle:thin:@xx.259.146.xx:1521:eghl/value
  /parameter
  parameter
   namedriverClassName/name
   valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
   namemaxIdle/name
   value2/value
  /parameter
  parameter
   nameusername/name
   valueperepo/value
  /parameter
   /ResourceParams
/Context
!--  END TEST CONTEXT = --

 
Notice that the context also has a Security Realm for logging purposes, and
it works OK
 
Also added to the web.xml 
 
resource-ref
 descriptionTESTDatasource/description
 res-ref-namejdbc/gmepDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

The code on the class:
 
  Context initialContext = new InitialContext();
  Context envContext  = (Context)initialContext.lookup(java:comp/env);
  dataSource = (DataSource)envContext.lookup(jdbc/gmepDB);
 
The exception:

Name java: is not bound in this Context
javax.naming.NameNotFoundException: Name java: is not bound in this
Context
 
Clues :
 
- Classes for oracle : classes12.jar in  CATALINA_HOME/server/lib
  - Security Realm Works 
- jdk 1.2 (also tried with jdk 1.3.1)
  - I have also tried trying  java:/comp/env comp/env  hundreds
con combinations in the lookup, but nothing works.
  
 
 
I have read lot of messages regarding this issue.
 
But anyone could help me or give me a clue, this problem is really driving
me crazy.
 
Thanks in advance,
Cheers.
 
 
 
 



RE: JDBC Datasource problem

2002-12-16 Thread Eddie Liang
Yuva,
   I guess that your database server is Oracle. If that is the case, try to
change  javax.sql.DataSource to 
oracle.jdbc.pool.OracleConnectionCacheImpl in server.xml and web.xml.


Eddie Liang
Database Architect
Phone: 630-810-9669 x253


-Original Message-
From: Chandolu, Yuva [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 14, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: JDBC Datasource problem

Hi,

I am getting org.apache.jasper.JasperException: Cannot create resource
instance when I am trying to get connection from the DBCP pool. the jsp
code I wrote is...

=
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)envCtx.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();
=

And I have following in my web.xml

=
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description

resource-ref
descriptionArbinet's Oracle Datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

/web-app
==

And I have following in my server.xml

==
Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource/ 

ResourceParams name=jdbc/myoracle
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@1.1.1.1:1521:testdb/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams
==

I also have downloaded commons DBCP version 1.0 and Pool 1.0 and copied the
zip files to commons/lin folder and renamed to jar files. Tomcat 4.1.12 doc
mentioned that I should also copy commons collection 2.0 jar but when I copy
collections 2.0 jar in commons\lib Tomcat is not starting at all :-(. So I
have kept back the collections.jar in commons\lib that came with
Tomcat.4.1.12.

Please some one help me getting out of the problem. I also tried deleting
javax.sql.* files from classes12.jar (jdbc oracle client stuff, which I have
in commons\lib folder) and no luck.

Thanks in advance.

-Yuva

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




JDBC Datasource problem

2002-12-14 Thread Chandolu, Yuva
Hi,

I am getting org.apache.jasper.JasperException: Cannot create resource
instance when I am trying to get connection from the DBCP pool. the jsp
code I wrote is...

=
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)envCtx.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();
=

And I have following in my web.xml

=
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description

resource-ref
descriptionArbinet's Oracle Datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

/web-app
==

And I have following in my server.xml

==
Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource/ 

ResourceParams name=jdbc/myoracle
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@1.1.1.1:1521:testdb/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams
==

I also have downloaded commons DBCP version 1.0 and Pool 1.0 and copied the
zip files to commons/lin folder and renamed to jar files. Tomcat 4.1.12 doc
mentioned that I should also copy commons collection 2.0 jar but when I copy
collections 2.0 jar in commons\lib Tomcat is not starting at all :-(. So I
have kept back the collections.jar in commons\lib that came with
Tomcat.4.1.12.

Please some one help me getting out of the problem. I also tried deleting
javax.sql.* files from classes12.jar (jdbc oracle client stuff, which I have
in commons\lib folder) and no luck.

Thanks in advance.

-Yuva



RE: JDBC Datasource problem

2002-12-14 Thread Chandolu, Yuva
OK, I got out of the org.apache.jasper.JasperException: Cannot create
resource
instance problem. I had copied the DBCP and Pool zip files to commons\lib
folder  and renamed them to .jar files. But the zip files have the actual
jars inside, I extracted them and copied to commons\lib folder.

But now I have a different problem, I get the error
org.apache.jasper.JasperException: Cannot load JDBC driver class 'null'.
What is this and how can I proceed from here? I have Tomcat 4.1.12, JDK1.4.1
installed and have DBCP 1.0, Pool 1.0, Collections 2.0 in commons\lib
folder.

Thanks
Yuva


-Original Message-
From: Chandolu, Yuva [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 14, 2002 4:21 PM
To: [EMAIL PROTECTED]
Subject: JDBC Datasource problem


Hi,

I am getting org.apache.jasper.JasperException: Cannot create resource
instance when I am trying to get connection from the DBCP pool. the jsp
code I wrote is...

=
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource)envCtx.lookup(jdbc/myoracle);
Connection conn = ds.getConnection();
=

And I have following in my web.xml

=
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameWelcome to Tomcat/display-name
  description
 Welcome to Tomcat
  /description

resource-ref
descriptionArbinet's Oracle Datasource/description
res-ref-namejdbc/myoracle/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

/web-app
==

And I have following in my server.xml

==
Resource name=jdbc/myoracle auth=Container
  type=javax.sql.DataSource/ 

ResourceParams name=jdbc/myoracle
  parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
nameurl/name
valuejdbc:oracle:thin:@1.1.1.1:1521:testdb/value
  /parameter
  parameter
nameusername/name
valuetest/value
  /parameter
  parameter
namepassword/name
valuetest/value
  /parameter
  parameter
namemaxActive/name
value20/value
  /parameter
  parameter
namemaxIdle/name
value10/value
  /parameter
  parameter
namemaxWait/name
value-1/value
  /parameter
/ResourceParams
==

I also have downloaded commons DBCP version 1.0 and Pool 1.0 and copied the
zip files to commons/lin folder and renamed to jar files. Tomcat 4.1.12 doc
mentioned that I should also copy commons collection 2.0 jar but when I copy
collections 2.0 jar in commons\lib Tomcat is not starting at all :-(. So I
have kept back the collections.jar in commons\lib that came with
Tomcat.4.1.12.

Please some one help me getting out of the problem. I also tried deleting
javax.sql.* files from classes12.jar (jdbc oracle client stuff, which I have
in commons\lib folder) and no luck.

Thanks in advance.

-Yuva



Re: Tomcat 4.0.4 and DataSource problem

2002-12-08 Thread Jacob Kjome

I believe the 4.0.x versions of Tomcat used Tyrex to implement the JNDI 
DataSource functionality.  I have no experience with that.  However, if you 
move to using Tomcat-4.1.12, I can assure you that things will work for you 
as long as you change user to username.

Jake

At 12:59 PM 12/7/2002 -0800, you wrote:
I am having a problem obtaining a DataSource using Tomcat 4.0.4.

Here is what is in the log:

Data source name is:jdbc/QTDSDEV
java.lang.ClassCastException: org.apache.naming.ResourceRef

Here is my server.xml snippet:

Context path=/myapp docBase=myapp
 debug=5 reloadable=true crossContext=true

   Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_myapp_log. suffix=.txt
   timestamp=true/

   Resource name=jdbc/QTDSDEV
 auth=Container
 type=javax.sql.DataSource/

   ResourceParams name=jdbc/QTDSDEV
  parameter
 nameuser/name
 valuemyuser/value
  /parameter
  parameter
namepassword/name
valuemypassword/value
  /parameter
  parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
  /parameter
  parameter
 namedriverName/name
 valuejdbc:oracle:thin:@172.16.1.244:1521:qtdsdev/value
  /parameter
   /ResourceParams
/Context

Here is my web.xml snippet:

   resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/QTDSDEV/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref

Here is my source code snippet:

   initCtx = new InitialContext();
   dbCtxt = (Context) initCtx.lookup(java:comp/env);
   dataSource = (DataSource) dbCtxt .lookup(jdbc/QTDSDEV);

I have renamed classes12.zip to classes12.jar and placed it in
common/lib.

Thanks in advance for any help you can provide.

Regards,
Dave

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



RE: DataSource problem.

2002-12-07 Thread Jacob Kjome

What does your configuration look like?  Have you read the docs?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

Jake

At 01:21 PM 12/7/2002 +0530, you wrote:

*deep breath.

I'm lost about this... would anyone take a shot at helping me?

Thanks
Manav.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:19 PM
To: Tomcat Users List
Subject: RE: DataSource problem.


I haven't been able to solve this yet... but was wondering if tomcat logs
somewhere that the Resource Manager added a new resource (a DataSource)?

Thanks,
Manav.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 3:46 PM
To: Tomcat Users List
Subject: RE: DataSource problem.


Tried the same with a simplistic jsp page:

%@ page import=java.sql.*, javax.sql.*, javax.naming.* %
% out.println(hello); Context initCtx = new InitialContext(); Context 
envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds = 
(DataSource) envCtx.lookup(jdbc/rtidb); Connection con = 
ds.getConnection(); //DB access code here % And this is what i get: 
java.lang.NullPointerException at 
org.apache.jsp.test$jsp._jspService(test$jsp.java:66) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja 
va:202) at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application 
FilterChain.java:247) at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh 
ain.java:193) at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja 
va:243) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja 
va:190) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 
46) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
64) at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 
) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. 
java:170) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
64) at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 
) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
64) at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
64) at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java 
:174) at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 
1012) at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 
) at java.lang.Thread.run(Thread.java:536) -- 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:


Tomcat 4.0.4 and DataSource problem

2002-12-07 Thread David P. Nesbitt
I am having a problem obtaining a DataSource using Tomcat 4.0.4.

Here is what is in the log:

Data source name is:jdbc/QTDSDEV
java.lang.ClassCastException: org.apache.naming.ResourceRef

Here is my server.xml snippet:

Context path=/myapp docBase=myapp
 debug=5 reloadable=true crossContext=true

   Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_myapp_log. suffix=.txt
   timestamp=true/

   Resource name=jdbc/QTDSDEV 
 auth=Container 
 type=javax.sql.DataSource/

   ResourceParams name=jdbc/QTDSDEV
  parameter
 nameuser/name
 valuemyuser/value
  /parameter
  parameter
namepassword/name
valuemypassword/value
  /parameter
  parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
  /parameter  
  parameter
 namedriverName/name
 valuejdbc:oracle:thin:@172.16.1.244:1521:qtdsdev/value
  /parameter
   /ResourceParams
/Context

Here is my web.xml snippet:

   resource-ref 
  descriptionDB Connection/description 
  res-ref-namejdbc/QTDSDEV/res-ref-name 
  res-typejavax.sql.DataSource/res-type 
  res-authContainer/res-auth 
   /resource-ref

Here is my source code snippet:

   initCtx = new InitialContext();
   dbCtxt = (Context) initCtx.lookup(java:comp/env);
   dataSource = (DataSource) dbCtxt .lookup(jdbc/QTDSDEV);

I have renamed classes12.zip to classes12.jar and placed it in
common/lib.

Thanks in advance for any help you can provide.

Regards,
Dave

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




DataSource problem.

2002-12-06 Thread Manavendra Gupta
Hi,

I am trying to obtain a connection from a DataSource in a test class and
get the following error:

javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file:  java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at tmp.DBTest.init(DBTest.java:15)
at tmp.DBTest.main(DBTest.java:49)

server.xml
==
Context path=/rti docBase=rti debug=4
 reloadable=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=rti_log. suffix=.txt
  timestamp=true/
  Resource name=jdbc/rtidb auth=CONTAINER
type=javax.sql.DataSource/
  ResourceParams name=jdbc/rtidb
parameternameuser/namevaluerealtime/value/parameter

parameternamepassword/namevaluerealtime/value/parameter
parameternamedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value/parameter
parameternamedriverName/name
 valuejdbc:oracle:thin:@rti:1521:rti/value/parameter
  /ResourceParams
/Context

web.xml (for the context rti)
==
resource-ref
 descriptionOracle Datasource example/description
 res-ref-namejdbc/rtidb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

Any idea?

Thanks,
Manav.


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




RE: DataSource problem.

2002-12-06 Thread Manavendra Gupta
Tried the same with a simplistic jsp page:

%@ page import=java.sql.*, javax.sql.*, javax.naming.* %
HTML
BODY
%
out.println(hello);
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/rtidb);
Connection con = ds.getConnection();

//DB access code here

%



And this is what i get:

java.lang.NullPointerException
at org.apache.jsp.test$jsp._jspService(test$jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:536)


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




RE: DataSource problem.

2002-12-06 Thread Manavendra Gupta
I haven't been able to solve this yet... but was wondering if tomcat logs
somewhere that the Resource Manager added a new resource (a DataSource)?

Thanks,
Manav.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 3:46 PM
To: Tomcat Users List
Subject: RE: DataSource problem.


Tried the same with a simplistic jsp page:

%@ page import=java.sql.*, javax.sql.*, javax.naming.* %
HTML
BODY
%
out.println(hello);
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/rtidb);
Connection con = ds.getConnection();

//DB access code here

%



And this is what i get:

java.lang.NullPointerException
at org.apache.jsp.test$jsp._jspService(test$jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:536)


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


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




RE: DataSource problem.

2002-12-06 Thread Manavendra Gupta
*deep breath.

I'm lost about this... would anyone take a shot at helping me?

Thanks
Manav.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:19 PM
To: Tomcat Users List
Subject: RE: DataSource problem.


I haven't been able to solve this yet... but was wondering if tomcat logs
somewhere that the Resource Manager added a new resource (a DataSource)?

Thanks,
Manav.

-Original Message-
From: Manavendra Gupta [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 3:46 PM
To: Tomcat Users List
Subject: RE: DataSource problem.


Tried the same with a simplistic jsp page:

%@ page import=java.sql.*, javax.sql.*, javax.naming.* %
HTML
BODY
%
out.println(hello);
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/rtidb);
Connection con = ds.getConnection();

//DB access code here

%



And this is what i get:

java.lang.NullPointerException
at org.apache.jsp.test$jsp._jspService(test$jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
at java.lang.Thread.run(Thread.java:536)


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


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


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




Re: DataSource problem

2002-11-24 Thread Kwok Peng Tuck
Remove the sql validation parameter in your datasource definition or 
give it a table to select from.

Daniel Tamborelli Alvarenga wrote:

I've installed Tomcat 4.1 on Windows 2000 and MySQL

I've configured the Data Source in the server.xml and that's ok... but when
I try to
get the connection from my source code Tomcat seems to enter in an infinite
loop.

Does anybody know what may be wrong?

Thanks

___
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e acessórios.
http://br.geocities.yahoo.com/

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


 




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




Re: DataSource problem

2002-11-24 Thread Daniel Tamborelli Alvarenga
Ok... now it's working fine...

Thank you very much...

:)

Daniel Tamborelli Alvarenga


- Original Message -
From: Kwok Peng Tuck [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Sunday, November 24, 2002 9:08 PM
Subject: Re: DataSource problem


 Remove the sql validation parameter in your datasource definition or
 give it a table to select from.

 Daniel Tamborelli Alvarenga wrote:

 I've installed Tomcat 4.1 on Windows 2000 and MySQL
 
 I've configured the Data Source in the server.xml and that's ok... but
when
 I try to
 get the connection from my source code Tomcat seems to enter in an
infinite
 loop.
 
 Does anybody know what may be wrong?
 
 Thanks
 
 ___
 Yahoo! GeoCities
 Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e
acessórios.
 http://br.geocities.yahoo.com/
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 
 
 



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

___
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e acessórios.
http://br.geocities.yahoo.com/

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




DataSource problem

2002-11-23 Thread Daniel Tamborelli Alvarenga
I've installed Tomcat 4.1 on Windows 2000 and MySQL

I've configured the Data Source in the server.xml and that's ok... but when
I try to
get the connection from my source code Tomcat seems to enter in an infinite
loop.

Does anybody know what may be wrong?

Thanks

___
Yahoo! GeoCities
Tudo para criar o seu site: ferramentas fáceis de usar, espaço de sobra e acessórios.
http://br.geocities.yahoo.com/

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




AW: JNDI DataSource Problem: MS SQL Server

2002-04-18 Thread Eichfelder, Frank

Hi,

I can't give any solution for this problem, but I can at least give some advice how to 
find a possible solution.

The main problem is that the server.xml-docu says that the parameter-names depend on 
the JDBC-driver used.
When I examined the JDBC-drivers for Cloudscape, MySQL and Oracle, I found that the 
parameters driverClassName and driverName were never used...

In the case of Oracle, it was sufficient to set one parameter url for the 
connection-URL, which contained all necessary information, in the other cases it was 
necessary to set different parameters, i. e. serverName, portNumber, user, password, 
databaseName and so on.

You can get some advice if you look at the corresponding DataSource-class-file (for MS 
SQL Server, it is called BaseDataSource) and look at the public properties offered by 
this class.

For BaseDataSource, these are:
  String dataSourceName;
  String description;
  String password;
  String portNumber;
  String roleName;
  String serverName;
  String user;

Then imagine, what parameters should be necessary for getting a connection to your 
database and set these parameters in your server.xml-file.

I hope this will help you to get a connection to your database.

Frank

 
  -Original Message-
  From: Peter D Wilson [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, April 16, 2002 9:19 PM
  To: Tomcat Users List
  Subject: JNDI DataSource Problem: MS SQL Server
 
 
  Could somebody provide jakarta-tomcat-4.0.3, server.xml +
  web.xml + java
  code,  working fragments similar to those that Eichfelder,
  Frank provided
  earlier today on this mail list. I am using MS SQL Server
  6.5, where the
  direct DriverManager approach outside of Tomcat works perfectly.
 
  In the JNDI approach under Tomcat, I can list context, jdbc
  in context,
  java:comp/env and get my ResourceRef, JobsDataSource from
  the default
  context in server.xml listed, but I am unable to get a 
 DataSource (or
  ConnectionPoolDataSource) returned.
 
  This is a very frustrating exercise!
 
 Hi Peter,
 
 I'm trying the same thing you are. Well, similar.
 I'm using the Beta 2 version of Microsoft's JDBC driver to
 connect to a SQL Server 2000 database. I'm not having much 
 luck with it, though.
 Any help you or anyone else can offer would be very much appreciated.
 
 I tried putting this in my server.xml:
 
 Resource name=jdbc/nutrosDB auth=Container
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/nutrosDB
 
 parameter
 namedatabase/namevaluedbname/value
 /parameter
 
 parameter
 
 namefactory/namevaluecom.microsoft.jdbcx.sqlserver.SQLSe
 rverDataSourceFactory/value
 /parameter
 
 
 parameter
 
 namedriverClassName/namevaluecom.microsoft.jdbc.sqlserve
 r.SQLServerDriver/value
 /parameter
 
 parameter
 
 namedriverName/namevaluejdbc:microsoft:sqlserver://serve
 rbox;user=user;Password=pwd;DatabaseName=dbname/value
 /parameter
 
 parameter
 nameuser/namevalueuser/value
 /parameter
 
 parameter
 namepassword/namevaluepassword/value
 /parameter
 
 /ResourceParams
 
 And this in my web.xml:
 
 resource-ref
 descriptiontest jdbc/nutrosDB/description
 res-ref-namejdbc/nutrosDB/res-ref-name
 
 res-typecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/res-type
 res-authContainer/res-auth
 res-sharing-scopeShareable/res-sharing-scope
 /resource-ref
 
 In my code, I am doing this:
 
 Context initCtx = new InitialContext();
 Context envCtx = (Context)initCtx.lookup(java:comp/env);
 System.out.println( About to get ds.);
 com.microsoft.jdbcx.sqlserver.SQLServerDataSource ds =
 (com.microsoft.jdbcx.sqlserver.SQLServerDataSource)envCtx.look
 up(jdbc/nutrosDB);
 System.out.println(About to get pooledconnection.);
 PooledConnection x = ds.getPooledConnection(usr,pwd);
 System.out.println(About to get connection.);
 Connection conDB1 = x.getConnection();
 
 
 This fails, and here is what is in the log file:
 
  About to get ds.
 javax.naming.NamingException: Cannot create resource instance
 at 
 org.apache.naming.factory.ResourceFactory.getObjectInstance(Re
 sourceFactory.java:167)
 at 
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager
 .java:299)
 at 
 org.apache.naming.NamingContext.lookup(NamingContext.java:834)
 at 
 org.apache.naming.NamingContext.lookup(NamingContext.java:181)
 at 
 org.apache.naming.NamingContext.lookup(NamingContext.java:822)
 at 
 org.apache.naming.NamingContext.lookup(NamingContext.java:194)
 at Nutros.Beans.DatabaseBean.init(Unknown Source)
 at Nutros.Beans.beanBrand.loadProduct(Unknown Source)
 at org.apache.jsp.index$jsp._jspService(index$jsp.java:578)
 at 
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107

RE: JNDI DataSource Problem: MS SQL Server

2002-04-17 Thread Sean LeBlanc



 -Original Message-
 From: Peter D Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 16, 2002 9:19 PM
 To: Tomcat Users List
 Subject: JNDI DataSource Problem: MS SQL Server


 Could somebody provide jakarta-tomcat-4.0.3, server.xml +
 web.xml + java
 code,  working fragments similar to those that Eichfelder,
 Frank provided
 earlier today on this mail list. I am using MS SQL Server
 6.5, where the
 direct DriverManager approach outside of Tomcat works perfectly.

 In the JNDI approach under Tomcat, I can list context, jdbc
 in context,
 java:comp/env and get my ResourceRef, JobsDataSource from
 the default
 context in server.xml listed, but I am unable to get a DataSource (or
 ConnectionPoolDataSource) returned.

 This is a very frustrating exercise!

Hi Peter,

I'm trying the same thing you are. Well, similar.
I'm using the Beta 2 version of Microsoft's JDBC driver to
connect to a SQL Server 2000 database. I'm not having much luck with it, though.
Any help you or anyone else can offer would be very much appreciated.

I tried putting this in my server.xml:

  Resource name=jdbc/nutrosDB auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/nutrosDB

parameter
namedatabase/namevaluedbname/value
/parameter

parameter

namefactory/namevaluecom.microsoft.jdbcx.sqlserver.SQLServerDataSourceFactory/value
/parameter


parameter

namedriverClassName/namevaluecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
/parameter

parameter

namedriverName/namevaluejdbc:microsoft:sqlserver://serverbox;user=user;Password=pwd;DatabaseName=dbname/value
/parameter

parameter
nameuser/namevalueuser/value
/parameter

parameter
namepassword/namevaluepassword/value
/parameter

/ResourceParams

And this in my web.xml:

resource-ref
descriptiontest jdbc/nutrosDB/description
res-ref-namejdbc/nutrosDB/res-ref-name
res-typecom.microsoft.jdbcx.sqlserver.SQLServerDataSource/res-type
res-authContainer/res-auth
res-sharing-scopeShareable/res-sharing-scope
/resource-ref

In my code, I am doing this:

Context initCtx = new InitialContext();
Context envCtx = (Context)initCtx.lookup(java:comp/env);
System.out.println( About to get ds.);
com.microsoft.jdbcx.sqlserver.SQLServerDataSource ds =
(com.microsoft.jdbcx.sqlserver.SQLServerDataSource)envCtx.lookup(jdbc/nutrosDB);
System.out.println(About to get pooledconnection.);
PooledConnection x = ds.getPooledConnection(usr,pwd);
System.out.println(About to get connection.);
Connection conDB1 = x.getConnection();


This fails, and here is what is in the log file:

 About to get ds.
javax.naming.NamingException: Cannot create resource instance
at 
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at Nutros.Beans.DatabaseBean.init(Unknown Source)
at Nutros.Beans.beanBrand.loadProduct(Unknown Source)
at org.apache.jsp.index$jsp._jspService(index$jsp.java:578)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564

JNDI DataSource Problem: MS SQL Server

2002-04-16 Thread Peter D Wilson

Could somebody provide jakarta-tomcat-4.0.3, server.xml + web.xml + java
code,  working fragments similar to those that Eichfelder, Frank provided
earlier today on this mail list. I am using MS SQL Server 6.5, where the
direct DriverManager approach outside of Tomcat works perfectly.

In the JNDI approach under Tomcat, I can list context, jdbc in context,
java:comp/env and get my ResourceRef, JobsDataSource from the default
context in server.xml listed, but I am unable to get a DataSource (or
ConnectionPoolDataSource) returned.

This is a very frustrating exercise!

Thank you for your help,

Peter



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




No suitable driver Datasource Problem

2002-02-19 Thread remy.menetrieux

When I use a datasource I obtain this error.
But when i use same option directly in my servelt all is OK.
Have you seen this errors ???
regards
Remy

Java.sql.SQLException: No suitable driver at
java.sql.DriverManager.getDriver(DriverManager.java:249) at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:233) 
at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:204) 
at
fr.pixelpark.erh.servlets.ApplicantServlet.performTask(ApplicantServlet.java 

:92) at
fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.java:33) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application 

FilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh 

ain.java:193) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja 

va:243) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja 

va:190) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 

46) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. 

java:170 ) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java 

:174) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 

1012) at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 

) at java.lang.Thread.run(Thread.java:484)




Le code :

   Context initCtx = new InitialContext();

Context envCtx = (Context) initCtx.lookup( java:comp/env );

// Look up our data source
out.println(envCtx =+envCtx);
DataSource ds = envCtx.lookup(jdbc/ErhDB);




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




RE: No suitable driver Datasource Problem

2002-02-19 Thread Randy Layman


I'm would guess that your JDBC driver is not available to the
correct class loader.  Try moving the JDBC driver up to the
TOMCAT_HOME/lib/common directory, restart Tomcat, and see if that works.

Randy

 -Original Message-
 From: remy.menetrieux [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 19, 2002 7:51 AM
 To: Tomcat Users List
 Subject: No suitable driver Datasource Problem
 
 
 When I use a datasource I obtain this error.
 But when i use same option directly in my servelt all is OK.
 Have you seen this errors ???
 regards
 Remy
 
 Java.sql.SQLException: No suitable driver at
 java.sql.DriverManager.getDriver(DriverManager.java:249) at
 tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
 e.java:233) 
 at
 tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
 e.java:204) 
 at
 fr.pixelpark.erh.servlets.ApplicantServlet.performTask(Applica
 ntServlet.java 
 
 :92) at
 fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.
 java:33) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(Application 
 
 FilterChain.java:247) at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterCh 
 
 ain.java:193) at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.ja 
 
 va:243) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 66) at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:472)
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
 va:943) at
 org.apache.catalina.core.StandardContextValve.invoke(StandardC
 ontextValve.ja 
 
 va:190) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 66) at
 org.apache.catalina.valves.CertificatesValve.invoke(Certificat
 esValve.java:2 
 
 46) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 64) at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:472)
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
 va:943) at
 org.apache.catalina.core.StandardContext.invoke(StandardContex
 t.java:2343)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHost
 Valve.java:180 
 
 ) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 66) at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
 spatcherValve. 
 
 java:170 ) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 64) at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
 Valve.java:170 
 
 ) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 64) at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
 e.java:468) 
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 64) at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:472)
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
 va:943) at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
 gineValve.java 
 
 :174) at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
 ipeline.java:5 
 
 66) at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:472)
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
 va:943) at
 org.apache.catalina.connector.http.HttpProcessor.process(HttpP
 rocessor.java: 
 
 1012) at
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
 ssor.java:1107 
 
 ) at java.lang.Thread.run(Thread.java:484)
 
 
 
 
 Le code :
 
Context initCtx = new InitialContext();
 
 Context envCtx = (Context) initCtx.lookup( 
 java:comp/env );
 
 // Look up our data source
 out.println(envCtx =+envCtx);
 DataSource ds = envCtx.lookup(jdbc/ErhDB);
 
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: No suitable driver Datasource Problem

2002-02-19 Thread remy.menetrieux

Thanks it's work...
Remy

Randy Layman wrote:

   I'm would guess that your JDBC driver is not available to the
correct class loader.  Try moving the JDBC driver up to the
TOMCAT_HOME/lib/common directory, restart Tomcat, and see if that works.

   Randy

-Original Message-
From: remy.menetrieux [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 7:51 AM
To: Tomcat Users List
Subject: No suitable driver Datasource Problem


When I use a datasource I obtain this error.
But when i use same option directly in my servelt all is OK.
Have you seen this errors ???
regards
Remy

Java.sql.SQLException: No suitable driver at
java.sql.DriverManager.getDriver(DriverManager.java:249) at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
e.java:233) 
at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSourc
e.java:204) 
at
fr.pixelpark.erh.servlets.ApplicantServlet.performTask(Applica
ntServlet.java 

:92) at
fr.pixelpark.toolbox.servlets.PixelServlet.doGet(PixelServlet.
java:33) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
er(Application 

FilterChain.java:247) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
cationFilterCh 

ain.java:193) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
rapperValve.ja 

va:243) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
ine.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
va:943) at
org.apache.catalina.core.StandardContextValve.invoke(StandardC
ontextValve.ja 

va:190) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

66) at
org.apache.catalina.valves.CertificatesValve.invoke(Certificat
esValve.java:2 

46) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
ine.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
va:943) at
org.apache.catalina.core.StandardContext.invoke(StandardContex
t.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHost
Valve.java:180 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

66) at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi
spatcherValve. 

java:170 ) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

64) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
Valve.java:170 

) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

64) at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValv
e.java:468) 
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

64) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
ine.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
va:943) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
gineValve.java 

:174) at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardP
ipeline.java:5 

66) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
ine.java:472)
at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.ja
va:943) at
org.apache.catalina.connector.http.HttpProcessor.process(HttpP
rocessor.java: 

1012) at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProce
ssor.java:1107 

) at java.lang.Thread.run(Thread.java:484)




Le code :

   Context initCtx = new InitialContext();

Context envCtx = (Context) initCtx.lookup( 
java:comp/env );

// Look up our data source
out.println(envCtx =+envCtx);
DataSource ds = envCtx.lookup(jdbc/ErhDB);




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]