I am having this issue:
http://stackoverflow.com/questions/20222192/ora-00979-not-a-group-by-expression-with-hibernate-hql
It is said in an answer that this might be a bug but I am having a hard time believing that, since this is a pretty common kind of query. Also, I am not getting some other queries that produce dialect specific statements for different databases properly translated to Oracle10g dialect.
This is my hibernate.cfg.xml configuration:
Code:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="use_sql_comments">true</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_statements">50</property>
<property name="hibernate.c3p0.idle_test_period">300</property>
</session-factory>
</hibernate-configuration>
And this is my data source configuration (I am using JNDI):
Code:
<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"
value="java:myJNDIresourceURI"/>
<property name="lookupOnStartup"
value="false"/>
<property name="cache"
value="true"/>
<property name="proxyInterface"
value="javax.sql.DataSource"/>
</bean>
Any suggestions? I am using Hibernate version 4.2.1final. All of these queries work with a MySQL database. Any query that produce standard, dialect-agnostic SQL works in Oracle.