- PR -

servlet+mysqlでUnexpected end of input stream

1
投稿者投稿内容
タマダ
会議室デビュー日: 2005/11/22
投稿数: 5
投稿日時: 2005-12-12 21:27
毎度お世話になります。

Win2000
tomcat5.0.28
mysql4.1.15
mysql-connector-java-3.1.12-bin.jar
(mysql-connector-java-3.0.14-production-bin.jarとmysql-connector-java-3.1.11-bin.jarでも試しました)

この環境でtomcatとmysqlの連携を行ったところ、webページにアクセスするとこのようなエラーメッセージが出てしまいます。
以前はmysqlの3.23.34を使っていたのですが、そのときにはエラーは出ませんでした。


type 例外レポート

メッセージ

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

例外

org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Communication link failure: java.io.IOException, underlying cause: Unexpected end of input stream

** BEGIN NESTED EXCEPTION **

java.io.IOException
MESSAGE: Unexpected end of input stream

STACKTRACE:

java.io.IOException: Unexpected end of input stream
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:1096)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:626)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1562)
at com.mysql.jdbc.Connection.<init>(Connection.java:491)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at chap3.CounterFilter.doFilter(CounterFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at common.EncodeUtil.doFilter(EncodeUtil.java:21)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


** END NESTED EXCEPTION **


org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:722)
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:108)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
chap3.CounterFilter.doFilter(CounterFilter.java:36)
common.EncodeUtil.doFilter(EncodeUtil.java:21)


また、my.iniに「default-character-set=sjis」
servletのコンテキスト.xmlに「jdbc:mysql://localhost/sample(←コンテキスト名です)?useUnicode=true&amp;characterEncoding=sjis」
の文は書き加えてあります。

よろしくお願い致します。
1

スキルアップ/キャリアアップ(JOB@IT)