-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: hql group by problem (probably bug)
PostPosted: Tue Dec 14, 2004 4:44 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Hello,
I have problem with HQL and grouping.I make test case
2 first test are success , but last 3 throw exception

When I have join with 2 column from foreign table and group by hibernate get
column from master in select list and column from foreign in group by
Query return 'not group by expression'

I try it with last 2.1.7 and 3.0 version form cvs (before 2-3 days)

regards
version
2.1.7 and 3.0 beta1

Mapping documents:
Code:
<hibernate-mapping package="yu.co.snpe.dbtable.model.hibernate">
   
   <class name="AdmSnpeLocale" table="ADM_SNPE_LOCALE">
      <meta attribute="extends" inherit="false">BasePersister</meta>

      <id name="id" type="java.lang.String" column="ID">
         <generator class="assigned" />
      </id>

      <property name="ime" type="java.lang.String" column="IME"
         length="50" />

   </class>
</hibernate-mapping>
<hibernate-mapping package="yu.co.snpe.dbtable.model.hibernate">

   <class name="AdmSnpeLocales" table="ADM_SNPE_LOCALES">
      <meta attribute="extends" inherit="false">BasePersister</meta>

      <composite-id>
         <key-property name="localeNo" column="ID" type="java.lang.String"
            length="30" />
         <key-many-to-one name="admSnpeLocale" column="LOC"/>
      </composite-id>

      <property name="ime" type="java.lang.String" column="IME"
         length="50" />

   </class>
</hibernate-mapping>


test case
Code:
/*
* Copyright 2002-2004 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package yu.co.snpe.dbtable.test.hibernate;

import java.util.List;

import org.hibernate.HibernateException;
import org.hibernate.Query;

import yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales;

/**
* @author snpe

*/
public class HqlAggregateTests extends BaseHibernateWSTests {

    public HqlAggregateTests(String name) {
        super(name);
    }

    public void testSimpleLocales() throws HibernateException {
        String query = "select model.admSnpeLocale.id,model.admSnpeLocale.ime,model.ime"
                + "\nfrom "
                + AdmSnpeLocales.class.getName()
                + " as model"
                + "\nwhere model.admSnpeLocale.id like ?";
        log.debug(query);
        Query q = getSession().createQuery(query);
        q.setParameter(0, "%");
        List list = q.list();
        assertTrue("simple test", list.size() > 0);
    }

    public void testSimpleLocalesGroupSuccess() throws HibernateException {
        String query = "select model.admSnpeLocale.id,count(model.ime)"
                + "\nfrom " + AdmSnpeLocales.class.getName() + " as model"
                + "\nwhere model.admSnpeLocale.id like ?"
                + "\ngroup by model.admSnpeLocale.id" + "\n order by 1";
        log.debug(query);
        Query q = getSession().createQuery(query);
        q.setParameter(0, "%");
        List list = q.list();
        assertTrue("simple test", list.size() > 0);
    }

    public void testAggreagteLocalesWithoutOrderBy() throws HibernateException {
        String query = "select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)"
                + "\nfrom "
                + AdmSnpeLocales.class.getName()
                + " as model"
                + "\nwhere model.admSnpeLocale.id like ?"
                + "\ngroup by model.admSnpeLocale.id,model.admSnpeLocale.ime";
        log.debug(query);
        Query q = getSession().createQuery(query);
        q.setParameter(0, "%");
        List list = q.list();
        assertTrue("simple test", list.size() > 0);
    }

    public void testAggregateLocalesOrderByWithNames()
            throws HibernateException {
        String query = "select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)"
                + "\nfrom "
                + AdmSnpeLocales.class.getName()
                + " as model"
                + "\nwhere model.admSnpeLocale.id like ?"
                + "\ngroup by model.admSnpeLocale.id,model.admSnpeLocale.ime"
                + "\norder by model.admSnpeLocale.id";
        log.debug(query);
        Query q = getSession().createQuery(query);
        q.setParameter(0, "%");
        List list = q.list();
    }

    public void testAggregateLocalesOrderByWithPosition()
            throws HibernateException {
        String query = "select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)"
                + "\nfrom "
                + AdmSnpeLocales.class.getName()
                + " as model"
                + "\nwhere model.admSnpeLocale.id like ?"
                + "\ngroup by model.admSnpeLocale.id,model.admSnpeLocale.ime"
                + "\norder by 1";
        log.debug(query);
        Query q = getSession().createQuery(query);
        q.setParameter(0, "%");
        List list = q.list();
    }

}


