简体   繁体   中英

Error in generating Hibernate configuration with ColdFusion 11 / Oracle 12c

We've just moved to cf11 with oracle 12c. Some of our Hibernate ORM queries are failing. One of the errors is

java.io.IOException: Permission denied "coldfusion.orm.hibernate.HibernateConfiguration$MappingGenerationException: Error in generating Hibernate configuration.

I haven't been able to find out which version of Hibernate ColdFusion 11 uses - I wonder if it's not compatible with oracle 12c?

What version of Hibernate does CFML use? only lists the versions of Hibernate used by previous versions of ColdFusion

The ColdFusion Administrator lists paths for the following jar files under CF Server Java Class Path on the Settings Summary tab, so I guess these are the ones used:

  • hibernate-commons-annotations-4.0.1.Final.jar
  • hibernate-core-4.1.10.Final.jar
  • hibernate-ehcache-4.1.10.Final.jar
  • hibernate-jpa-2.0-api-1.0.1.Final.jar

I realized in the end that the 'java.io.IOException: Permission denied' related to directory permissions on the server. When I enabled write access on the directory the ColdFusion was running from, the error disappeared, and an ORM .xml file was created.

I had similar problem with 'java.io.IOException: Permission denied'. It was related to ehcache underneath trying to open file in temporary folder. If this is the case there is no need to change permission on the whole ColdFusion directory. In my case setting -Djava.io.tmpdir=/tmp/<folder_name> on JVM and making sure that this folder has proper write permission resolved this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM