Re: Universal connection pooling Type Casting problem

2010-04-19 Thread Auser99

Does anyone have a solution for this. Thanks.

au

http:/www.xprad.org/



SivaKumarl wrote:
 
 Hi Friends, 
   I am using universal connection pooling for connecting database
 , while configuring manually i able to connect to database,but while
 configuring in server.xml i am unable to cast the datasource i am getting
 the class cast exception, please find the below configuration and error
 details , correct me if i configured wrong .I am using Tomcat 6.0
 
 server.xml configurartion
 
  Context docBase=UCP path=/UCP reloadable=true
 source=org.eclipse.jst.jee.server:UCP 
   Resource auth=Container description=DataSource Reference
 driverClassName=oracle.jdbc.OracleDriver 
 maxActive=4 maxIdle=2 maxWait=5000
 name=jdbc/oracleds factory=oracle.jdbc.pool.OracleDataSource 
 username=branch password=branch
 type=oracle.ucp.jdbc.PoolDataSourceImpl 
 url=jdbc:oracle:thin:@//192.168.203.12:1521/ycs  
 validationQuery=select 1 from dual/ 
   /Context 
 
 Error Details
 javax.naming.NamingException: Could not create resource factory instance
 [Root exception is java.lang.ClassCastException:
 oracle.jdbc.pool.OracleDataSource cannot be cast to
 javax.naming.spi.ObjectFactory] 
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:102)
  
 at
 javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) 
 at org.apache.naming.NamingContext.lookup(NamingContext.java:793) 
 at org.apache.naming.NamingContext.lookup(NamingContext.java:140) 
 at org.apache.naming.NamingContext.lookup(NamingContext.java:781) 
 at org.apache.naming.NamingContext.lookup(NamingContext.java:153) 
 at TestServlet.doGet(TestServlet.java:37) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) 
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) 
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) 
 at java.lang.Thread.run(Thread.java:619) 
 Caused by: java.lang.ClassCastException: oracle.jdbc.pool.OracleDataSource
 cannot be cast to javax.naming.spi.ObjectFactory 
 at
 org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:98)
  
 ... 20 more 
 
 
 Java code for retrieving connection
 
 Context initContext; 
 try { 
 initContext = new InitialContext(); 
 
 Context envContext  =
 (Context)initContext.lookup(java:/comp/env); 
 DataSource ds =
 (DataSource)envContext.lookup(jdbc/oracleds); 
 } catch (NamingException e) { 
 // TODO Auto-generated catch block 
 e.printStackTrace(); 
 } 
 
 
 
 Thanks in Advance 
 Siva kumar
 
 

-- 
View this message in context: 
http://old.nabble.com/Universal-connection-pooling-Type-Casting-problem-tp28287054p28287790.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: httpd vs. Tomcat performance

2010-03-27 Thread Auser99

Thanks for the link.

au

http://www.xprad.org/



Hassan Schroeder-2 wrote:
 
 Just to get this into the archives for the next time it comes up
 
 http://tomcatexpert.com/blog/2010/03/24/myth-or-truth-one-should-always-use-apache-httpd-front-apache-tomcat-improve-perform
 
 because I don't know if the author (a certain mthomas) will mention
 it here.   :-)
 
 (via @springsource on Twitter)
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/httpd-vs.-Tomcat-performance-tp28023360p28056376.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org