Hibernate output (query and generated sql) :
Code:
[DEBUG,HqlAggregateTests,main] select model.admSnpeLocale.id,model.admSnpeLocale.ime,model.ime
from yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales as model
where model.admSnpeLocale.id like ?
Hibernate: select admsnpeloc0_.LOC as col_0_0_, admsnpeloc1_.IME as col_1_0_, admsnpeloc0_.IME as col_2_0_ from ADM_SNPE_LOCALES admsnpeloc0_, ADM_SNPE_LOCALE admsnpeloc1_ where admsnpeloc0_.LOC=admsnpeloc1_.ID and ((admsnpeloc0_.LOC like ? ))
[DEBUG,HqlAggregateTests,main] select model.admSnpeLocale.id,count(model.ime)
from yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales as model
where model.admSnpeLocale.id like ?
group by model.admSnpeLocale.id
order by 1
[WARN,SessionImpl,Finalizer] unclosed connection, forgot to call close() on your session?
Hibernate: select admsnpeloc0_.LOC as col_0_0_, count(admsnpeloc0_.IME) as col_1_0_ from ADM_SNPE_LOCALES admsnpeloc0_ where (admsnpeloc0_.LOC like ? ) group by  admsnpeloc0_.LOC order by  1
[DEBUG,HqlAggregateTests,main] select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)
from yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales as model
where model.admSnpeLocale.id like ?
group by model.admSnpeLocale.id,model.admSnpeLocale.ime
Hibernate: select admsnpeloc1_.ID as col_0_0_, admsnpeloc1_.IME as col_1_0_, count(admsnpeloc0_.IME) as col_2_0_ from ADM_SNPE_LOCALES admsnpeloc0_, ADM_SNPE_LOCALE admsnpeloc1_ where admsnpeloc0_.LOC=admsnpeloc1_.ID and ((admsnpeloc0_.LOC like ? )) group by  admsnpeloc0_.LOC , admsnpeloc1_.IME
[WARN,SessionImpl,Finalizer] unclosed connection, forgot to call close() on your session?
[WARN,JDBCExceptionReporter,main] SQL Error: 979, SQLState: 42000
[ERROR,JDBCExceptionReporter,main] ORA-00979: not a GROUP BY expression

[DEBUG,HqlAggregateTests,main] select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)
from yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales as model
where model.admSnpeLocale.id like ?
group by model.admSnpeLocale.id,model.admSnpeLocale.ime
order by model.admSnpeLocale.id
Hibernate: select admsnpeloc1_.ID as col_0_0_, admsnpeloc1_.IME as col_1_0_, count(admsnpeloc0_.IME) as col_2_0_ from ADM_SNPE_LOCALES admsnpeloc0_, ADM_SNPE_LOCALE admsnpeloc1_ where admsnpeloc0_.LOC=admsnpeloc1_.ID and ((admsnpeloc0_.LOC like ? )) group by  admsnpeloc0_.LOC , admsnpeloc1_.IME order by  admsnpeloc1_.ID
[WARN,JDBCExceptionReporter,main] SQL Error: 979, SQLState: 42000
[ERROR,JDBCExceptionReporter,main] ORA-00979: not a GROUP BY expression

[WARN,SessionImpl,Finalizer] unclosed connection, forgot to call close() on your session?
[DEBUG,HqlAggregateTests,main] select model.admSnpeLocale.id,model.admSnpeLocale.ime,count(model.ime)
from yu.co.snpe.dbtable.model.hibernate.AdmSnpeLocales as model
where model.admSnpeLocale.id like ?
group by model.admSnpeLocale.id,model.admSnpeLocale.ime
order by 1
Hibernate: select admsnpeloc1_.ID as col_0_0_, admsnpeloc1_.IME as col_1_0_, count(admsnpeloc0_.IME) as col_2_0_ from ADM_SNPE_LOCALES admsnpeloc0_, ADM_SNPE_LOCALE admsnpeloc1_ where admsnpeloc0_.LOC=admsnpeloc1_.ID and ((admsnpeloc0_.LOC like ? )) group by  admsnpeloc0_.LOC , admsnpeloc1_.IME order by  1
[WARN,JDBCExceptionReporter,main] SQL Error: 979, SQLState: 42000
[ERROR,JDBCExceptionReporter,main] ORA-00979: not a GROUP BY expression



Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 17, 2004 11:46 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
I have added informations for this query.It is important :

