-->
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: How come the LEFT_JOIN is gone from the Critreria interface
PostPosted: Mon Nov 29, 2010 9:16 am 
Pro
Pro

Joined: Mon Apr 16, 2007 8:10 am
Posts: 246
I updated my pom.xml file to upgrade the Hibernate Core version to 3.6.0.Final as in:

Code:
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>3.1.0.GA</version>
      </dependency>


And now, when building, I get the following error:

Quote:
cannot find symbol
symbol : variable LEFT_JOIN
location: interface org.hibernate.Criteria


The build worked fine before when I had:

Code:
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.3.2.GA</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-annotations</artifactId>
        <version>3.4.0.GA</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>3.1.0.GA</version>
      </dependency>


The error message:

Quote:
[INFO] Compilation failure

/home/stephane/dev/java/project/learnintouch/core/src/main/java/com/thalasoft/learnintouch/core/dao/hibernate/MailHibernateDao.java:[94,146] cannot find symbol
symbol : variable LEFT_JOIN
location: interface org.hibernate.Criteria

/home/stephane/dev/java/project/learnintouch/core/src/main/java/com/thalasoft/learnintouch/core/dao/hibernate/MailHibernateDao.java:[94,93] cannot find symbol
symbol : variable LEFT_JOIN
location: interface org.hibernate.Criteria


How come the LEFT_JOIN is gone from the Critreria interface ?


Top
 Profile  
 
 Post subject: Re: How come the LEFT_JOIN is gone from the Critreria interface
PostPosted: Mon Nov 29, 2010 8:23 pm 
Pro
Pro

Joined: Mon Apr 16, 2007 8:10 am
Posts: 246
The problem was that my pom.xml file was messing the Hibernate dependency, as well as not switching joda-time-hibernate to usertype-joda

Here is the pom.xml file with the required repositories:

Code:
  <properties>
    <hibernate.version>3.6.0.Final</hibernate.version>
  </properties>
  <repositories>
    <repository>
      <id>JBoss repository</id>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
    </repository>
    <repository>
      <id>Usertype</id>
      <url>http://repo1.maven.org/maven2/org/jadira</url>
    </repository>
  </repositories>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>${hibernate.version}</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>1.6</version>
      </dependency>
      <dependency>
        <groupId>org.jadira.usertype</groupId>
        <artifactId>usertype.jodatime</artifactId>
        <version>1.7</version>
      </dependency>
    </dependencies>
  </dependencyManagement>


Then the dateTime usertype is defined as:

Code:
   <typedef name="dateTime" class="org.jadira.usertype.dateandtime.joda.PersistentDateTime" />


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.