Reputation: 1471
I just created an app and it worked ok to begin with. Then I generated an entity and restarted it and now I'm getting this error. Any suggestions?
I'm also wondering what the differences are between the starting methods:
mvn spring-boot:run
grunt server
I get the compilation error with the former and it starts but won't let me authenticate with the latter. I'm not using an IDE. I'm just running it from iTerm.
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jhipster 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.0.2.RELEASE:run (default-cli) @ jhipster >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ jhipster ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jhipster ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 22 resources
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy) @ jhipster ---
[INFO] Configured Artifact: io.github.jhipster.loaded:agent:0.8:jar
[INFO] Copying agent-0.8.jar to /Users/Dan/work/jhipster-mongo/spring_loaded/springloaded-jhipster.jar
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ jhipster ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 80 source files to /Users/Dan/work/jhipster-mongo/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/Dan/work/jhipster-mongo/src/main/java/com/dancancro/picker/domain/Decision.java:[7,33] package org.hibernate.annotations does not exist
[ERROR] /Users/Dan/work/jhipster-mongo/src/main/java/com/dancancro/picker/domain/Decision.java:[8,33] package org.hibernate.annotations does not exist
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.603 s
[INFO] Finished at: 2014-06-19T19:03:32+01:00
[INFO] Final Memory: 28M/135M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project jhipster: Compilation failure: Compilation failure:
[ERROR] /Users/Dan/work/jhipster-mongo/src/main/java/com/dancancro/picker/domain/Decision.java:[7,33] package org.hibernate.annotations does not exist
[ERROR] /Users/Dan/work/jhipster-mongo/src/main/java/com/dancancro/picker/domain/Decision.java:[8,33] package org.hibernate.annotations does not exist
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Upvotes: 0
Views: 3199
Reputation: 2725
It simply means that your pom.xml file does not contain org.hibernate.annotations
dependency
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
</dependency>
Copy & Paste it in your pom.xml file in inside the tag: <dependencies> </dependencies>
Upvotes: 2
Reputation: 1911
hazelcast pom considers hibernate as "provided" cf https://github.com/hazelcast/hazelcast/blob/3.2-fix-eacg/hazelcast-hibernate/hazelcast-hibernate4/pom.xml#L68
You need to add the hibernate dependencies
I did not see the fix in the master tree yet. Hence : https://github.com/jhipster/generator-jhipster/issues/604
Upvotes: 1
Reputation: 3688
This was an error with MongoDB (which is using Hibernate annotations, but not Hibernate - not a simple use case!). It is now corrected.
Upvotes: 1