SeasarWiki

S2DAOを使って、EXCELファイルをオラクルのBLOBの項目に挿入する時に、ファイルのサイズ=2Kの場合、成功に挿入する、でも、ファイルサイズ=5Kの場合、エラーが出てきました。

DemoDto.java:

	private byte[] c ;
	
	/**
	 * @return c
	 */
	public byte[] getC() {
		return c;
	}
	/**
	 * @param c 
	 */
	public void setC(byte[] c) {
		this.c = c;
	}

DemoService.java:

	public void insertFile(DemoForm v_from){
		
		try{
			DemoDto dto = new DemoDto();
			dto.setC(v_from.getUploadFile().getFileData());
			demoDao.insert(dto);
		}
		catch(Exception e){
			
			e.printStackTrace();
		}
		
	}
	

DemoDao.java: public interface DemoDao {

	
	Class BEAN = DemoDto.class;
	int insert(DemoDto dto);
	

}

エラー: DEBUG 2008-03-03 14:19:58,015 [http-8090-6] INSERT INTO DemoDto (a, b, c) VALUES ('a', 'b', '[B@7d8dfb') DEBUG 2008-03-03 14:19:59,234 [http-8090-6] Logical connection closed DEBUG 2008-03-03 14:19:59,234 [http-8090-6] END com.viscas.nevius.master.dao.DemoDao#insert(com.viscas.nevius.master.dto.DemoDto@da9cc) Throwable:org.seasar.framework.exception.SQLRuntimeException: [ESSR0071]SQLException(ErrorCode=17002, SQLState=null) occured, because org.seasar.framework.exception.SSQLException: [ESSR0072]SQLException(SQL=[INSERT INTO DemoDto (a, b, c) VALUES (?, ?, ?)], ErrorCode=17002, SQLState=null) occured org.seasar.framework.exception.SQLRuntimeException: [ESSR0071]SQLException(ErrorCode=17002, SQLState=null) occured, because org.seasar.framework.exception.SSQLException: [ESSR0072]SQLException(SQL=[INSERT INTO DemoDto (a, b, c) VALUES (?, ?, ?)], ErrorCode=17002, SQLState=null) occured

	at org.seasar.framework.util.StatementUtil.close(StatementUtil.java:55)
	at org.seasar.dao.impl.AbstractAutoHandler.execute(AbstractAutoHandler.java:147)
	at org.seasar.dao.impl.AbstractAutoHandler.execute(AbstractAutoHandler.java:124)
	at org.seasar.dao.impl.InsertAutoDynamicCommand.execute(InsertAutoDynamicCommand.java:59)
	at org.seasar.dao.interceptors.S2DaoInterceptor.invoke(S2DaoInterceptor.java:53)
	at org.seasar.dao.pager.PagerS2DaoInterceptorWrapper.invoke(PagerS2DaoInterceptorWrapper.java:64)
	at com.viscas.nevius.master.dao.DemoDao$$EnhancedByS2AOP$$1fa8d3b$$MethodInvocation$$insert0.proceed(MethodInvocationClassGenerator.java)
	at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:58)
	at com.viscas.nevius.master.dao.DemoDao$$EnhancedByS2AOP$$1fa8d3b$$MethodInvocation$$insert0.proceed(MethodInvocationClassGenerator.java)
	at com.viscas.nevius.master.dao.DemoDao$$EnhancedByS2AOP$$1fa8d3b.insert(DemoDao$$EnhancedByS2AOP$$1fa8d3b.java)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl.insertFile(CostStandardSearchSNServiceImpl.java:87)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da.insertFile$$invokeSuperMethod$$(CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da.java)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da$$MethodInvocation$$insertFile1.proceed(MethodInvocationClassGenerator.java)
	at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:40)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da$$MethodInvocation$$insertFile1.proceed(MethodInvocationClassGenerator.java)
	at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:58)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da$$MethodInvocation$$insertFile1.proceed(MethodInvocationClassGenerator.java)
	at com.viscas.nevius.master.service.impl.CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da.insertFile(CostStandardSearchSNServiceImpl$$EnhancedByS2AOP$$14893da.java)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImplBase.search(CostStandardSearchSNActionImplBase.java:73)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218.search$$invokeSuperMethod$$(CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218.java)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218$$MethodInvocation$$search1.proceed(MethodInvocationClassGenerator.java)
	at jp.fitec.common.interceptor.TokenInterceptor.invoke(TokenInterceptor.java:90)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218$$MethodInvocation$$search1.proceed(MethodInvocationClassGenerator.java)
	at jp.fitec.common.interceptor.SessionCheckerInterceptor.invoke(SessionCheckerInterceptor.java:67)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218$$MethodInvocation$$search1.proceed(MethodInvocationClassGenerator.java)
	at com.viscas.nevius.master.action.impl.CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218.search(CostStandardSearchSNActionImpl$$EnhancedByS2AOP$$1261218.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.seasar.framework.util.MethodUtil.invoke(MethodUtil.java:49)
	at org.seasar.framework.beans.impl.BeanDescImpl.invoke(BeanDescImpl.java:207)
	at org.seasar.struts.pojo.MethodBinding.invoke(MethodBinding.java:75)
	at org.seasar.struts.pojo.MethodBinding.invoke(MethodBinding.java:66)
	at org.seasar.struts.pojo.MethodBindingAction.execute(MethodBindingAction.java:41)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:413)
	at

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS