[closed] Schema export for MSSQL2012 missing (was Invalid object name 'dbo.farUser')

I am trying to do an installation of farcry on my windows 2012 server with Lucee and MSSQL 2014

I get to the screen where it asks for my DSN and DB server type then when I go to the next screen, I get this error

it looks like it is trying to update a user that does not exist. Am I supposed to create this? If so, why is it not in the install instructions. and what exactly am I supposed to do?

Lucee 5.0.0.252 Error (database)
Message 	
Detail 	Invalid object name 'dbo.farUser'.
SQL 	UPDATE dbo.farUser
SET
password = 'farcry'
WHERE
userid = 'farcry'
DatabaseName 	Microsoft SQL Server
DatabaseVersion 	12.00.4213
DriverName 	Microsoft SQL Server JDBC Driver 3.0
DriverVersion 	3.0.1301.101
Datasource 	securedonor
Stacktrace 	The Error Occurred in
C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm: line 997

    995: WHERE
    996: userid = <cfqueryparam cfsqltype="cf_sql_varchar" value="farcry">
    997: </cfquery>
    998:
    999:

called from C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm: line 34
Java Stacktrace 	lucee.runtime.exp.DatabaseException:
 	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
 	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1493)
 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:390)
 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:340)
 	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
 	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
 	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:179)
 	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:154)
 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:322)
 	at lucee.runtime.type.util.QueryUtil.execute(QueryUtil.java:265)
 	at lucee.runtime.type.QueryImpl.execute(QueryImpl.java:274)
 	at lucee.runtime.type.QueryImpl.(QueryImpl.java:219)
 	at lucee.runtime.tag.Query.executeDatasoure(Query.java:820)
 	at lucee.runtime.tag.Query.doEndTag(Query.java:583)
 	at farcry.core.webtop.install.index_cfm$cf.udfCall2(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:997)
 	at farcry.core.webtop.install.index_cfm$cf.udfCall(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:105)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:337)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:224)
 	at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:770)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:752)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1570)
 	at farcry.core.webtop.install.index_cfm$cf.call(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:34)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:893)
 	at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
 	at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
 	at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
 	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
 	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2250)
 	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2242)
 	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2210)
 	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:846)
 	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103)
 	at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
 	at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:872)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 	at java.lang.Thread.run(Thread.java:745)

Timestamp 8/26/16 7:03:42 PM CDT

Hi John,

I’m not a FarCry expert, but my guess would be the permissions your DSN has.

Your error indicates that the table doesn’t exist. Are you trying to install a fresh/blank installation? If so, does your datasource/database already exist? Does the user you are connecting with have the required permissions to create the database or tables in it?

As far as I know, creating tables and altering tables are only required during install and when using the COAPI manager after updating code. Other than that, read and write permissions should be all that are required.

Best of luck!

I replied the other day about 20 minutes after John posted, but my reply went missing…

The error is that the farUser table doesn’t exist for some reason.

When the installer runs it uses the .sql files from the “install” folder that is inside the skeleton project that you have selected. First it creates the schema objects (tables) for your selected database type, then it runs the inserts for the data.

Can you tell us which version of FarCry you are installing (latest from the website? 7.2.6?), which “skeleton” project you selected to install, and which DB gateway you selected (SQL2005?). Can you also check to see if the “skeleton” folder for the project you selected has an “install” folder inside it with a large number of .sql files?

Cheers,
Justin

I’m getting the same error

>>Can you tell us which version of FarCry you are installing?
Latest version. Downloaded 7.2.8

>>which “skeleton” project you selected to install
I chose barebones

>>check to see if the “skeleton” folder for the project you selected has an “install” folder…
It does indeed

I verified that the user account I linked up via CF admin has create table permission

Error looks like:

