Here are the issues and solutions in case anyone else is having a
similar problem:
 
Issue #1 - Reading the hibernate configuration file:
 
When trying to call the configure method of the Configuration class,
for some reason Flex apps will work fine when using the class path
notation (i.e. "/hibernate.cfg.xml") However, both ColdFusion and JSP
don't like this. To get it to work with ColdFusion and JSP, you must
pass a File object to the configure method call (i.e. config.configure
(new File ("C:\\whatever\hibernate.cfg.xml"). This file must also be
both readable and writable by a certain user on the machine. We're
still working on which user needs this (currently we have it set to
all users).
 
Obviously this ties a physical file path to the class definition,
which is not very good. We're still working on a solution to that
design issue. And allowing all users access to the hibernate config
file isn't good either.
 
Issue #2 - Reading the mapping file: 
 
Coldfusion also seems to require that the mapping files, (i.e.
User.hbm.xml) be both writable and readable by this mystery user.
Again we set this to all users just to get this to work.

Rich


On Thu, 9 Dec 2004 07:56:23 -0500, Rich Tretola <[EMAIL PROTECTED]> wrote:
> I am building a Flex app and have the backend java classes complete
> thanks to hibernate.  We are trying to use the same backend for a
> ColdFusion app as well but can not instantiate the root dao without
> errors.  The root dao attempts to read in the hibernate cofig file and
> fails which leads to a noclassdeffound error.  We have tried putting
> the config file in the class root of the cf server as well as web
> root, jvm  bin folder, and a bunch of other places.
> 
> I am not having any trouble at all using these files from Flex.
> 
> Anyone else tried this yet?
> 
> Rich Tretola
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186818
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to