Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » (no subject)
(no subject) [message #721899] Sat, 03 September 2011 13:13
attila Mising name is currently offline attila Mising nameFriend
Messages: 45
Registered: April 2010
Member
Hello,

Is there any known issue for the following scenario ?

1) Create a jpa query "select .... "
2) Add a dynamic fecth group

FetchGroup fg = new FetchGroup("default");
fg.setShouldLoad(true);
// add attributes
query.setHint(QueryHints.FETCH_GROUP, fg);

3) read with a Cursor


query.setHint(QueryHints.CURSOR, true)
setHint(QueryHints.CURSOR_INITIAL_SIZE, 30)
setHint(QueryHints.CURSOR_PAGE_SIZE, 30)
setHint(QueryHints.READ_ONLY, HintValues.TRUE)
setFirstResult(bld.getResultStart())
setMaxResults(bld.getResultSize());

Cursor c = query.unwrap(JpaQuery.class).getResultCursor();



With both versions which i tried (2.3.0 and 2.3.0-RC4) it crashes with the error below.

If it is called with a regular result list works :

List<E> list = bld.createQuery()
setFirstResult(bld.getResultStart())
setMaxResults(bld.getResultSize())
getResultList();


With Cursor works if i remove the fetch-group

Here is the error:



java.lang.NullPointerException
[2011-09-03 16:12:02.974] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession$1.iterate(AbstractSession.java:4530)
[2011-09-03 16:12:02.974] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.descriptors.DescriptorIterator.startIterationOn(DescriptorIterator.java:666)
[2011-09-03 16:12:02.974] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession.load(AbstractSession.java:4559)
[2011-09-03 16:12:02.974] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1114)
[2011-09-03 16:12:02.974] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:829)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1056)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:390)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2816)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1483)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1457)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultCursor(EJBQueryImpl.java:661)
[2011-09-03 16:12:02.975] ERROR "http-bio-8089"-exec-2 System.err at net.nan21.dnet.core.presenter.service.AbstractDsService.doExport(AbstractDsService.java:450)



Thank you
Previous Topic:(no subject)
Next Topic:PLSQLCollection example
Goto Forum:
  


Current Time: Thu Apr 25 07:16:22 GMT 2024

Powered by FUDForum. Page generated in 0.02922 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top