Hi Ryan, thanks for joining us. :)
I haven't gotten around to testing DataFaucet on Railo 3 yet. So it
looks like you've found a hiccup. :) I don't think it'll be terribly
difficult to resolve.
> Specifically, I get this message : Component [sqlagentlocator] has
> no acessible Member with name [CREATEVIEWENTITY].
>
> Occurs on line 25 of /datafaucet/system/agent/mssql.cfc
Line 25 of mssql.cfc in my copy of DataFaucet the CFC is attempting to
use the method from the super-class as a first class object and set it
to another variable in mssql.cfc.
line 25-26
<cfset variables.createSuperView = super.createViewEntity />
<cfset variables.createSuperProcedure = super.createProcedureEntity />
That was done at the time because I was getting an error while trying to
use cfinvoke on the method "super.createViewEntity" with Adobe's CF
server. It's also because DataFaucet's standard create view syntax
doesn't work with SQL Server, you have to either "use [database]" or you
have to use the sp_executeSQL stored procedure if you want to target a
specific database on your server. I think that was for security reasons
in SQL Server originally.
Here's the function that uses it down on line 73.
<cffunction name="createViewEntity" access="private" output="false" returntype="array"
hint="MS SQL Server doesn't allow use of the catalog name when creating a view - use the system stored procedure sp_executeSQL as a workaround">
<cfargument name="entity" type="string" required="true">
<cfargument name="syntax" type="string" required="true">
<cfset arguments.catalog = listfirst(arguments.entity,".")>
<cfset arguments.entity = listrest(arguments.entity,".")>
<cfinvoke method="createSuperView" argumentcollection="#arguments#" returnvariable="arguments.sql">
<cfreturn sp_executeSQL(arguments.catalog,arguments.sql)>
</cffunction>
That was the easiest way to write it originally. The CreateViewEntity
method is actually in a mixin in the file
/system/agent/datadefinitionlanguage.cfm (line 269) - and it's a private
method. So you could try changing it to a public method and see if that
works (you'll get the same error on createProcedureEntity and have to
repeat for that method as well). If that doesn't work then the mixins
might not be working with Railo. This may not be the final solution,
since I'd rather it not be a public method, but it might be enough to
get you going. :)
> Seems odd to me, because I don't believe sqlagentlocator is being
> extended here. Wondering if anyone else has seen the same issue.
You're right, SQLAgentLocator.cfc isn't extended. What's happening is
that the sqlagentlocator.cfc is trying to create the mssql.cfc to return
for your database and it's failing while trying to create that object,
so that's why you're getting the error tied to sqlagentlocator. That
happens with Adobe CF too when you get errors creating an object you'll
get imprecise error messages, but it looks like the verbiage of the
error message in Railo is a little less accurate. It should be telling
you that "super" doesn't have that public entity in mssql.cfc. I think
in Adobe's you would get "super" doesn't have that public entity in
sqlagentlocator.cfc.
--
[ ike ] founder - DataFaucet ORM
phone: 781.769.0723
> Thanks for the reply. I did try setting the method to public, still
> no luck. It's not something that's a huge deal for me, I'm not
> planning to use Railo right now, just wanted to test and see what
> would happen. When I get some time this weekend I'm going to play
> around some more, see if I can consistently duplicate this issue with
> my own objects (to get a better idea of what exactly Railo doesn't
> like) and then perhaps head over to their forums with my findings. If
> I find anything out I'll post it here.