1 Reply Latest reply on Apr 13, 2009 5:54 PM by Arbi Sookazian

    Table or view does not exist

    Alex Cougarman Apprentice

      I've used the Seam Generate Entities to create the entity classes for a single test table on my Oracle database. I then go to the page here:



      http://localhost/seamtest/Table1.seam



      All is well. I then click edit, type a value into the text field and click Save. It then blows up with these exceptions. I've not made any modifications; just doing something simple to learn Seam.


      It's obviously able to see the table when it generates the entities but can't write to it when running the app. Help!



      Exception during request processing: 
      Caused by javax.servlet.ServletException with message: "#{table1Home.persist}: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update" 
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      
      ....
      
      java.lang.Thread.run(Thread.java:595)Caused by javax.faces.FacesException with message: "#{table1Home.persist}: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update" 
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
      javax.faces.component.UICommand.broadcast(UICommand.java:387)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      
      ....
      
      java.lang.Thread.run(Thread.java:595)Caused by javax.faces.el.EvaluationException with message: "javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update" 
      javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
      com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
      javax.faces.component.UICommand.broadcast(UICommand.java:387)
      org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
      org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
      org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
      com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      
      ....
      
      java.lang.Thread.run(Thread.java:595)Caused by javax.persistence.PersistenceException with message: "org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update" 
      org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
      org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:299)
      org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:92)
      org.jboss.seam.framework.EntityHome.persist(EntityHome.java:85)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      
      ....
      
      java.lang.Thread.run(Thread.java:595)Caused by org.hibernate.exception.SQLGrammarException with message: "Could not execute JDBC batch update" 
      org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
      org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
      org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
      org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
      
      .....
      
      java.lang.Thread.run(Thread.java:595)Caused by java.sql.BatchUpdateException with message: "ORA-00942: table or view does not exist " 
      oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:367)
      oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9119)
      org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:774)
      org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
      org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)