I have been facing this weird exception while trying to persist some values into a table using Hibernate in a Java application. However this exception occurs only for one parti
I also came across this issue. Here is my solution:
the error: https://gist.github.com/wencheng1994
I solve that. It mainly because the db account has a higher authority. I set the "hibernate.hbm2ddl.auto=update", So when hbm2ddl works, it tried to find all exists shcema I defied. But there is two schema exist the table with the same name. then the db account can find that. so it found "more than one table in the namespace"
All I need to do is to make the db account lower authority so that it can not find table in other schema. (one shcema relation one db account).
So after having the same issue, it turns out that I needed to update my OJDBC driver from ojdbc6 to ojdbc8. Hopefully this helps.
Another situation may be occurred except whatever dear RichB has been stated. in ORACLE every user has separate schema , Therefore probably there is tow tables with the same name in two different schemes then you should specify your default schema in persistence.xml with below property
<property name="hibernate.default_schema" value="username"/>
I have same issue with such configuration
@Entity
@Table(name = "NOTIFICATION")
public class Notification {
...
}
issue was resolved for me when I moved table name from @Table to @Entity
@Entity(name = "NOTIFICATION")
@Table
public class Notification {
...
}