It work with hsql, but doesn't work with oracle (8,9) and postgresql 8 beta

Both databases retunr error ' not GROUP by expression'

I make test with Christian's CaveatEmptor , too
This is test for CaveatEmptor :
Code:
/*

package org.hibernate.auction.test;

import java.util.List;

import net.sf.hibernate.HibernateException;
import net.sf.hibernate.Query;
import net.sf.hibernate.Session;

import org.hibernate.auction.exceptions.InfrastructureException;
import org.hibernate.auction.persistence.HibernateUtil;

/**
* @author snpe
*
*/
public class TestHql extends TestCaseWithData {

    public TestHql(String s) {
        super(s);
    }
   
    public void testHql () throws Exception {
        initData();
        HibernateUtil.beginTransaction();
        Session session = HibernateUtil.getSession();
        List list = null;
      try {
         String queryString = "select bid.item.id,bid.item.name,min(bid.created) " +
         "\nfrom Bid bid" +
         "\ngroup by bid.item.id,bid.item.name";
         Query query = session.createQuery(queryString);
         list = query.list();
      }  catch (HibernateException ex) {
         throw new InfrastructureException(ex);
      }
      HibernateUtil.commitTransaction();
      HibernateUtil.closeSession();
    }

}


Log from test with postgresql :

17:41:12,698 INFO Environment: Hibernate 2.1.4
17:41:12,703 INFO Environment: hibernate.properties not found
17:41:12,716 INFO Environment: using CGLIB reflection optimizer
17:41:12,730 INFO Configuration: configuring from resource: /hibernate.cfg.xml
17:41:12,730 INFO Configuration: Configuration resource: /hibernate.cfg.xml
17:41:13,143 INFO Configuration: Mapping resource: org/hibernate/auction/model/User.hbm.xml
17:41:13,511 INFO Binder: Mapping class: org.hibernate.auction.model.User -> USERS
17:41:14,579 INFO Configuration: Mapping resource: org/hibernate/auction/model/Item.hbm.xml
17:41:14,721 INFO Binder: Mapping class: org.hibernate.auction.model.Item -> ITEM
17:41:14,764 INFO Binder: Mapping collection: org.hibernate.auction.model.Item.categories -> CATEGORY_ITEM
17:41:14,775 INFO Configuration: Mapping resource: org/hibernate/auction/model/Category.hbm.xml
17:41:14,875 INFO Binder: Mapping class: org.hibernate.auction.model.Category -> CATEGORY
17:41:14,885 INFO Binder: Mapping collection: org.hibernate.auction.model.Category.items -> CATEGORY_ITEM
17:41:14,886 INFO Configuration: Mapping resource: org/hibernate/auction/model/Bid.hbm.xml
17:41:15,041 INFO Binder: Mapping class: org.hibernate.auction.model.Bid -> BID
17:41:15,046 INFO Configuration: Mapping resource: org/hibernate/auction/model/BillingDetails.hbm.xml
17:41:15,090 INFO Binder: Mapping class: org.hibernate.auction.model.BillingDetails -> BILLING_DETAILS
17:41:15,263 INFO Binder: Mapping joined-subclass: org.hibernate.auction.model.CreditCard -> CREDIT_CARD
17:41:15,272 INFO Binder: Mapping joined-subclass: org.hibernate.auction.model.BankAccount -> BANK_ACCOUNT
17:41:15,273 INFO Configuration: Mapping resource: org/hibernate/auction/model/Comment.hbm.xml
17:41:15,353 INFO Binder: Mapping class: org.hibernate.auction.model.Comment -> COMMENTS
17:41:15,366 INFO Configuration: Mapping resource: org/hibernate/auction/persistence/audit/AuditLogRecord.hbm.xml
17:41:15,513 INFO Binder: Mapping class: org.hibernate.auction.persistence.audit.AuditLogRecord -> AUDIT_LOG
17:41:15,514 INFO Configuration: Configured SessionFactory: null
17:41:15,516 INFO Configuration: processing one-to-many association mappings
17:41:15,516 INFO Binder: Mapping collection: org.hibernate.auction.model.User.items -> ITEM
17:41:15,517 INFO Binder: Mapping collection: org.hibernate.auction.model.User.billingDetails -> BILLING_DETAILS
17:41:15,518 INFO Binder: Mapping collection: org.hibernate.auction.model.Item.bids -> BID
17:41:15,519 INFO Binder: Mapping collection: org.hibernate.auction.model.Category.childCategories -> CATEGORY
17:41:15,519 INFO Configuration: processing one-to-one association property references
17:41:15,520 INFO Configuration: processing foreign key constraints
17:41:15,661 INFO Dialect: Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
17:41:15,671 INFO SettingsFactory: Use outer join fetching: true
17:41:15,720 INFO DriverManagerConnectionProvider: Using Hibernate built-in connection pool (not for production use!)
17:41:15,720 INFO DriverManagerConnectionProvider: Hibernate connection pool size: 1
17:41:15,742 INFO DriverManagerConnectionProvider: using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/snpe
17:41:15,742 INFO DriverManagerConnectionProvider: connection properties: {user=snpe, password=snjeza}
17:41:15,767 INFO TransactionManagerLookupFactory: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
17:41:16,399 INFO SettingsFactory: Use scrollable result sets: true
17:41:16,400 INFO SettingsFactory: Use JDBC3 getGeneratedKeys(): false
17:41:16,400 INFO SettingsFactory: Optimize cache for minimal puts: false
17:41:16,400 INFO SettingsFactory: echoing all SQL to stdout
17:41:16,401 INFO SettingsFactory: Query language substitutions: {no='N', yes='Y'}
17:41:16,401 INFO SettingsFactory: cache provider: net.sf.ehcache.hibernate.Provider
17:41:16,414 INFO Configuration: instantiating and configuring caches
17:41:16,497 INFO SessionFactoryImpl: building session factory
17:41:19,028 INFO SessionFactoryObjectFactory: no JNDI name configured
17:41:19,029 INFO Configuration: processing one-to-many association mappings
17:41:19,029 INFO Configuration: processing one-to-one association property references
17:41:19,029 INFO Configuration: processing foreign key constraints
17:41:19,036 INFO Dialect: Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
17:41:19,037 INFO SettingsFactory: Use outer join fetching: true
17:41:19,038 INFO DriverManagerConnectionProvider: Using Hibernate built-in connection pool (not for production use!)
17:41:19,038 INFO DriverManagerConnectionProvider: Hibernate connection pool size: 1
17:41:19,038 INFO DriverManagerConnectionProvider: using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/snpe
17:41:19,039 INFO DriverManagerConnectionProvider: connection properties: {user=snpe, password=snjeza}
17:41:19,039 INFO TransactionManagerLookupFactory: No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
17:41:19,050 INFO SettingsFactory: Use scrollable result sets: true
17:41:19,051 INFO SettingsFactory: Use JDBC3 getGeneratedKeys(): false
17:41:19,051 INFO SettingsFactory: Optimize cache for minimal puts: false
17:41:19,051 INFO SettingsFactory: echoing all SQL to stdout
17:41:19,052 INFO SettingsFactory: Query language substitutions: {no='N', yes='Y'}
17:41:19,052 INFO SettingsFactory: cache provider: net.sf.ehcache.hibernate.Provider
17:41:19,052 INFO Configuration: instantiating and configuring caches
17:41:19,052 INFO SessionFactoryImpl: building session factory
17:41:19,417 INFO SessionFactoryObjectFactory: no JNDI name configured
17:41:19,428 INFO Dialect: Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
17:41:19,429 INFO Configuration: processing one-to-many association mappings
17:41:19,430 INFO Configuration: processing one-to-one association property references
17:41:19,431 INFO Configuration: processing foreign key constraints
17:41:19,432 INFO Configuration: processing one-to-many association mappings
17:41:19,432 INFO Configuration: processing one-to-one association property references
17:41:19,432 INFO Configuration: processing foreign key constraints
17:41:19,480 INFO SchemaExport: Running hbm2ddl schema export
17:41:19,481 INFO SchemaExport: exporting generated schema to database
17:41:19,482 INFO DriverManagerConnectionProvider: Using Hibernate built-in connection pool (not for production use!)
17:41:19,482 INFO DriverManagerConnectionProvider: Hibernate connection pool size: 1
17:41:19,482 INFO DriverManagerConnectionProvider: using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/snpe
17:41:19,483 INFO DriverManagerConnectionProvider: connection properties: {user=snpe, password=snjeza}
17:41:21,445 INFO SchemaExport: schema export complete
17:41:21,450 INFO DriverManagerConnectionProvider: cleaning up connection pool: jdbc:postgresql://localhost/snpe
Running test...
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: select nextval ('hibernate_sequence')
Hibernate: insert into CATEGORY (VERSION, NAME, CREATED, PARENT_CATEGORY_ID, CATEGORY_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into USERS (VERSION, FIRSTNAME, LASTNAME, USERNAME, "PASSWORD", EMAIL, RANKING, IS_ADMIN, CREATED, DEFAULT_BILLING_DETAILS_ID, STREET, ZIPCODE, CITY, USER_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into ITEM (VERSION, NAME, DESCRIPTION, INITIAL_PRICE, INITIAL_PRICE_CURRENCY, RESERVE_PRICE, RESERVE_PRICE_CURRENCY, START_DATE, END_DATE, STATE, APPROVAL_DATETIME, CREATED, APPROVED_BY_USER_ID, SELLER_ID, SUCCESSFUL_BID_ID, ITEM_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into COMMENTS (VERSION, RATING, COMMENT_TEXT, ITEM_ID, FROM_USER_ID, COMMENT_ID) values (?, ?, ?, ?, ?, ?)
Hibernate: insert into BILLING_DETAILS (VERSION, OWNER_NAME, CREATED, USER_ID, BILLING_DETAILS_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into CREDIT_CARD (CC_TYPE, CC_NUMBER, EXP_MONTH, EXP_YEAR, CREDIT_CARD_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into BILLING_DETAILS (VERSION, OWNER_NAME, CREATED, USER_ID, BILLING_DETAILS_ID) values (?, ?, ?, ?, ?)
Hibernate: insert into BANK_ACCOUNT (ACCOUNT_NUMBER, BANK_NAME, BANK_SWIFT, BANK_ACCOUNT_ID) values (?, ?, ?, ?)
Hibernate: insert into BID (AMOUNT, AMOUNT_CURRENCY, CREATED, ITEM_ID, BIDDER_ID, BID_ID) values (?, ?, ?, ?, ?, ?)
Hibernate: update USERS set VERSION=?, FIRSTNAME=?, LASTNAME=?, "PASSWORD"=?, EMAIL=?, RANKING=?, IS_ADMIN=?, DEFAULT_BILLING_DETAILS_ID=?, STREET=?, ZIPCODE=?, CITY=? where USER_ID=? and VERSION=?
Hibernate: update ITEM set VERSION=?, DESCRIPTION=?, INITIAL_PRICE=?, INITIAL_PRICE_CURRENCY=?, RESERVE_PRICE=?, RESERVE_PRICE_CURRENCY=?, STATE=?, APPROVAL_DATETIME=?, APPROVED_BY_USER_ID=?, SUCCESSFUL_BID_ID=? where ITEM_ID=? and VERSION=?
Hibernate: insert into CATEGORY_ITEM (CATEGORY_ID, ITEM_ID) values (?, ?)
Hibernate: update BILLING_DETAILS set USER_ID=? where BILLING_DETAILS_ID=?
Hibernate: select item1_.ITEM_ID as x0_0_, item1_.NAME as x1_0_, min(bid0_.CREATED) as x2_0_ from BID bid0_, ITEM item1_ where bid0_.ITEM_ID=item1_.ITEM_ID group by bid0_.ITEM_ID , item1_.NAME
17:41:36,981 WARN JDBCExceptionReporter: SQL Error: 0, SQLState: 42803
17:41:36,982 ERROR JDBCExceptionReporter: ERROR: column "item1_.item_id" must appear in the GROUP BY clause or be used in an aggregate function
17:41:36,999 WARN JDBCExceptionReporter: SQL Error: 0, SQLState: 42803
17:41:36,999 ERROR JDBCExceptionReporter: ERROR: column "item1_.item_id" must appear in the GROUP BY clause or be used in an aggregate function
17:41:37,019 ERROR JDBCExceptionReporter: Could not execute query
java.sql.SQLException: ERROR: column "item1_.item_id" must appear in the GROUP BY clause or be used in an aggregate function
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1130)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:933)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:139)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:343)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:291)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:206)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:846)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at org.hibernate.auction.test.TestHql.testHql(TestHql.java:47)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at org.hibernate.auction.test.TestCase.runTest(TestCase.java:17)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.