org.hibernate.hql.ast.QuerySyntaxException with Hibernate

后端 未结 7 2122
死守一世寂寞
死守一世寂寞 2021-02-20 01:34

I\'m new to using Hibernate with Java. I\'m getting the following exception. The stuff that I found online regarding this error didn\'t seem to help. Any ideas? The Exception:<

7条回答
  •  遥遥无期
    2021-02-20 01:45

    I was having the same problem and I solved by adding aspectj entries to my pom.xml see below. I guess it makes sense if you are using annotations. Otherwise you need to specify the mappings in the XML file. I had this problem from a project that was using a jar with JPA annotations.

            
                org.codehaus.mojo
                aspectj-maven-plugin
                1.2 
                
                    
                    
                        org.aspectj
                        aspectjrt
                        ${aspectj.version}
                    
                    
                        org.aspectj
                        aspectjtools
                        ${aspectj.version}
                    
                
                
                    
        
            
                                                 your.project                        your.artifact                                         
            
            
                        
                            compile
                            test-compile
                        
                    
                
                
                    true
                    
                        
                            org.springframework
                            spring-aspects
                        
                    
                    1.6
                    1.6
                
            
    

提交回复
热议问题