tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Ryder" <sry...@jsrsys.com>
Subject Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to javax.sql.DataSource
Date Tue, 26 Jan 2010 05:31:46 GMT
You "win the prize" for fixing the cast/resource instance errors at line 
504.
I failed to notice the "HumpInTheCamel".
I changed the s to S and now I get an even more weird error at line 506
506: conn = ds.getConnection();
507: sysout.display("JsrSQL: conn = ds successfull");

I am going to put the factory= statement back in to see if anything changes 
now.

2010-01-26 05:20:33:*WARNING*Connection to jdbc/MySql:: connect SQL 
exception: Cannot create PoolableConnectionFactory (Server connection 
failure during transaction. Due to underlying exception: 
'java.io.CharConversionException'. ** BEGIN NESTED EXCEPTION ** 
java.io.CharConversionException STACKTRACE: java.io.CharConversionException 
at gnu.gcj.convert.Input_iconv.read(libgcj.so.81) at 
java.lang.String.init(libgcj.so.81) at java.lang.String.(libgcj.so.81) at 
com.mysql.jdbc.SingleByteCharsetConverter.(SingleByteCharsetConverter.java:153) 
at 
com.mysql.jdbc.SingleByteCharsetConverter.initCharset(SingleByteCharsetConverter.java:108)

at 
com.mysql.jdbc.SingleByteCharsetConverter.getInstance(SingleByteCharsetConverter.java:86)

at com.mysql.jdbc.Connection.getCharsetConverter(Connection.java:3505) at 
com.mysql.jdbc.Statement.(Statement.java:290) at 
com.mysql.jdbc.Connection.createStatement(Connection.java:3123) at 
com.mysql.jdbc.Connection.createStatement(Connection.java:3103) at 
com.mysql.jdbc.Connection.loadServerVariables(Connection.java:4475) at 
com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:4062) at 
com.mysql.jdbc.Connection.createNewIO(Connection.java:2940) at 
com.mysql.jdbc.Connection.(Connection.java:1555) at 
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285) 
at 
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)

at 
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)

at 
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)

at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221) 
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 
at com.jsrsys.web.JsrSQL.connect(JsrSQL.java:506) at 
com.jsrsys.web.JsrSQL.setDataBaseName(JsrSQL.java:86) at 
com.jsrsys.web.JsrSQL.(JsrSQL.java:42) at 
org.apache.jsp.AppList_jsp._jspService(AppList_jsp.java:157) at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at 
java.lang.reflect.Method.invoke(libgcj.so.81) at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244) at 
java.security.AccessController.doPrivileged(libgcj.so.81) at 
javax.security.auth.Subject.doAsPrivileged(libgcj.so.81) at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) 
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)

at 
org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)

at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171) 
at java.security.AccessController.doPrivileged(libgcj.so.81) at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:544) 
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) 
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) 
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) 
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) 
at java.lang.Thread.run(libgcj.so.81) ** END NESTED EXCEPTION ** Attempted 
reconnect 3 times. Giving up.)
2010-01-26 05:20:28:JsrSQL: DataSource cast successfull
2010-01-26 05:20:28:JsrSQL: Context cast successfull
----- Original Message ----- 
From: "Konstantin Kolinko" <knst.kolinko@gmail.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, January 25, 2010 3:14 PM
Subject: Re: Tomcat 5.5 org.apache.naming.ResourceRef cannot be cast to 
javax.sql.DataSource


> 2010/1/25 Steve Ryder <sryder@jsrsys.com>:
>> <Resource name="jdbc/MySql" auth="Container" type="javax.sql.Datasource"
>
> The above should be "javax.sql.DataSource"
>
>
> Do you have any references to this resource in your web.xml file?
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


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


Mime
View raw message