HTTP Status 500 - javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence
type Exception report
message javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause
javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:101) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:791) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1256) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause
javax.persistence.PersistenceException: org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692) org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602) org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1608) org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1152) bandas.bean.MatriculaBean.criarMatricula(MatriculaBean.java:33) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.apache.el.parser.AstValue.invoke(AstValue.java:278) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273) com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:791) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1256) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause
org.hibernate.id.IdentifierGenerationException: could not read a hi value - you need to populate the table: hibernate_sequence org.hibernate.id.enhanced.TableStructure$1$1.execute(TableStructure.java:143) org.hibernate.id.enhanced.TableStructure$1$1.execute(TableStructure.java:126) org.hibernate.jdbc.WorkExecutor.executeReturningWork(WorkExecutor.java:55) org.hibernate.jdbc.AbstractReturningWork.accept(AbstractReturningWork.java:34) org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:56) org.hibernate.id.enhanced.TableStructure$1.getNextValue(TableStructure.java:125) org.hibernate.id.enhanced.NoopOptimizer.generate(NoopOptimizer.java:42) org.hibernate.id.enhanced.SequenceStyleGenerator.generate(SequenceStyleGenerator.java:417) org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101) org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:67) org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189) org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132) org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58) org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:774) org.hibernate.internal.SessionImpl.persist(SessionImpl.java:747) org.hibernate.internal.SessionImpl.persist(SessionImpl.java:752) org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1146) bandas.bean.MatriculaBean.criarMatricula(MatriculaBean.java:33) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.apache.el.parser.AstValue.invoke(AstValue.java:278) org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273) com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87) com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101) javax.faces.component.UICommand.broadcast(UICommand.java:315) javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:791) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1256) com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.64 logs.