Martin Vajsar wrote:Welcome to the Ranch, Jose!
![]()
I'm new to Hibernate myself at this time, so I may be wrong, but I'd say that the problem might be that Hibernate is not configured to use Oracle's dialect, thus generating SQL which is not valid in Oracle. I've found some information about configuring the dialect here: http://www.tutorialspoint.com/hibernate/hibernate_configuration.htm.
Jose Pascual Gimeno wrote:I've checked my configurations files and I 've seen that the mapping to Oracle is correctly indicated in the persintence.xml file :
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
Martin Vajsar wrote:
Jose Pascual Gimeno wrote:I've checked my configurations files and I 've seen that the mapping to Oracle is correctly indicated in the persintence.xml file :
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
Is this syntax supported? I've only seen this one:
That is, the property value comes as the text of the property tag, not as a value attribute. This might explain that the expected dialect isn't used.
Martin Vajsar wrote:Looks like I was wrong about the syntax. The tutorial I've googled up is probably dated. Sorry about that, please revert to your earlier syntax.
When I start my Hibernate project, it prints out the configuration (including the database dialect in use) to the console. Can you see that in your program output too? Does it print out the dialect you've configured?
27/2/2014 12:51:13.165 INFO [Dialect.?:?] Using dialect: org.hibernate.dialect.OracleDialect
27/2/2014 12:51:13.415 WARN [Oracle9Dialect.?:?] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
27/2/2014 12:51:13.415 WARN [OracleDialect.?:?] The OracleDialect dialect has been deprecated; use Oracle8iDialect instead
Martin Vajsar wrote:I guess that using the dialect corresponding to the exact version of your database would be the best option. Which version of Oracle are you using?
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
|