BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

Unable to compile with Hibernate 4.1.7.Final #4

Closed rbanikaz closed 11 years ago

rbanikaz commented 11 years ago

Getting Compilation error when compiling with 4.1.7.Final, though it works fine with 4.1.6.Final.

Error:

[INFO] Compiling 546 source files to /Users/rbanikaz/git/normandy/target/classes

  1. ERROR in /Users/rbanikaz/git/normandy/src/main/groovy/com/xad/cms/web/CreativePlatformInterface.groovy (at line 0) package com.xad.cms.web ^ The type org.hibernate.SessionFactory cannot be resolved. It is indirectly referenced from required .class files

    1 problem (1 error)[INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR :

Deps:

        <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-core</artifactId>
       <version>4.1.7.Final</version>
    </dependency>
        <dependency>
             <groupId>org.hibernate</groupId>
             <artifactId>hibernate-validator</artifactId>
             <version>4.2.0.Final</version>
        </dependency>
        <dependency>
              <groupId>com.britesnow</groupId>
              <artifactId>snow</artifactId>
              <version>2.0.0-SNAPSHOT</version>
         </dependency>
jeremychone commented 11 years ago

Thanks for looking at this issue, we will work on solving this issue for the 2.0.0 release.

jeremychone commented 11 years ago

We tested it and it worked. We also check in the hibernate-core-4.1.7.Final.jar and the org.hibernate.SessionFactory is defined.

So, it must be something else. Perhaps in CreativePlatformInterface.groovy, or in the groovy integration.

jeremychone commented 11 years ago

We have been looking at this one, and could not find the error. We compiled with hibernate-core-4.1.7.Final on multiple environment, and everything worked fine.

Closing until we determine it is an issue with Snow.

rbanikaz commented 11 years ago

Just an update here, finally able to resolve it :)

It's pretty crazy, but it started to work after I deleted the whole folder:

~/.m2/repository/org/hibernate/hibernate-core/4.1.7.Final/

I guess somehow the jar file must have been corrupted? Not sure, but now it's working...

jeremychone commented 11 years ago

Thanks for the update. Makes sense, it looked to be a weird compilation/class jvm issue.