Home Discussion Discuss: Spring Jpa Hibernate

  • Reabhishek February 25, 2013 at 12:52 PM

    I am facing one of the issues while running the application . Below is the stacktrace for the same I have specified the name od the persistent unit as 'hibernatePersistenceUnit' java.lang.IllegalArgumentException: No persistence unit with name 'hibernatePersistenceUnit' found at org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.obtainPersistenceUnitInfo(DefaultPersistenceUnitManager.java:393) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.determinePersistenceUnitInfo(LocalContainerEntityManagerFactoryBean.java:244) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:196) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

  • Not able to run the above applicationabhishek February 26, 2013 at 11:40 AM

    I am not able to run the above application. Can you please provide war file of the above application so that i would be able to dig out the cause. Thanks, Abhi

  • Problem in executionOM ANAND October 26, 2012 at 3:00 PM

    Oct 26, 2012 2:57:22 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/SpringJpa] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Unknown entity: org.nsbt.model.Article] with root cause java.lang.IllegalArgumentException: Unknown entity: org.nsbt.model.Article at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:840) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:240) at $Proxy14.persist(Unknown Source) at org.nsbt.dao.ArticleDaoImpl.saveArticle(ArticleDaoImpl.java:27) at org.nsbt.service.ArticleServiceImpl.addArticle(ArticleServiceImpl.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy17.addArticle(Unknown Source) at org.nsbt.controller.ArticleController.saveArticle(ArticleController.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Why this error occur? Please help.

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Hibernate Questions

Hibernate & JPA
Hibernate & JPA  What is difference between JPA and Hibernate ? Both of them look similar then what is the exact difference between them 

Hibernate-Tutorials

Hibernate JPA
In this section, you will learn about JPA with Hibernate 

JPA

JPA Tutorial
. JPA can be used with the various ORM frameworks like, Hibernate, Toplink from...JPA Tutorial In this section we will discuss about the Java Persistence API. This section will describe you all the aspects of JPA such as what is JPA 

Hibernate-Tutorials

Spring Jpa Hibernate
In this section, you will learn about integrating Spring 3 MVC with Hibernate Jpa using a example 

JPA

JPA Architecture
JPA Architecture       JPA Architecture: In this section we will discuss the architecture of JPA specification. Java Persistence API or JPA for short is a lightweight, POJO 

JPA

JPA Introduction
and persist the Java Objects. ORM frameworks that can be used with JPA are Hibernate... that can be used with JPA specification. Hibernate Toplink iBatis Open JPA... JPA Introduction       

Struts Examples

Struts 2, JPA and Hibernate Training
Struts 2, JPA and Hibernate Training       Learn Struts 2, JPA and Hibernate in a combined 5 day online course that makes... that: Makes you expert in Struts 2, JPA and Hibernate Helps you getting 

JPA

JPA Features
JPA Features       In this section we will discuss about the features of JPA (Java Persistence API). This section will give you an idea about the capabilities of JPA based 

JPA

JPA Examples In Eclipse
to develop and test the examples. Hibernate is used as JPA persistence provider... JPA Examples In Eclipse       In the JPA Examples section we will provide you almost all 

Java Technology Tutorials

JPA Native Queries, JPA Native Queries Tutorials
JPA Native Queries       In this section, you will know about the jpa native queries and how to use native query in your JPA application.  JPA Native Queries: JPA native 

Struts-Tutorials

Struts 2, JPA and Hibernate Training
 

JPA

JPA Crud
JPA Crud       In this section we will show you how to develop simple CRUD application using JPA. We will use MySQL database, Hibernate and Java Persistence API to develop 

Struts-Tutorials

Struts 2, JPA and Hibernate Training
are assuming that you have the basic knowledge of Struts2, Hibernate, JPA, Spring. We... Struts 2, JPA and Hibernate Training       The Struts 2, JPA and Hibernate Training for developing enterprise applications 

JPA

JPA Ordering
JPA Ordering       In this section, you will learn about the JPA Ordering and how to develop JPA application using ordering. JPQL queries can contains ORDER BY clause 

JPA

JPA Grouping
JPA Grouping       In this section, you will learn about the JPA Grouping and how to use it in your JPA application. The GROUP BY clause is used with SELECT statement to retrieve 

IDE Questions

JPA
JPA  HOW CAN I WRITE A SIMPLE PROGRAM IN NETBEANS CONSOLE ON JPA ON CRUD APPLICATION? HOW CAN I START KINDLY HELP ME 

Java Server Faces Questions

Hibernate JSF JPA Integration Error - Java Server Faces Questions
Hibernate JSF JPA Integration Error  Hibernate JSF JPA Error I am trying to configure hibernate, JSF and JPA on Jboss server. I am getting following....<filter> <filter-name>Spring OpenEntityManagerInViewFilter< 

JPA

JPA executeUpdate
JPA executeUpdate      ... in your  JPA application. To use executeUpdate() method in your jpa application for executing a jpa UPDATE/DELETE query. This method returns the number of objects 

IDE Questions

JPA
JPA  Sir, I have tried making the jpa application which you have given on this site . But then also I m facing problem in that like : If i make then also it is giving error. If I try to run the application provided by you 

JPA

JPA getSingleResult
JPA getSingleResult      ... is your JPA application.  getSingleResult(): This is the method...=Persistence.createEntityManagerFactory("jpa"); EntityManager em=emf.createEntityManager 

Hibernate Questions

hibernate
why hibernate?  why hibernate?   Hibernate: -Hibernate... library. It solves object-relational impedance mismatch problems. Hibernate makes the application development process easy Hibernate saves the development 

IDE Questions

JPA
JPA   I HAVE MADE A PROJECT IN I HAVE MADE ONE - ONE RELATION MY CODE IS ALSO RIGHT FROM MY POINT OF VIEW. AND WHEN I RUN IT IS GIVING ME THE MESSAGE AS BELOW::::::: run: [EL Info]: 2012-02-27 09:42:36.466--ServerSession 

JPA

JPA-QL Queries
JPA-QL Queries       In this section, we will use the simple JPA-QL query in our JPA application. Here JPA-QL query used with createQuery() method of EntityManager 

JPA

JPA Named Parameter
JPA Named Parameter       In this section, you will learn how to use JPA Named Parameter in your jpa application. In JPA named parameter is used where you assign names 

JSP-Tutorials

JPA Named Queries
JPA Named Queries       In this section, you will know about the JPA Named Queries and how to use in JPA application. @NamedQueries: If you need to use more than one 

Java Technology Tutorials

JPA getResultList Example
JPA getResultList Example   ... the getResultList() method in your JPA application.  getResultList(): This method...=Persistence.createEntityManagerFactory("jpa"); EntityManager em=emf.createEntityManager(); try 

JPA

JPA Positional Parameter
JPA Positional Parameter       In this section, you will learn about the JPA Positional Parameter and how to use in your JPA application. JPA Queries are convenient to pass 

JPA

JPA Named Parameter List
JPA Named Parameter List       In this section, you will learn how to develop a JPA application using JPA Named Parameter List. This is similar as named parameter 

Framework Questions

What is the difference between EJB 3.0 and JPA - Framework
persistance API ). HIbernate 3.0 implements the JPA specification. EJB 2.1...What is the difference between EJB 3.0 and JPA   What is the difference between EJB 3.0 and JPA. How can they work together. Does EJB 3.0 need 

JPA

JPA Count Function
JPA Count Function       In this section, you will learn about the count function of JPA aggregate function. JPA Count function counts all records to database table. JPA Count