[Resin-interest] EJB3 Primary Key Generation

2010-06-14 Thread Tara Doney
Is the @GeneratedValue JPA annotation fully supported in
Resin 4?  I have an entity which should
use a TableGeneration strategy against 
Sybase.  There is an already existing table, NextId, in our database 
which stores
the primary key value for many tables.  When
starting up Resin, an error is given.  From
the error it looks like Resin is 
trying to use a table named GEN_TABLE, even
though the annotation 
clearly provides the existing NextId as the table name.

  
@Id
  @GeneratedValue(strategy=GenerationType.TABLE,
generator=ol_pk_generator)
  @TableGenerator(
name=ol_pk_generator,
table=NextId, 
pkColumnName=tableName,
pkColumnValue=OrderLine,
valueColumnName=id
  )
  
@Column(name=orderLineId)
  private int
orderLineId;


Here is the error:

[10-06-07 08:43:25.154] {http://*:3790-1} Compiling
com/test/bean/OrderLine__ResinExt.java
[10-06-07 08:43:37.876] {http://*:3790-1}
WebApp[http://default/resin-doc/examples/servlet-hello] fail
[10-06-07 08:43:37.877] {http://*:3790-1} 'GEN_TABLE' is
not a valid 
database table.  Either the
table needs to be created or the 
create-database-tables attribute must be set.

  
com.sybase.jdbc2.jdbc.SybSQLException: GEN_TABLE 
not found. Specify
owner.objectname or use sp_help to check whether 
the object exists (sp_help may
produce lots of output).

[10-06-07 08:43:37.888] {http://*:3790-1} 'GEN_TABLE' is
not a valid database table.  Either the
table 
needs to be created or the create-database-tables attribute must be set.

  
com.sybase.jdbc2.jdbc.SybSQLException:
GEN_TABLE not found. Specify 
owner.objectname or use sp_help to check whether
the object exists 
(sp_help may produce lots of output).



  


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] EJB3 Primary Key Generation

2010-06-14 Thread Alex
 Is the @GeneratedValue JPA annotation fully supported in
 Resin 4?
We suggest that a different JPA implementation is used with Resin at this time. 
Eclipse Link and Open JPA are good candidates. 

THanks,
Alex

  I have an entity which should
 use a TableGeneration strategy against 
 Sybase.  There is an already existing table, NextId, in our database 
 which stores
 the primary key value for many tables.  When
 starting up Resin, an error is given.  From
 the error it looks like Resin is 
 trying to use a table named GEN_TABLE, even
 though the annotation 
 clearly provides the existing NextId as the table name.
 
 
 @Id
  @GeneratedValue(strategy=GenerationType.TABLE,
 generator=ol_pk_generator)
  @TableGenerator(
name=ol_pk_generator,
table=NextId, 
pkColumnName=tableName,
 pkColumnValue=OrderLine,
valueColumnName=id
  )
 
 @Column(name=orderLineId)
  private int
 orderLineId;
 
 
 Here is the error:
 
 [10-06-07 08:43:25.154] {http://*:3790-1} Compiling
 com/test/bean/OrderLine__ResinExt.java
 [10-06-07 08:43:37.876] {http://*:3790-1}
 WebApp[http://default/resin-doc/examples/servlet-hello] fail
 [10-06-07 08:43:37.877] {http://*:3790-1} 'GEN_TABLE' is
 not a valid 
 database table.  Either the
 table needs to be created or the 
 create-database-tables attribute must be set.
 
  
 com.sybase.jdbc2.jdbc.SybSQLException: GEN_TABLE 
 not found. Specify
 owner.objectname or use sp_help to check whether 
 the object exists (sp_help may
 produce lots of output).
 
 [10-06-07 08:43:37.888] {http://*:3790-1} 'GEN_TABLE' is
 not a valid database table.  Either the
 table 
 needs to be created or the create-database-tables attribute must be set.
 
 
 com.sybase.jdbc2.jdbc.SybSQLException:
 GEN_TABLE not found. Specify 
 owner.objectname or use sp_help to check whether
 the object exists 
 (sp_help may produce lots of output).
 
 
 
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest