2016-12-26 19 views
0

1.3.5から1.4.2への春ブート・バージョンのアップグレード後、DB2ZOS方言はSpring JPAのページング問合せでは機能していないようです。 私はDB2でSpring JPAを使用しています。ページング・リポジトリを使用し、2番目のページに対して問合せを実行すると、エラーがスローされます。これは生成されたクエリです。1.3.5から1.4.2への春ブート・バージョンのアップグレード後にDB2ZOS方言が機能しない

select 
     * 
    from 
     (select 
      inner2_.*, 
      rownumber() over(
     order by 

     order of inner2_) as rownumber_ from 
      (select 
       componentd0_.comp_data_field_st_msg_id as comp_dat1_0_, 
       componentd0_.comp_data_file_id as comp_dat5_0_, 
       componentd0_.comp_data_file_field_id as comp_dat6_0_, 
       componentd0_.component_serial_no as componen2_0_, 
       componentd0_.controller_short_name as controll3_0_, 
       componentd0_.message as message4_0_ 
      from 
       cs_comp_data_field_st_msg componentd0_ 
      left outer join 
       cs_comp_data_file componentd1_ 
        on componentd0_.comp_data_file_id=componentd1_.comp_data_file_id 
      where 
       componentd1_.comp_data_file_id=? 
      order by 
       componentd0_.comp_data_field_st_msg_id asc fetch first 50 rows only) as inner2_) as inner1_ 
     where 
      rownumber_ > 25 
     order by 
      rownumber_ 
o.h.engine.jdbc.spi.SqlExceptionHelper : DB2 SQL Error: SQLCODE=-199, SQLSTATE=42601, SQLERRMC=OF;??([ DESC ASC NULLS RANGE CONCAT ||/MICROSECONDS MICROSECOND, DRIVER=3.69.24 
2016-12-26 13:41:42.886 ERROR [componentdatafiles,c50b4d59a68eb961,c50b4d59a68eb961,false] AK51602  20296 --- [io-8081-exec-75] o.h.engine.jdbc.spi.SqlExceptionHelper : DB2 SQL Error: SQLCODE=-516, SQLSTATE=26501, SQLERRMC=null, DRIVER=3.69.24 
2016-12-26 13:41:42.887 ERROR [componentdatafiles,c50b4d59a68eb961,c50b4d59a68eb961,false] AK51602  20296 --- [io-8081-exec-75] o.h.engine.jdbc.spi.SqlExceptionHelper : DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501, SQLERRMC=SQL_CURLH200C1, DRIVER=3.69.24 
2016-12-26 13:41:42.918 DEBUG [componentdatafiles,c50b4d59a68eb961,c50b4d59a68eb961,false] AK51602  20296 --- [io-8081-exec-75] c.d.c.n.service.NonDeereXmlServiceImpl : Critical system error 

org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet 
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:261) 
    at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244) 
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:491) 
    at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59) 
    at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213) 
    at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:147) 
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 
    at org.springframework.data.jpa.repository.support.CrudMethodMeta 

答えて

0

org.hibernate.dialect.DB2Dialectクラス生成、なぜそのfailing.Iが私の方言でgetLimit機能を無効にし、その解決したことを無効クエリ。

+0

だから、春ではなく冬眠しています....放し飼いは、休止状態からのクラスです。 –

+0

はい、org.hibernate.dialect.DB2Dialectクラスを修正しました。私は答えを編集しました。 –

+0

あなたは単に間違った方言を使っていませんか? Z/OSの場合、デフォルトの 'DBD2Dialect'ではなく' DB2400Dialect'または 'DB2390Dialect'を使用する必要があります。 –

関連する問題