Error encountered : JNDI on Tomcat 5.5 for Database Informix with Informix JDBC driver

2008-01-24 Thread Amitava Chakraborty

Hi All,

I am from IBM - Informix Product Interoperability team .  I tried to
create a JNDI connection from Tomcat to Database Informix. But it is
throwing error. I classified the error by the following way :

1. When I tried with type=javax.sql.DataSource  , I am getting error
Cannot create PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException) .

2. When I tried with  type=com.informix.jdbcx.IfxConnectionPoolDataSource
, I am getting error  java.sql.SQLException: No suitable driver.

3. But we use JNDI connections from WAS , WAS CE and Web Logic also. There
it works fine.

4. Here I have added a sample Java Code also for Pooled connection and it
is working fine.

So the clarification I need is,  whether Tomcat supports Informix for a
JNDI connection. If yes, please suggest me the way it should work . I
attached my context.xml as well as web.xml contains also.

Looking for your help eagerly.


Context File Entry:

  Resource name=jdbc/myinformix auth=Container
type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=inform password=inform123
driverClassName=com.informix.jdbc.IfxDriver

url=jdbc:informix-sqli://idcps2.in.ibm.com:16001/stores_demo:INFORMIXSERVER=ids1050/


WEB-INF\web.xml Entry:

descriptionInformix Test Connection/description
  resource-ref
  descriptionInformix DB Connection/description
  res-ref-namejdbc/myinformix/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to get connection, DataSource
invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException)

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.ServletException: Unable to get connection, DataSource
invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException)

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)

org.apache.jsp.Informix.test_005fconnection_jsp._jspService(test_005fconnection_jsp.java:80)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource
invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(Unknown
 Source)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(Unknown
 Source)

org.apache.jsp.Informix.test_005fconnection_jsp._jspx_meth_sql_005fquery_005f0(test_005fconnection_jsp.java:99)

org.apache.jsp.Informix.test_005fconnection_jsp._jspService(test_005fconnection_jsp.java:57)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)




===
Context File Entry:
Resource name=jdbc/myinformix auth=Container
type=com.informix.jdbcx.IfxConnectionPoolDataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=inform password=inform123
driverClassName=com.informix.jdbc.IfxDriver

url=jdbc:informix-sqli://idcps2.in.ibm.com:16001/stores_demo:INFORMIXSERVER=ids1050/

WEB-INF\web.xml Entry:

resource-ref
  descriptionInformix DB Connection/description
  

Re: Error encountered : JNDI on Tomcat 5.5 for Database Informix with Informix JDBC driver

2008-01-24 Thread Gabe Wong

Amitava Chakraborty wrote:

Hi All,

I am from IBM - Informix Product Interoperability team .  I tried to
create a JNDI connection from Tomcat to Database Informix. But it is
throwing error. I classified the error by the following way :

1. When I tried with type=javax.sql.DataSource  , I am getting error
Cannot create PoolableConnectionFactory (Can't load driver
java.lang.reflect.InvocationTargetException) .

2. When I tried with  type=com.informix.jdbcx.IfxConnectionPoolDataSource
, I am getting error  java.sql.SQLException: No suitable driver.

3. But we use JNDI connections from WAS , WAS CE and Web Logic also. There
it works fine.
  


You need to add the driver under ./common/lib/
More info can be found here:
http://marc.info/?l=tomcat-userw=2r=1s=No+suitable+driverq=b

--
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
a href=http://www.ngasi.comhttp://www.ngasi.com/a
NEW! 8.0 - Centrally manage multiple physical servers


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error encountered : JNDI on Tomcat 5.5 for Database Informix with Informix JDBC driver

2008-01-24 Thread Amitava Chakraborty
Gabe,

Informix JDBC jars (ifxjdbc.jar , ifxjdbcx.jar) are already there under
./common/lib/

Thanks..
Amitava Chakraborty  PMPĀ®
Lead - Informix Interoperability
IBM India PVT LTD.
Plot No 12, Block - G, 2nd Floor ,
The Mira Corporation Suites, Old Ishwar Nagar,
Mathura Rd.   New Delhi 110065
---
Ph : Extn : 91-11-46592644 / 91-129-4033409
Mobile : +919958995870
Fax : 91-11-26921061
E - id : [EMAIL PROTECTED]


   
 Gabe Wong 
 [EMAIL PROTECTED] 
 omTo
   Tomcat Users List   
 25/01/2008 11:13  users@tomcat.apache.org   
cc
   
 Please respond to Subject
   Tomcat Users   Re: Error encountered : JNDI on 
   List   Tomcat 5.5 for Database Informix
 [EMAIL PROTECTED] with Informix JDBC driver   
 che.org  
   
   
   
   
   




Amitava Chakraborty wrote:
 Hi All,

 I am from IBM - Informix Product Interoperability team .  I tried to
 create a JNDI connection from Tomcat to Database Informix. But it is
 throwing error. I classified the error by the following way :

 1. When I tried with type=javax.sql.DataSource  , I am getting error
 Cannot create PoolableConnectionFactory (Can't load driver
 java.lang.reflect.InvocationTargetException) .

 2. When I tried with
type=com.informix.jdbcx.IfxConnectionPoolDataSource
 , I am getting error  java.sql.SQLException: No suitable driver.

 3. But we use JNDI connections from WAS , WAS CE and Web Logic also.
There
 it works fine.


You need to add the driver under ./common/lib/
More info can be found here:
http://marc.info/?l=tomcat-userw=2r=1s=No+suitable+driverq=b

--
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
a href=http://www.ngasi.comhttp://www.ngasi.com/a
NEW! 8.0 - Centrally manage multiple physical servers


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]