ColdFusion 8 and Cartweaver permissions issues

Issue:
Customers who have migrated from ColdFusion MX 7 to ColdFusion 8 may get the following error when trying to access their Cartweaver store:

Permission denied for creating Java object: coldfusion.server.ServiceFactory.
Access to Java objects in the ColdFusion package has been disabled by the administrator.

The error occurred in (cartweaver_install_directory)\CWTags\CWTagGlobalSettings.cfm: line 162
162: factory = CreateObject("JAVA","coldfusion.server.ServiceFactory");


Cause for this error:
ColdFusion 8 has tighter security settings that lead to restricted access to the internal ColdFusion Java objects

Resolution:
Comment out the following section in the CWTagGlobalSettings.cfm file:
<!---

<cfscript>

factory = CreateObject("JAVA","coldfusion.server.ServiceFactory");

sqlexecutive = factory.getDataSourceService();

datasources = sqlexecutive.datasources;

dbType = Evaluate("datasources.#Request.DSN#.Driver");

</cfscript>

<cfif dbtype EQ "com.mysql.jdbc.Driver">

<cfset dbtype = "MySQL">

<cfif>

--->

and then set the database type directly as:

<cfset dbtype = "MySQL">

Depending on what type of database you use, the accepted dbtype values are: MSAccess, MSAccessJet, MSSQLServer, MySQL

If you have any questions concerning this matter, please contact our customer support department.

Add Feedback