JBoss ver 4.0.3SP1
jboss-EJB-3.0_RC3
pgsql 8.0.5

my Entity bean code:


  | package com.cherubim.ejb3.entity;
  | 
  | import java.util.Collection;
  | import javax.persistence.Entity;
  | import javax.persistence.GeneratorType;
  | import javax.persistence.Id;
  | import javax.persistence.ManyToMany;
  | import javax.persistence.SequenceGenerator;
  | 
  | @Entity
  | @SequenceGenerator(name="StudentSeq", sequenceName="STU_SEQ")
  | public class Student implements java.io.Serializable
  | {
  |    private int id;
  |    private String name;
  |    private float age;
  |    private Collection<Course> courses;
  | 
  |   @Id(generate=GeneratorType.SEQUENCE,generator="StudentSeq")
  |   public int getId()
  |   {
  |     return id;
  |   }
  | 
  |   public void setId(int id)
  |   {
  |     this.id = id;
  |   }
  | 
  |   public String getName()
  |   {
  |     return name;
  |   }
  | 
  |   public void setName(String name)
  |   {
  |     this.name = name;
  |   }
  | 
  |   public float getAge()
  |   {
  |     return age;
  |   }
  | 
  |   public void setAge(float age)
  |   {
  |     this.age = age;
  |   }
  | }
  | 

when i create a new record error message:
org.apache.jasper.JasperException: null; CausedByException is:
  |     could not get next sequence value
  |     
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
  |     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
  |     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
  |     javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |     
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


My server log:
[org.hibernate.util.JDBCExceptionReporter] could not get next sequence value 
[select next value for STU_SEQ from dual_STU_SEQ]
  | org.postgresql.util.PSQLException: ERROR: syntax error at or near "value"

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3914296#3914296

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3914296


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to