アプリ版:「スタンプのみでお礼する」機能のリリースについて

お世話になります。現在Teeda+S2DAOの学習をしています。
そこでどうしても一点解決できない問題がありご質問させて
いただきたく思い投稿いたします。

問題:
DBアクセスの際に作成したSQLファイルの呼び出しを行いDBにアクセスしようとするとエラーが出力される。デフォルトのSQLファイルを利用しないDBアクセスは可能。

開発環境:
アプリケーションサーバー:Tomcat5.5
IDE:eclipse3.2
DB:postgresql8.2
言語:java1.6
FW:Turaプロジェクト(Teeda+S2DAO)

出力されたエラーは以下の通りです。

org.seasar.framework.exception.SQLRuntimeException: [ESSR0072]SQLで例外(SQL=[update userinfo set userid = ?, password = ?], Message=[[ESSR0072]SQLで例外(SQL=[update userinfo set userid = ?, password = ?], Message=[0], ErrorCode=07006, SQLState={3})が発生しました : [SQLで例外(Message=[Can't infer the SQL type to use for an instance of agnietec.entity.UserInfo. Use setObject() with an explicit Types value to specify the type to use.], ErrorCode=0, SQLState=07006)が発生しました。], [Can't infer the SQL type to use for an instance of agnietec.entity.UserInfo. Use setObject() with an explicit Types value to specify the type to use.], ErrorCode=0, SQLState=07006)が発生しました
at org.seasar.extension.jdbc.impl.BasicHandler.bindArgs(BasicHandler.java:195)
at org.seasar.extension.jdbc.impl.BasicUpdateHandler.execute(BasicUpdateHandler.java:101)
at org.seasar.extension.jdbc.impl.BasicUpdateHandler.execute(BasicUpdateHandler.java:80)
at org.seasar.dao.impl.UpdateDynamicCommand.execute(UpdateDynamicCommand.java:43)
at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:53)
at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(PagerS2DaoInterceptorWrapper.java:71)
at agnietec.dao.UserInfoDao$$EnhancedByS2AOP$$134ea95$$MethodInvocation$$updateUser8.proceed(MethodInvocationClassGenerator.java)
at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:73)
at agnietec.dao.UserInfoDao$$EnhancedByS2AOP$$134ea95$$MethodInvocation$$updateUser8.proceed(MethodInvocationClassGenerator.java)
at agnietec.dao.UserInfoDao$$EnhancedByS2AOP$$134ea95.updateUser(UserInfoDao$$EnhancedByS2AOP$$134ea95.java)

確信はないんですがエンコードでエラーが出ているのかと思い、
確認したのですが
postgreはEUC_JP、
eclipseはUTF-8でした。
自分でも色々試行錯誤し、web.xmlのエンコード指定をEUC_JPなどにしてみましたが、状況に変化はありません。

<filter>
<filter-name>encodingfilter</filter-name> <filter-class>org.seasar.extension.filter.EncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value> ここをEUC-JPにしました </param-value>
</init-param>
<filter>

インターネットで調べても、調べ方が悪いのか同じような問題がみつからずほとほと困っています。どなたかご教授いただけないでしょうか?
何卒よろしくお願いいたします。

A 回答 (1件)

あまり根拠のない推測ですが、


update userinfo set userid = ?, password = ?
の?部分にクオーテーションがついていないとか。

update userinfo set userid = 'hoge', password = 'hoge'
となるべきところ
update userinfo set userid = hoge, password = hoge
になってしまっていることはないですか?
エラーメッセージan explicit Types value to specify the type to use.から推測しました。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!