[jboss-user] [Installation, Configuration & DEPLOYMENT] - Using Oracle sequence with JBOSS

neisann do-not-reply at jboss.com
Fri Aug 10 11:42:37 EDT 2007


Hi,

I'm trying to use JBOSS IDE for Eclipse but I'm having trouble using an automatic generated id populated from a Oracle sequence previously created in the database. I guess there is some aditional configuration that I need to do in my application but I don't know what it is.

In the persistence XML I have:


  | <?xml version="1.0" encoding="UTF-8"?>
  | <persistence>
  |   <persistence-unit name="shoestringPU">>
  |       <jta-data-source>java:/OracleDS</jta-data-source>
  |     <properties>
  |       <property name="hibernate.dialect" 
  |         value="org.hibernate.dialect.OracleDialect"/>
  |     </properties>    
  |   </persistence-unit>
  | </persistence>
  | 

At the entity bean I have:


  | 	@Id
  | 	@GeneratedValue(strategy=GenerationType.AUTO)	
  | 	public int getId() {
  | 		return id;
  | 	}
  | 

I'm getting the error "java.sql.SQLException: ORA-02289: sequence does not exist".

Thank you.

Nei

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

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



More information about the jboss-user mailing list