I’ve only got about 3 seconds, but I
will say that if an object doesn’t exist it’ll be generated –
even in production mode. That seems to be what’s going on.
The compiler may be out of date.
Honestly, I might remove it because I don’t want to maintain it. We’ll
see.
Doug
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Clement
Sent: Saturday, May 13, 2006 6:29
PM
To: [email protected]
Subject: Re: [Reactor For CF]
Hosting and Reactor
Final post on the
subject...
I forgot to mention that I'm running a version from SVN. After figuring
out I didn't have the latest version I updated. The reactorCompiler now
creates the validator objects and dictionary objects.
Unfortunately, I'm still running into the same problem only this time with the
dictionary object.
It seems that when using a validator object, a dictionary object needs to be
instantiated and this is causing the the 'information_schema' database to be
called. Here it is in the objectFactory.cfc:
<cfswitch _expression_="#getConfig().getMode()#">
<cfcase value="production">
<cftry>
<!--- get an instance of the object
from cache or create it --->
<cfif
StructKeyExists(variables.Cache["Dictionary"], arguments.alias)>
<cfset
DictionaryObject = variables.TimedCache.getValue(dictionaryXmlPath) />
<cfelse>
<cfset DictionaryObject
= CreateObject("Component",
"reactor.dictionary.dictionary").init(dictionaryXmlPath) />
<cfset
variables.Cache["Dictionary"][arguments.alias] = DictionaryObject
/>
</cfif>
<cfcatch>
<!--- we only need
the dbobject if it doesn't already exist --->
<cfset DbObject = getObject(arguments.alias) />
<cfset generate =
true />
</cfcatch>
</cftry>
</cfcase>
<cfdefaultcase>
<!--- we always need the db object to update the xml
--->
<cfset DbObject = getObject( arguments.alias) />
<cfset generate = true />
</cfdefaultcase>
</cfswitch>
While I'm not entirely clear on what is happening here, it seems that the code
in red eventually calls the objectDAO.cfc that queries the 'information_schema'
database. I haven't figured a way around this and am beginning to suspect
that this might be just how the framework works, i.e. dictionary objects always
initialise from the 'information_schema' database. Maybe I'm barking up
the wrong tree but, if not, I hope my misadventure has at least been
informative!
On 5/13/06, Sam
Clement <[EMAIL PROTECTED]>
wrote:
I think I'm getting closer to figuring out the problem but I'm still a
bit lost.
Here is the full error:
Tag Context
C:\websites\iqqgte\webroot\reactor\data\mysql\ObjectDao.cfc (18)
C:\websites\iqqgte\webroot\reactor\data\mysql\ObjectDao.cfc (7)
C:\websites\iqqgte\webroot\reactor\core\objectFactory.cfc (206)
C:\websites\iqqgte\webroot\reactor\core\objectFactory.cfc (83)
C:\websites\iqqgte\webroot\reactor\reactorFactory.cfc (100)
C:\websites\iqqgte\webroot\reactor\base\abstractRecord.cfc (87)
C:\websites\iqqgte\webroot\aclaworks\extranet\controller\myController.cfc (57)
C:\websites\iqqgte\webroot\ModelGlue\ModelGlue.cfc (481)
C:\websites\iqqgte\webroot\ModelGlue\ModelGlue.cfc (390)
C:\websites\iqqgte\webroot\ModelGlue\ModelGlue.cfc (346)
C:\websites\iqqgte\webroot\ModelGlue\ModelGlue.cfc (305)
C:\websites\iqqgte\webroot\ModelGlue\ModelGlue.cfm (71)
C:\websites\iqqgte\webroot\aclaworks\extranet\Application.cfm (10)
The problem occurs in the myController when I try to validate the record i.e.
myRecord.validate().
Looking at the error message it seems that reactor can't find the validator object
in cache and is trying to create it from scratch - this seems to happen in the
objectFactory.cfc. This in turn calls the objectDAO that tries to query
the 'information_schema' database. I can't figure out why this runs fine
when the DSN is pointed at my local MySQL database and fails when pointed at
the hostmysite.com
database. Is the validator object instantiated only when called?
Anyway, I've tried everything I can think of (and has been suggested) with no
luck.
*still scratching head*
On 5/13/06, Sam
Clement <
[EMAIL PROTECTED]> wrote:
Thanks Chris.
I'll try the reactor compiler and / or the mysql4 solution. I'll post
back if either works.
On 5/13/06, Chris
Blackwell < [EMAIL PROTECTED]> wrote:
As I understand it (sure someone will correct me if I'm
wrong).. Reactor needs access to the information_schema when running in
development mode as it will recheck the table structures and recreate the
record/dao/gateways etc.
However in production mode it shouldn't need to access the
schema. I would use the utils/ReactorCompiler.cfc to create all your
objects before deploying the application to your host.
As a thought, using reactor in mysql4 mode should still work
on mysql5, and wouldn't require access to the schema, although I've not tested
this.
Hth, chris
Well, that's interesting, and gives me some hope.
I set the app to production mode, ran it locally and uploaded the project files
in the Reactor directory. The app was able to initialise and now it seems
that database reads work, but inserts or updates don't. I get the same
error when trying to insert or update. I guess this begs the question,
does Reactor need access to the 'information_schema' database in MySQL to
work? Anyone?
Anyway, in the meantime I'll see if I can try a few more things to get it to
work.
Thanks,
Sam
On
5/12/06, Brian Rinaldi < [EMAIL PROTECTED]>
wrote:
I have it
working fine at hostmysite. Are you running in production mode? Not sure if
this matters, but it might.
Sam Clement wrote:
Has anyone else tried to get Reactor working at hostmysite.com? I'm
trying to get it to work in a shared environment with MySQL and I'm getting
this error:
General error: Access denied for user 'myDSN'@'%' to database
'information_schema'
The error occurred in C:\websites\iqqgte\webroot\reactor\data\mysql\ObjectDao.cfc:
line 18
When I contacted hostmysite.com
they told me that their policy was to not give access to the information_schema
database. Does this make sense? Is it worth taking up with them?
Cheers,
Sam
--
Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at
http://www.mail-archive.com/reactor%40doughughes.net/
-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
|