Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-19743

Execution of criteria query shows <null> result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 4.3.0.Beta1
    • 4.3.0.Beta1
    • hibernate
    • None
    • Sprint #3 May 2015
    • Hide

      STEP: Create maven project with Hibernate 4.3 and h2 depdencencies (or you can import the one below)
      https://github.com/jbosstools/jbosstools-integration-tests/tree/master/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/mvn-hibernate43
      STEP: Convert to JPA 2.1 Hibernate Faceted project
      STEP: Generate JPA Entities from Tables (sakila db was used - https://github.com/maxandersen/sakila-h2)
      STEP: Open Criteria Editor
      STEP: Run "session.Criteria(Actor.class).list();" query
      ASSERT: Query should be executed and result should be visible in Hibernate Query Result view

      Show
      STEP: Create maven project with Hibernate 4.3 and h2 depdencencies (or you can import the one below) https://github.com/jbosstools/jbosstools-integration-tests/tree/master/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/mvn-hibernate43 STEP: Convert to JPA 2.1 Hibernate Faceted project STEP: Generate JPA Entities from Tables (sakila db was used - https://github.com/maxandersen/sakila-h2 ) STEP: Open Criteria Editor STEP: Run "session.Criteria(Actor.class).list();" query ASSERT: Query should be executed and result should be visible in Hibernate Query Result view

      There is null result after executing Criteria query:

      !ENTRY org.jboss.tools.hibernate.runtime.common 4 0 2015-04-30 15:16:16.562
      !MESSAGE org.hibernate.impl.CriteriaImpl.setMaxResults()
      !STACK 0
      java.lang.NoSuchMethodException: org.hibernate.impl.CriteriaImpl.setMaxResults()
      	at java.lang.Class.getMethod(Class.java:1773)
      	at org.jboss.tools.hibernate.runtime.common.Util.invokeMethod(Util.java:39)
      	at org.jboss.tools.hibernate.runtime.common.AbstractCriteriaFacade.list(AbstractCriteriaFacade.java:39)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at bsh.Reflect.invokeMethod(Unknown Source)
      	at bsh.Reflect.invokeObjectMethod(Unknown Source)
      	at bsh.BSHPrimarySuffix.doName(Unknown Source)
      	at bsh.BSHPrimarySuffix.doSuffix(Unknown Source)
      	at bsh.BSHPrimaryExpression.eval(Unknown Source)
      	at bsh.BSHPrimaryExpression.eval(Unknown Source)
      	at bsh.Interpreter.eval(Unknown Source)
      	at bsh.Interpreter.eval(Unknown Source)
      	at bsh.Interpreter.eval(Unknown Source)
      	at org.hibernate.eclipse.console.common.JavaPage.setSession(JavaPage.java:73)
      	at org.hibernate.eclipse.console.common.HibernateExtension$3.execute(HibernateExtension.java:127)
      	at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
      	at org.hibernate.eclipse.console.common.HibernateExtension.execute(HibernateExtension.java:189)
      	at org.hibernate.eclipse.console.common.HibernateExtension.executeCriteriaQuery(HibernateExtension.java:123)
      	at org.hibernate.console.ConsoleConfiguration.executeBSHQuery(ConsoleConfiguration.java:313)
      	at org.hibernate.eclipse.criteriaeditor.CriteriaEditor.executeQuery(CriteriaEditor.java:142)
      	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:82)
      	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:55)
      	at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
      	at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:59)
      	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
      	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
      	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:462)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4477)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1322)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1346)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1331)
      	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1116)
      	at org.jboss.reddeer.core.handler.WidgetHandler$4.run(WidgetHandler.java:332)
      	at org.jboss.reddeer.core.util.Display$VoidResultRunnable.run(Display.java:193)
      	at org.jboss.reddeer.core.util.Display$VoidResultRunnable.run(Display.java:1)
      	at org.jboss.reddeer.core.util.Display$ErrorHandlingRunnable.run(Display.java:159)
      	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
      	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3790)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1112)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:993)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
      	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
      	at org.jboss.reddeer.eclipse.core.UITestApplication.start(UITestApplication.java:47)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
      	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
      

            kaers@redhat.com Koen Aers
            jpeterka_jira Jiri Peterka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: