お世話になります。現在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件)
- 最新から表示
- 回答順に表示
No.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.から推測しました。
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
関連するカテゴリからQ&Aを探す
おすすめ情報
- ・漫画をレンタルでお得に読める!
- ・人生のプチ美学を教えてください!!
- ・10秒目をつむったら…
- ・あなたの習慣について教えてください!!
- ・牛、豚、鶏、どれか一つ食べられなくなるとしたら?
- ・【大喜利】【投稿~9/18】 おとぎ話『桃太郎』の知られざるエピソード
- ・街中で見かけて「グッときた人」の思い出
- ・「一気に最後まで読んだ」本、教えて下さい!
- ・幼稚園時代「何組」でしたか?
- ・激凹みから立ち直る方法
- ・1つだけ過去を変えられるとしたら?
- ・【あるあるbot連動企画】あるあるbotに投稿したけど採用されなかったあるある募集
- ・【あるあるbot連動企画】フォロワー20万人のアカウントであなたのあるあるを披露してみませんか?
- ・映画のエンドロール観る派?観ない派?
- ・海外旅行から帰ってきたら、まず何を食べる?
- ・誕生日にもらった意外なもの
- ・天使と悪魔選手権
- ・ちょっと先の未来クイズ第2問
- ・【大喜利】【投稿~9/7】 ロボットの住む世界で流行ってる罰ゲームとは?
- ・推しミネラルウォーターはありますか?
- ・都道府県穴埋めゲーム
- ・この人頭いいなと思ったエピソード
- ・準・究極の選択
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
Eclipseで、プロジェクト名のと...
-
コンパイル時にエラーが出てし...
-
JSPファイルがコンパイルできな...
-
eclipseのエラーについて質問で...
-
タグが閉じてないというエラー...
-
eclipseをバージョンアップした...
-
getParameterについて
-
java8のGUIをawtで作れない。
-
マイクラjavaでForgeを入れたい...
-
この <windows.h> はどこに在る...
-
html上で、バッチやexeファイル...
-
Eclipse(JAVA)のデバッグで他...
-
無線LANが繋がらない。
-
MSDNのコレクションがありませ...
-
Eclipseでクラスファイルが生成...
-
デスクトップがうまく起動しま...
-
No collection foundと出てしま...
-
Europaでサーブレットが作れない
-
vs codeはオフラインでも使用で...
-
NoClassDefFoundError: javax/m...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
Eclipseで、プロジェクト名のと...
-
エラー:org.springframeworkが...
-
タグが閉じてないというエラー...
-
eclipseでのsvn認証エラー回避方法
-
tomcat起動時エラー
-
JSP NullPointerException
-
シンボルが見つかりませんとい...
-
Eclipseの環境について
-
コンパイル時にエラーが出てし...
-
Javaのエラーについてです
-
JSP内でString型からint型に変...
-
Eclipseで次のエラー箇所にジャ...
-
eclipseをバージョンアップした...
-
eclipseのエラーについて質問で...
-
構文エラーのやり直しについて
-
致命的: StandardServer.await:...
-
javaでEnumerationを使いたいの...
-
DataSetのFilter
-
JBossについて
-
Win32コンソールアプリでnamesp...
おすすめ情報