Forums Register Login

jpa problem

+Pie Number of slices to send: Send
Hi. I am getting the following error

I have made sure in debug mode the following persist code is functioning as required.

My entity classes are as follows:

Person.java

Address.java

+Pie Number of slices to send: Send
I have reworked my code as follows:

persistence class

Address.java

Person.java

I am getting the error

My datasource is connecting to oracle as the system administrator and the tables Person and Address are in the schema rbv. I am wondering if this is the issue?
+Pie Number of slices to send: Send
right in the classes I prefixed the table names with 'rbv.' My address table is being populated but the person table is empty. Do I need to save the person objects seperately??? I thought they would be persisted by simply persisting my address object???
+Pie Number of slices to send: Send
Address.java reworked

Person table is still empty?
+Pie Number of slices to send: Send
i think the user id and password which you are using in obtaining the connection with database do not have sufficient permission.

Use the same user and password and login to oracle and fire any update or insert query..check whether you are getting the same ORA error message....
+Pie Number of slices to send: Send
I am not getting an ORA error message at the point of persist. If it is a permission problem how come the address table is being populated fine? Unless there is some special permission required for the cascade which I dont know about. My sql is as follows

After reworking my sql as above and changing my datasource to connect as the rbv user I no longer need to prefix the table names in the classes with rbv. However the cascade still doesnt work?
+Pie Number of slices to send: Send
Hello,

In the @Table annotation can you please use the schema attribute explicitly..

I mean in person use

@Table(name="PERSON",schema="rbv")

In Address use

@Table(name="ADDRESS",schema="rbv")

Default value of schema is "" so may be it is creating the problem..
It's feeding time! Give me the food you were going to give to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2681 times.
Similar Threads
Foreign key value null if nullable true in @OneToMany assoc
Caused by: java.sql.SQLException: Statement parameter 2 not set.
Hibernate example error message
Why is my Hibernate Search query not working?
get generated key
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:11:50.