This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

ROO: test doesn't work with Oracle DB

May 20th, 2010, 04:36 AM

Hi,

I try to create my test application with ROO.
When I use HYPERSONIC_IN_MEMORY DB - application work right.
When I use ORACLE DB - application doesn't work at all.
I can't view and insert rows.
I use next scripts to create my example:

My first guess is the primary key generation. Oracle uses sequences which is different than the identity-type keys on some other databases. So maybe the generated ID needs a different generation strategy. Also, do you have create rights on all types of objects in your oracle schema, including sequence?

Comment

Normally we wouldn't be able to help with this, but given Alan is about to start on database reverse engineering anyway, he'll need to mess around with Oracle to make sure it works properly. So if you log a bug at https://jira.springsource.org/browse/ROO we can take a look into this for you as part of that. Please include your script and link where we can download Oracle. It's only 220 Mb, which is nice. Last time I looked it took 3 CD ISO images. :-)

Comment

Normally we wouldn't be able to help with this, but given Alan is about to start on database reverse engineering anyway, he'll need to mess around with Oracle to make sure it works properly. So if you log a bug at https://jira.springsource.org/browse/ROO we can take a look into this for you as part of that. Please include your script and link where we can download Oracle. It's only 220 Mb, which is nice. Last time I looked it took 3 CD ISO images. :-)

Comment

There was a bug relating to the unit tests failing, but this occurred with other databases as well - see ROO-946. After this fix is applied I can't reproduce the problem with Oracle in ROO-900, as the unit tests pass OK and the generated web app also works with my local instance of Oracle XE (Western European).

Comment

Just to verify Alan's fix, as some people still seem to have problems with Oracle DB examples.

* With old Roo Version (1.1.0.M2 [rev 2f0bcd0]) it didnt work for me.
* I updated to Roo Version (1.1.0.M2 [rev d126db9]) which includes Alan's fix, and now everything works fine. Tests and application run with Oracle XE :-)

Comment

Just to verify Alan's fix, as some people still seem to have problems with Oracle DB examples.

* With old Roo Version (1.1.0.M2 [rev 2f0bcd0]) it didnt work for me.
* I updated to Roo Version (1.1.0.M2 [rev d126db9]) which includes Alan's fix, and now everything works fine. Tests and application run with Oracle XE :-)

Comment

My first guess is the primary key generation. Oracle uses sequences which is different than the identity-type keys on some other databases. So maybe the generated ID needs a different generation strategy. Also, do you have create rights on all types of objects in your oracle schema, including sequence?

If we want the front end to create the oracle database objects, then the minimum privileges that the oracle user requires are:
connect, create table and create sequence

I had the same sequence error on the tests until I added create sequence privilege to the user.