Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when using subQuery + pagedList #1908

Open
test-bin-001 opened this issue May 27, 2024 · 1 comment
Open

Exception thrown when using subQuery + pagedList #1908

test-bin-001 opened this issue May 27, 2024 · 1 comment

Comments

@test-bin-001
Copy link

Description

This problem occurs when I query page in a subquery, and only when the dialect is oracle

Actual behavior

Caused by: java.sql.SQLException: 无效的列索引
	at oracle.jdbc.driver.OraclePreparedStatement.setIntInternal(OraclePreparedStatement.java:4955)
	at oracle.jdbc.driver.OraclePreparedStatement.setInt(OraclePreparedStatement.java:4946)
	at oracle.jdbc.driver.OraclePreparedStatementWrapper.setInt(OraclePreparedStatementWrapper.java:201)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setInt(HikariProxyPreparedStatement.java)
select * from (select u1_0.id,u1_0.name,(select count(*) from (select null id,null name  from dual where 1=0 union all (select u1_0.id,u1_0.name from user_test u1_0 where u1_0.id is not null group by u1_0.id,u1_0.name)) u2_0) from (select null id,null name  from dual where 1=0 union all (select u1_0.id,u1_0.name from user_test u1_0 where u1_0.id is not null group by u1_0.id,u1_0.name)) u1_0 order by u1_0.id) where rownum<=?

Steps to reproduce

QUser user = QUser.user;
JPQLNextQueryFactory queryFactory = new BlazeJPAQueryFactory(entityManager, criteriaBuilderFactory);
var userPagedList = queryFactory.select(user).from(select(user).from(user).where(user.id.isNotNull()), user)
        .orderBy(user.id.asc())
        .fetchPage(0, 10);
Assertions.assertNotNull(userPagedList);

Environment

Version: 1.6.9
JPA-Provider: Hibernate 6.2.5.Final
DBMS: Oracle 11g
Application Server: Spring Boot

@beikov
Copy link
Member

beikov commented Aug 12, 2024

Can you translate the error message to English maybe?

Also, Oracle 11 is not supported anymore and Blaze-Persistence does not provide support for that version either. Please upgrade to the latest supported Oracle version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants