[Seasar-user:21912] S2BlazeDSにてSQL検索が出来ず困っています

aga shige [E-MAIL ADDRESS DELETED]
2014年 4月 30日 (水) 00:41:36 JST


いつも大変お世話になっております。Agashigeです。



現在、S2BlazeDS1.0.2 + S2JDBC + Tomcat6.0 + Oracle11g + FlashBuilder4.6を

使用してサンプルデータベースアプリを開発しております。

ですがSQL+では問題なく検索されるSQLを、Javaで実行すると

検索されません。お手間おかけしますがご教授の程よろしくお願いいたします。

(ソースコードは添付しましたTextファイルをご確認の程よろしくお願いいたします。)


SQL+で検索が実行されるには、

ALTER SESSION SET NLS_DATE_FORMAT='yyyy-mm-dd
hh24:mi:ss';が必要になります。(RR-MM-DDでは検索できない)


エラーメッセージ



faultCode : Server.Processing faultString :
org.seasar.framework.exception.SQLRuntimeException :
[ESSR0072]SQLで例外(SQL=[null],
Message=[[ESSR0017]例外が発生しました。

理由はjava.io.EOFException : [null], ErrorCode=0,
SQLState=null)が発生しましたfaultDetail : null



ログ



2014-04-29 23:57:15,643 [http-8080-4] DEBUG
org.seasar.extension.dbcp.impl.ConnectionPoolImpl - 物理的なコネクションを取得しました

2014-04-29 23:57:15,643 [http-8080-4] DEBUG
org.seasar.extension.dbcp.impl.ConnectionPoolImpl - 論理的なコネクションを取得しました。
tx=null

2014-04-29 23:57:15,646 [http-8080-4] DEBUG
org.seasar.extension.dbcp.impl.ConnectionWrapperImpl - 論理的なコネクションを閉じました。
tx=null

2014-04-29 23:57:15,655 [http-8080-4] DEBUG
org.seasar.framework.container.hotdeploy.HotdeployBehavior - HOT deploy
を終了しました

2014-04-29 23:57:20,833 [http-8080-4] DEBUG
org.seasar.framework.container.hotdeploy.HotdeployBehavior - HOT deploy
を開始します

2014-04-29 23:57:20,846 [http-8080-4] DEBUG
org.seasar.framework.container.util.S2ContainerUtil - クラス
(jp.ne.equipment.report.service.EquipmentReportListJdbcService[equipmentReportListJdbcService])
のコンポーネント定義を登録します

2014-04-29 23:57:20,852 [http-8080-4] DEBUG
org.seasar.extension.jdbc.query.SqlFileSelectImpl - SELECT EMTBL.HOZENNO,

  EMTBL.HASSEIBI,

  EMTBL.HOZENKENMEI,

  BMTBL.BUMONMEI,

  EQTBL.SETSUBIMEISYOU,

  USERTBL.SYAINNAME,

  GSTBL.GYOUSYAMEI,

  EMTBL.JYOUTAICODE,

  JTTBL.JYOUTAIKOUMOKU

FROM EMTBL

INNER JOIN BMTBL

ON EMTBL.BUMONCODE = BMTBL.BUMONCODE

INNER JOIN EQTBL

ON EMTBL.SETSUBICODE = EQTBL.SETSUBICODE

INNER JOIN USERTBL

ON EMTBL.SYAINCODE = USERTBL.SYAINCODE

INNER JOIN GSTBL

ON EMTBL.GYOUSYACODE = GSTBL.GYOUSYACODE

INNER JOIN JTTBL

ON EMTBL.JYOUTAICODE = JTTBL.JYOUTAICODE

WHERE

EMTBL.HASSEIBI <= '2014-04-15 00:00:00'

ORDER BY EMTBL.HASSEIBI ASC, EQTBL.SETSUBIMEISYOU ASC

2014-04-29 23:57:20,857 [http-8080-4] DEBUG
org.seasar.extension.dbcp.impl.ConnectionPoolImpl - 論理的なコネクションを取得しました。
tx=null

2014-04-29 23:57:20,860 [http-8080-4] DEBUG
org.seasar.extension.dbcp.impl.ConnectionWrapperImpl - 論理的なコネクションを閉じました。
tx=null

2014-04-29 23:57:20,870 [http-8080-4] DEBUG
org.seasar.framework.container.hotdeploy.HotdeployBehavior - HOT deploy
を終了しました
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://ml.seasar.org/archives/seasar-user/attachments/20140430/66611c4f/attachment.html>
-------------- next part --------------
ソースコード

	<<ActionScript>>
	
	package EquipmentReportController
{	
	import EquipmentReportDto.EmtblDto;
	
	import EquipmentReportModel.EmtblModel;
	
	import EquipmentReportView.EquipmentReportMain;
	
	import flash.events.MouseEvent;
	
	import mx.collections.ArrayCollection;
	import mx.controls.Alert;
	import mx.controls.DateField;
	import mx.core.IMXMLObject;
	import mx.events.FlexEvent;
	import mx.messaging.messages.ErrorMessage;
	import mx.rpc.AsyncResponder;
	import mx.rpc.AsyncToken;
	import mx.rpc.Fault;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	
	import spark.components.calendarClasses.DateSelectorDisplayMode;

	public class EquipmentReportMainController implements IMXMLObject
	{
		private var document : EquipmentReportMain;
		private var emtblmodel : EmtblModel;
		
		public function EquipmentReportMainController()
		{
		}
		
		public function initialized(document:Object, id:String):void
		{
			this.document = EquipmentReportMain(document);
			
			this.document.addEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
		}

		public function creationCompleteHandler(event:FlexEvent):void
		{
			this.document.butEqpmntMainteTotal.addEventListener(MouseEvent.CLICK, getEquipmentReportListClickHandler);
		}
		
		public function getEquipmentReportListClickHandler(event:MouseEvent):void
		{
			var searchDate:Date = DateField.stringToDate(document.txdDate.text, "YYYY-MM-DD"); 
			var findEquipsmentReportToken:AsyncToken = document.EquipmentReportService.getEquipmentReportList(searchDate);
			findEquipsmentReportToken.addResponder(new AsyncResponder(findEquipmentReportResultHandler, faultHandler));
		}
				
		public function faultHandler(e:FaultEvent, obj:Object=null):void 
		{
			var error : ErrorMessage = ErrorMessage(e.message);
			var faultCode :String = error.faultCode;
			var faultString :String = error.faultString;
			var faultDetail:String = error.faultDetail;
			Alert.show("faultCode : " + faultCode + " faultString : " + faultString +
						" faultDetail : " + faultDetail);
		}
		
		private function findEquipmentReportResultHandler(e:ResultEvent, obj:Object=null):void
		{
			var reports:ArrayCollection = e.result as ArrayCollection;
			document.equipmentReportList.emmodel.emtbls = reports;
		}
	}
}

package EquipmentReportDto
{
	[Bindable]
	[RemoteClass(alias="jp.ne.equipment.report.dto.EmtblDto")]
	public class EmtblDto
	{
		public var hozenno :Number;
		public var hasseibi :Date;
		public var hozenkenmei :String;
		public var bumonmei :String;
		public var setsubimeisyou :String;
		public var syainneme :String;
		public var gyousyamei :String;
		public var jyoutaicode: String
		public var jyoutaikoumoku :String;		
		
		public function EmtblDto()
		{

		}
	}
}

package EquipmentReportModel
{
	import EquipmentReportDto.EmtblDto;
	
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class EmtblModel
	{
		public var emtbls:ArrayCollection;
		
		public function EmtblModel()
		{
			//emtbls = new ArrayCollection();
		}
	}
}

JAVA

package jp.ne.equipment.report.dto;

import java.util.Date;

public class EmtblDto {
	
	private Number hozenno;
	private Date hasseibi;
	private String hozenkenmei;
	private String bumonmei;
	private String setsubimeisyou;
	private String syainneme;
	private String gyousyamei;
	private String jyoutaicode;
	private String jyoutaikoumoku;
	
	public Number getHozenno() {
		return hozenno;
	}
	
	public void setHozenno(Number hozenno) {
		this.hozenno = hozenno;
	}

	public Date getHasseibi() {
		return hasseibi;
	}

	public void setHasseibi(Date hasseibi) {
		this.hasseibi = hasseibi;
	}

	public String getHozenKenmei() {
		return hozenkenmei;
	}

	public void setHozenKenmei(String hozenkenmei) {
		this.hozenkenmei = hozenkenmei;
	}

	public String getBumonmei() {
		return bumonmei;
	}

	public void setBumonmei(String bumonmei) {
		this.bumonmei = bumonmei;
	}

	public String getSetsubimeisyou() {
		return setsubimeisyou;
	}

	public void setSetsubimei(String setsubimeisyou) {
		this.setsubimeisyou = setsubimeisyou;
	}

	public String getSyainneme() {
		return syainneme;
	}

	public void setSyainneme(String syainneme) {
		this.syainneme = syainneme;
	}

	public String getJyoutaikoumoku() {
		return jyoutaikoumoku;
	}

	public void setJyoutaikoumoku(String jyoutaikoumoku) {
		this.jyoutaikoumoku = jyoutaikoumoku;
	}

	public String getGyousyamei() {
		return gyousyamei;
	}

	public void setGyousyamei(String gyousyamei) {
		this.gyousyamei = gyousyamei;
	}

	public String getJyoutaicode() {
		return jyoutaicode;
	}

	public void setJyoutai(String jyoutaicode) {
		this.jyoutaicode = jyoutaicode;
	}
}

package jp.ne.equipment.report.service;

import java.util.Date;
import java.util.List;
import jp.ne.equipment.report.dto.EmtblDto;
import org.seasar.extension.jdbc.JdbcManager;

public class EquipmentReportListJdbcService {

	public JdbcManager jdbcmanager;	
	final static String SQL_PATH = "jp/ne/equipment/report/service/EmtblService_searchEmtblByDate.sql";

	public  List<EmtblDto> getEquipmentReportList(Date searchdate){
		List<EmtblDto> EmDto = jdbcmanager.selectBySqlFile(EmtblDto.class, SQL_PATH, searchdate).getResultList();
		return EmDto;
	}
}


Seasar-user メーリングリストの案内