[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-954) Failing detection of Sequences?

Diego Plentz (JIRA) noreply at atlassian.com
Wed Aug 13 08:01:06 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30852 ] 

Diego Plentz commented on HBX-954:
----------------------------------

Vincent, i fixed HHH-1697 and it probably fix this too. Could you take a test with the last version? Btw, the problem is with hibernate core itself, not with hibernate tools.

Ana, your solution just ignores the tabname and the owner. This can came up with other errors, like returning non accessible objects, right?

> Failing detection of Sequences?
> -------------------------------
>
>                 Key: HBX-954
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-954
>             Project: Hibernate Tools
>          Issue Type: Bug
>         Environment: Hibernate3 as provided by Seam 1.2.1GA (dunno which subversion)
> Oracle 10g
>            Reporter: Vincent Latombe
>
> Here is my problem : I used reverse engineering to get an entity from a table in a database.
> I got my entity then I wanted to add a generation for the Id. Fine, I add HIBERNATE_SEQUENCE which is needed then I add the annotation to my entity.
> I get this :
> 	@Id
> 	@Column(name = "ID", precision = 22, scale = 0)
> 	@GeneratedValue(strategy=GenerationType.SEQUENCE)
> 	@NotNull
> 	public long getId() {
> 		return this.id;
> 	}
> Nothing really difficult. Then I try to deploy my ejb using the validate strategy of hbm2ddl. And it fails because it can't find the sequence ([DatabaseMetadata] table not found: TESTSEAM.hibernate_sequence)... Ok strange. Then I switch to the update strategy... Now I get something interesting.
> 14:40:12,843 INFO  [DatabaseMetadata] table not found: TESTSEAM.hibernate_sequence
> 14:40:12,843 INFO  [DatabaseMetadata] table not found: hibernate_sequence
> 14:40:12,875 ERROR [SchemaUpdate] Unsuccessful: create sequence TESTSEAM.hibernate_sequence
> 14:40:12,875 ERROR [SchemaUpdate] ORA-00955: ce nom d'objet existe dÚjÓ
> 14:40:12,875 INFO  [SchemaUpdate] schema update complete
> It seems that DatabaseMetadata try to lookup a table instead of a sequence, so it can't detect the already existing sequence. So then it tries to create the sequence but it already exists. Any clue?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the hibernate-issues mailing list