Last few days I had experience about this issue. I was developing test application with Spring 3, Hibernate 3.3.1, Maven 3 and Jboss 5.0.
I had a class called Employer and it was annotated. Here I have given sample. This is under the package hrm.com.domain.
My application was Spring MVC application and Im not going to post all the source code here. I had following configuration files.
1. hibernate.cfg.xml
2. spring-servlet.xml
3. web.xml
Here is javax.persistence dependency in my POM.xml file. (I have only post here is important part)
javax.persistence
persistence-api
1.0
Then I built the application and copy the war file into jboss_home/server/default/deploy directory. Then Server is started. Server is started without any issue.
Interested thing happened when I run the application in the web browser. Application needs to list down all the employers in the Employer table. This function does not generate any employer list but generated a warning message in the server log like this.
I spent more time to solve this issue. Finally I sorted out the issue. Here I'm describing how to solve it.
In my pom.xml I have
javax.persistence
persistence-api
1.0
I just addedprovided to the above dependency like this.
javax.persistence
persistence-api
1.0
provided
This solved my issue.
Regards,
Dil.
I had a class called Employer and it was annotated. Here I have given sample. This is under the package hrm.com.domain.
@Entity
@Table(name="employer")
public class Employer {
@Id
@Column(name="ID")
@GeneratedValue
private Integer id;
My application was Spring MVC application and Im not going to post all the source code here. I had following configuration files.
1. hibernate.cfg.xml
2. spring-servlet.xml
3. web.xml
Here is javax.persistence dependency in my POM.xml file. (I have only post here is important part)
Then I built the application and copy the war file into jboss_home/server/default/deploy directory. Then Server is started. Server is started without any issue.
Interested thing happened when I run the application in the web browser. Application needs to list down all the employers in the Employer table. This function does not generate any employer list but generated a warning message in the server log like this.
WARN [QuerySplitter] no persistent classes found for query class: FROM hrm.com.domain.Employer
I spent more time to solve this issue. Finally I sorted out the issue. Here I'm describing how to solve it.
In my pom.xml I have
I just added
This solved my issue.
Regards,
Dil.
Comments