[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name ‘dbo.farUser’.
The error occurred in (snipped)/farcry/core/webtop/install/index.cfm: line 996

Which tracked down to the code, it’s a simple update statement:

UPDATE #form.dbowner#farUser SET password = (etc etc)

Looking in the database, no tables seem to have been created.

Any advice?

edit: did some snooping. Found the SQL file that is supposed to create the farUser table. Ran it manually. MSSQL Error.

Column, parameter, or variable #7: Cannot find data type longtext

So it ends up I was selecting SQL 2012 as my server type, when we actually run 2008. Now I have a new problem.

If I change the “Database Server” dropdown to anything other than “Microsoft SQL 2012 or newer” it responds with:

Database Server Engine Mismatch
Your database server for this DSN does not appear to be MSSQL2012.

Ahhhhh, whoops :slight_smile: I had assumed that the “MSSQL 2005” DB Gateway would be used because I thought the “MSSQL 2012” DB Gateway was only in our unreleased p730 (7.3.x) branch – I was wrong, it’s also in p720 (7.2.x). So your problem is that the skeletons don’t have a schema export for the MSSQL 2012 DB Gateway…

If you do the installation using MSSQL 2005 the install should work correctly. Then you can edit your farcryConstructor.cfm and set your dbtype to mssql2012, then log in to the webtop and do an “Update Application” from your profile menu, then go to Admin -> Developer Utilities -> COAPI Content Types -> Click the top “Apply Defaults” checkbox to select all conflicts and then click the “Apply Default Resolutions” button.

That should resolve it temporarily. To fix it permanently I’ll need to do new exports for each of the skeleton projects and then release new core bundles.

1 Like

There may be some miscommunication here…

>>If you do the installation using MSSQL 2005 the install should work correctly.

If I try and select MSSQL 2005, I get an error message stating “Your database server for this DSN does not appear to be MSSQL2012.”

So the error message returned is always saying something about MSSQL2012, regardless of the database option I choose

Ok, that means the automated version check must have an issue as well… I’ll see if I can get around to it tomorrow.

In the mean time, if you need to do an install on a SQL 2012 server, you can use the latest 7.1.x version from here:
http://docs.farcrycore.org.s3.amazonaws.com/release/farcry-community-7.1.8.zip

After you do the install, you can drop in the latest Core from 7.2.8, then run an ?updateall=<your-updateapp-key> and it’ll auto deploy any required schema changes.

I’ve re-released the FarCry Community 7.2.8 Distribution which you can download from:
http://docs.farcrycore.org.s3.amazonaws.com/release/farcry-community-7.2.8.zip

Each of the bundled skeletons now has the SQL 2012 schema scripts so the installation should work as expected.

There’s an additional bug in 7.2.x for generating the schema and data scripts which I’m about to patch in the p720 branch.

1 Like

Hi Justin,

Just wondering if this issue got fixed now? Because I downloaded the latest 7.2.8 but still got the same problem as described here. I have a sql server 2005 database but during installation when I selected 2005 it states “Your database server for this DSN does not appear to be MSSQL2012.”.

I changed it to 2012 and it went on to the next step but failed with "invalid object name ‘dbo.farUser’. I can see the table is not there in the database but many other tables do exists.

Just want to check if the download has been updated for this fix.

Cheers,
Xiaofeng

have a look and see if the table is owned by ‘dbo’?

There is still a bug or I’m not doing something correctly. I have a 2012R2 server with CF 2016 installed and I’m trying to install Farcry to a fresh db on SQL 2008 but am getting the same error as the OP. The posting by Justin Carter said if you want to install on SQL 2012 use 7.1.8 then drop 7.2.8 in and updateall however he never mentioned if this would work with SQL 2008. He also said that as of Sep 2016 he had fixed this issue. I’ve downloaded the latest 7.2.8 community build from farcrycore.org and am still having the 500 error issue where dbo.faruser doesn’t update. I’ve verified that the db is new and my database user has full dbo permissions. The Data Source in CF verifies OK.

The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name ‘dbo.farUser’.

The error occurred in G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 995
Called from G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 34
Called from G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 1
Called from G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 995
Called from G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 34
Called from G:/WebApps/LBCC/Core/webtop/install/index.cfm: line 1
993 : password =
994 : WHERE
995 : userid =
996 :
997 :
SQLSTATE 42S02
DATASOURCE alb-fc
VENDORERRORCODE 208
SQL
UPDATE dbo.farUser
SET
password = (param 1)
WHERE
userid = (param 2)
Resources:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Remote Address 10.0.1.2
Referrer http://******.linnbenton.edu/webtop/install/
Date/Time 11-Jan-17 09:55 AM
Stack Trace

I’ve replied in the new thread here.