8 Replies - 1344 Views - Last Post: 20 April 2010 - 06:27 AM Rate Topic: -----

#1 Guest_Atrum_qss*


Reputation:

Help ! Unable to initialize Assert NX exception !

Posted 18 April 2010 - 10:48 PM

Hi, im new at coldfusion and i recently pay for a hosting with coldfusion 9, i customize my db,dsn and upload all the site... but when i try to run the site i get this exception :



coldfusion.runtime.CustomException: Unable to initialize AssetNow NX at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfApplication2ecfc1801135535$funcONAPPLICATIonstart.runFunction(E:\Domains\rivi eramayarent.com\wwwroot\Application.cfc:35) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368 ) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:490) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:336) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) at coldfusion.runtime.AppEventInvoker.onApplicationstart(AppEventInvoker.java:211) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:224) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFil ter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilt er.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320 ) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


i dont have any idea what does that mean, i have search on google but i doesnt show anything, and it doesnt happen when im working on my localhost ( i have CF8 in my laptop).



The site is www.rivieramayarent.com



Thankz in advance

Is This A Good Question/Topic? 0

Replies To: Help ! Unable to initialize Assert NX exception !

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 06:08 AM

Something isn't right in your onApplicationstart method in Application.cfc. Apparently, line 35 to be exact.

Post the code for your Application.cfc here (with database names and passwords redacted of course) and we'll see if we can lend a hand.
Was This Post Helpful? 0
  • +
  • -

#3 Atrum_qss  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-April 10

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 10:33 AM

View PostCraig328, on 19 April 2010 - 05:08 AM, said:

Something isn't right in your onApplicationstart method in Application.cfc. Apparently, line 35 to be exact.

Post the code for your Application.cfc here (with database names and passwords redacted of course) and we'll see if we can lend a hand.


Hi, this is the onApplicationstart method:


<cffunction name="onApplicationstart" returntype="void" output="false">
		<cfset var q =""/>
		<cftry>
			<!--- *** see AssetNow NX install guide about renaming system directory (default = sys) *** --->
			<cfset request.virtualPaths.SYSTEM = "sys"/>
			<!--- find system directory renamed with sys_ prefix --->		
			<cfif not directoryExists("#getDirectoryFromPath(getCurrentTemplatePath())##request.virtualPaths.SYSTEM#")>
				<cfdirectory action="list" name="q" directory="#getDirectoryFromPath(getCurrentTemplatePath())#"/>
				<cfloop query="q">
					<cfif q.type eq "dir" and findNoCase("sys_",q.name) eq 1>
						<cfset request.virtualPaths.SYSTEM = q.name/>
						<cfbreak/>
					</cfif>
				</cfloop>
			</cfif>
			<!--- configure/reset application using assetnow.xml parameters, set persistent cfcs (application / session) --->
			<cfinclude template="#request.virtualPaths.SYSTEM#/config/config.cfm"/>	
			<!--- initialization error handling = startup failure: stop and show reset code --->
			<cfcatch>
				<cfif structKeyExists(url,"debug")>
					<cfrethrow/>
				<cfelse>
	<!-- [b]line 35[/b] -->				<cfthrow type="Application Initialization Error" message="Unable to initialize AssetNow NX" detail="#application.applicationName#"/>
				</cfif>
			</cfcatch>
		</cftry>
		<!--- Check SLA acceptance: Changing or removal is breech of Orbital license agreement --->
		<cfinclude template="#application.virtualPaths.CFINCLUDES#/sla.cfm"/>				
	</cffunction>



im adding the complete code on a zip attached and other two files involved on the problem, for the database connection im using a coldfusion dsn called mayarent_nx

Attached File  code involve.zip (7.17K)
Number of downloads: 128

This post has been edited by Atrum_qss: 19 April 2010 - 10:34 AM

Was This Post Helpful? 0
  • +
  • -

#4 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 11:09 AM

Atrum, for someone new to CF, that's a pretty involved onAppStart method you posted. Where did you get it?

As for helping you, try commenting out all the stuff in your cfcatch block and dropping this in its place:
<cfdump var="#request.virtualPaths.SYSTEM#"><p><cfdump var="#cfcatch#">


That will spit out the request scope variable from where you're trying to include the config.cfm file from (a very convoluted but perhaps necessary way to go about it) and it will also spit out the raw original error information. Right now, you have code in there to intercept the error message and spit out "Unable to initialize AssetNow NX"...which is the error your site shows when it's called.

Replace the catch block code with what I posted above on your site and re-run it and see what the error says. That entire method is to simply call the config.cfm fall and include it. It would set, I assume, a series of variables that the app needs to have available later. Unless your app is designed to be resold and re-deployed onto customer boxes or something where you may not know where your files are located, there are lots easier ways of doing what you're doing there.
Was This Post Helpful? 0
  • +
  • -

#5 Atrum_qss  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-April 10

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 12:05 PM

Hi, indeed its not my code, I hire somebody to make my the website of my company and im trying to change the sites servers and learn CF in case i need some modifications on it in the future.

I was able to make tests on my localhost but when i tried to upload the site on the server it started throw me those errors.

The error now is and element undefined in session, u can actually see the site (www.rivieramayarent.com), this is the stacktrace:

coldfusion.runtime.UndefinedElementException: Element ANUSER.USERID is undefined in SESSION. at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:1759) at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1677) at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1812) at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1805) at cfcheckheaders2ecfm954693884.runPage(E:\Domains\rivieramayarent.com\wwwroot\sys\cfincludes\assetnow\checkheaders.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722) at cfindex2ecfm2078857244.runPage(E:\Domains\rivieramayarent.com\wwwroot\index.cfm:4) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:342) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:87) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53) at coldfusion.CfmServlet.service(CfmServlet.java:200) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

And thanks for helping, ill be checking the code of the new error and try to do some modifications.

And... sry about my english im not from USA
Was This Post Helpful? 0
  • +
  • -

#6 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 12:21 PM

Your English is fine.

Okay, your error now is that somewhere in your codebase (looks like perhaps in checkheaders.cfm) your code is looking for a session variable called ANUSER.USERID (it'll be referred to as session.ANUSER.USERID).

Now, as I don't know how your app is built, I don't know where in the process you're setting your session variables. You could try looking in your Application.cfc and seeing if you have a cffunction tag (properly called a "method" in this case) called "onSessionstart" and see if there is an attempt to set session variables in there.

I can understand your desire to learn CF so you can work on your site in the future. That said, this is a second indication that the sophistication of the site may be a little too far above your current skill level to allow you to successfully tinker with it. What your dev did here, so it would seem, is go through a process of setting a series of variables, stick them into a structure and place that struct, in turn, into the user's session scope. That's not terribly complex but it does tend to be beyond the typical skills found in CF beginners. I suspect, given what you showed us in the onApplicationstart method, that your dev could probably easily get the site up and running on your production server for you and it shouldn't take more than a few minutes. It's not because one of us here couldn't help you eventually find where/how to do it...it's just that it's not likely a code issue per se but an application setting that's working just fine (as evidenced by your saying you could get it working on your local machine)...you just don't know which setting(s) to change when you move it onto a new box.

Try getting with your dev, ask him/her how much it would take to get it up and running on a new box. It would seem that it would be a matter of changing a setting or two in your config.cfm file and that ought not take more than a few minutes. It'd probably be money well spent by you to avoid the headache and lost time trying to figure it out for yourself.
Was This Post Helpful? 0
  • +
  • -

#7 Atrum_qss  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-April 10

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 02:36 PM

Yes, i have been trying to contact my dev for a long time, but he doesnt answer any mail and it looks like he already change his phone number so i think im on my own u_u.

I have been reading and doing some tests on the code and it looks like that element isnt the only one undefined on the session, is there some difference between session variables on CF 8 and 9? something like.... when you try to access one on CF8 and it havent been initialized then is it created and assinged a default value like... 0 or null or something? and in CF9 if u try to access one that havent been initialized send and error?

Or there should all be initialized in any CF version and there must be one of the method that isnt doing its job?

Thanks in advance..

By the way... i have been looking or a new Dev on CF but its really hard to find one in my city, everybody is offering to remake the site on Php -.- ... i actually know php and it would take me like 2 months to remake the site .
Was This Post Helpful? 0
  • +
  • -

#8 Atrum_qss  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 18-April 10

Re: Help ! Unable to initialize Assert NX exception !

Posted 19 April 2010 - 04:23 PM

Hi again,

I have found the initialization block of the session variable, but it seems that its storing the variable :no:

<cfcomponent hint="User session structure">

<cffunction name="init" access="public" output="no" returntype="void" hint="Initialize user session">
	<cfset var q = ""/>
	<cfset var q2 = ""/>
	<cfset var i = 0/>
	<cfset var j = 0/>
	<cfset var allowAccess = false/>
	<cfset var anuser = structNew()/>
	<cfset var trackCookie = "ANX-T-#hash(application.applicationName)#"/> <!--- return visitor tracking cookie --->	
	<cfset var cookieList = ""/>
	<cfinclude template="#application.virtualPaths.CFLIBS#/agentlib.cfm"/> <!--- agent detection library --->
	<!--- create new user session --->
	<cfscript>
		anuser.userID = 0;
		anuser.identifier = createUUID(); /* used for record lock tracking */
		anuser.firstName = "";
		anuser.lastName = "";
		anuser.email = "";
		anuser.status = "new";
		anuser.toolAccess = false; /* flag for tools */
		anuser.userGroups = ""; /* list of user group identifiers, set default so not empty list */
		anuser.userGroupIDs = ""; /* list of user group IDs */
		anuser.authGroupIDs = ""; /* list of authorized groups */
		anuser.defaultGroupID = 0; /* default url group ID (token) */
		anuser.currentGroupID = 0; /* token to ensure correct group for embedded urls using -1 groupid reference */
		anuser.userRoles = "anonymous"; /* role uuid */
		anuser.userRoleIDs = 0; /* role ids */
		anuser.language = listFirst(application.config.SUPPORTED_LOCALES); /* default locale first: English (US) */
		anuser.localeCode = ""; /* locale code: form en_US */
		anuser.sessionTSStart = now();
		anuser.lastAccess = anuser.sessionTSStart;
		anuser.authCode = hash(anuser.identifier); /* used to access secure content/feeds without login */
		anuser.screenMode = "default"; /* can be used to set output format by selecting css */
		anuser.validDomain = application.assetnow.anxdomain(cgi.server_name);
		anuser.userCommentIDs = ""; /* track comments posted during session */
		/* authorize node ids, content ids access permissions for tools user */
		anuser.accessContent = structNew();
		anuser.accessNode = structNew();
		/* vars for tracking metrics */
		anuser.trackUser = true; /* false = exclude from analytics tracking set by exclude IPs setting param */	
		anuser.browser = userAgent(cgi.http_user_agent); /* detect browser - library function */
		anuser.browserSettings = userBrowser(cgi.http_user_agent); /* get browser type, version, OS */
		anuser.connectionType = 0; /* connection speed: 33, 56, 64, 128, 384, 768, 1500, 3000 - set on first session update if track cookie available */
		anuser.campaigns = 0; /* tracks campaigns with ids passed in request from url/form */
		anuser.cookieVisits = 0; /* repeat visitor tracking */
		anuser.cookieTSFirstVisit = anuser.sessionTSStart; 				
		anuser.cookieTSLastVisit = anuser.sessionTSStart; 		
		anuser.countryCode = "XX"; /* unknown */
		anuser.readOnlyNodeIDs = 0;
	</cfscript>
	<!--- get geolocation if enabled --->
	<cfif application.geoInit>
		<cfset anuser.countryCode = application.geoLocator.findCountry(cgi.remote_addr)/> 
		<cfif len(anuser.countryCode) eq 0>
			<cfset anuser.countryCode =	"XX"/> <!--- XX = unknown/other code --->
		</cfif>
	</cfif>
	<!--- read tracking cookie --->
	<cfif structKeyExists(cookie,trackCookie)>
		<cftry>
			<cfset cookieList = decrypt(cookie[trackCookie],application.applicationName)/>
			<cfset anuser.cookieVisits = listGetAt(cookieList,1,"|") + 1/> <!--- visit count --->
			<cfset anuser.cookieTSFirstVisit = listGetAt(cookieList,2,"|")/> <!--- first visit timestamp --->						
			<cfset anuser.cookieTSLastVisit = listGetAt(cookieList,3,"|")/> <!--- last visit timestamp --->
			<cfset anuser.cookieUUID = listGetAt(cookieList,4,"|")/> <!--- user uuid --->
			<cfcatch type="any">
				<cfset anuser.cookieVisits = 1/>
				<cfset anuser.cookieTSFirstVisit = now()/>
				<cfset anuser.cookieTSLastVisit = anuser.cookieTSFirstVisit/>
				<cfset anuser.cookieUUID = createUUID()/>
			</cfcatch>
		</cftry>
	</cfif>
	<!--- create/update tracking cookie, "repeat" visitor determined from stored last visit timestamp --->
	<cftry>
		<cfset cookieList = "#anuser.cookieVisits#|#anuser.cookieTSFirstVisit#|#now()#|#anuser.identifier#"/>
		<cfcookie name="#trackCookie#" value="#encrypt(cookieList,application.applicationName)#" expires="never"/>
		<cfcatch/>
	</cftry>
	<!--- get all anonymous, link access groups --->
	<cfquery name="q" username="#application.config.DSN_USERNAME#" password="#application.config.DSN_PASSWORD#" datasource="#application.config.DSN#">
		select gGroupID, gIdentifier, gRestrict, gAuthenticate
		from groups
		where gAuthenticate in (0,1)  <!--- anonymous, link access groups --->
		and (gStatus = 1 or (gStatus = 2 and #createODBCDateTime(dateAdd("n",application.config.SERVER_TIME_OFFSET_MINUTES,now()))# between gTSOn and gTSOff))
		<cfif application.geoInit> <!--- only apply location restrictions if geolocator available --->
			and gGroupID not in (select g.gGroupID
									from countries cy, groups g, groups_countries gc
									where cy.cyCountryID = gc.gcCountry_ID
									and g.gGroupID = gc.gcGroup_ID)
			or gGroupID in (select g.gGroupID
									from countries cy, groups g, groups_countries gc
									where cy.cyCountryID = gc.gcCountry_ID
									and g.gGroupID = gc.gcGroup_ID
									and cy.cyCountryCode = '#anuser.countryCode#')
		</cfif>
		order by gListOrder DESC;
	</cfquery>
	<!--- list of user authorized groups, used for global access permissions --->
	<cfloop index="i" from="1" to="#q.recordCount#">
		<!--- test for valid country --->
		<cfquery name="q2" username="#application.config.DSN_USERNAME#" password="#application.config.DSN_PASSWORD#" datasource="#application.config.DSN#">
			select cy.cyCountryCode
			from countries cy, groups g, groups_countries gc
			where cy.cyCountryID = gc.gcCountry_ID
			and g.gGroupID = gc.gcGroup_ID
			and g.gGroupID = #q.gGroupID[i]#;
		</cfquery>
		<!--- validate authenticated groups --->
		<cfif listLen(q.gRestrict[i]) eq 0 and q2.recordCount eq 0>
			<cfset anuser.authGroupIDs = listAppend(anuser.authGroupIDs,q.gGroupID[i])/>
		<cfelse>
			<cfset allowAccess = false/>
			<!--- IP address takes priority over country to grant access --->
			<cftry>
				<cfif listLen(q.gRestrict[i]) neq 0> <!--- test for valid IP address --->
					<cfscript> 
						for (j=1; j lte listLen(q.gRestrict[i]); j=j+1) {
							if (reFindNoCase(listGetAt(q.gRestrict[i],j),cgi.remote_addr)) allowAccess = true;
						}
					</cfscript>
				</cfif>
				<cfif allowAccess eq false and listFindNoCase(valueList(q2.cyCountryCode),anuser.countryCode) neq 0> <!--- test for valid country --->
					<cfset allowAccess = true/>			
				</cfif>
				<cfcatch type="any">
					<cfset allowAccess = false/> <!--- any errors then not valid auth access --->
				</cfcatch>
			</cftry>
			<cfif allowAccess>
				<cfset anuser.authGroupIDs = listAppend(anuser.authGroupIDs,q.gGroupID[i])/>
			</cfif>
		</cfif>
		<cfif q.gAuthenticate[i] eq 0> <!--- add anonymous authenticate groups --->
			<cfif listLen(q.gRestrict[i]) eq 0 and q2.recordCount eq 0> <!--- no IP access or country restriction --->
				<cfset anuser.userGroups = listAppend(anuser.userGroups,q.gIdentifier[i])/>
				<cfset anuser.userGroupIDs = listAppend(anuser.userGroupIDs,q.gGroupID[i])/>
				<!--- default group is first anonymous group --->
				<cfif anuser.defaultGroupID eq 0 and q.gGroupID[i] neq application.assetnow.everyoneGroupID>
					<cfset anuser.defaultGroupID = q.gGroupID[i]/>
				</cfif>
			<cfelse>
				<cfset allowAccess = false/>			
				<!--- IP address takes priority over country to grant access --->
				<cftry>
					<cfif listLen(q.gRestrict[i]) neq 0> <!--- test for valid IP address --->
						<cfscript>
							for (j=1; j lte listLen(q.gRestrict[i]); j=j+1) {
								if (reFindNoCase(listGetAt(q.gRestrict[i],j),cgi.remote_addr)) allowAccess = true;
							}
						</cfscript>
					</cfif>
					<cfif allowAccess eq false and listFindNoCase(valueList(q2.cyCountryCode),anuser.countryCode) neq 0> <!--- test for valid country --->
						<cfset allowAccess = true/>			
					</cfif>
					<cfcatch type="any">
						<cfset allowAccess = false/> <!--- any errors then no access --->
					</cfcatch>
				</cftry>
				<cfif allowAccess>
					<cfset anuser.userGroups = listAppend(anuser.userGroups,q.gIdentifier[i])/>
					<cfset anuser.userGroupIDs = listAppend(anuser.userGroupIDs,q.gGroupID[i])/>
					<!--- default group is first anonymous group --->
					<cfif anuser.defaultGroupID eq 0 and q.gGroupID[i] neq application.assetnow.everyoneGroupID>
						<cfset anuser.defaultGroupID = q.gGroupID[i]/>
					</cfif>
				</cfif>
			</cfif>
		</cfif>
	</cfloop>
	<!--- ensure valid lists for queries --->
	<cfif listLen(anuser.userGroups)eq 0>
		<cfset anuser.userGroups = anuser.identifier/>
	</cfif>
	<cfif listLen(anuser.userGroupIDs)eq 0>
		<cfset anuser.userGroupIDs = 0/>
	</cfif>
	<cfif listLen(anuser.authGroupIDs)eq 0>
		<cfset anuser.authGroupIDs = 0/>
	</cfif>
	<!--- store user data in session --->
	<cfset session.anuser = anuser/>
</cffunction>
</cfcomponent>




Do you think it could be some issue with the DSN and the DB connection on this part??

<cfquery name="q" username="#application.config.DSN_USERNAME#" password="#application.config.DSN_PASSWORD#" datasource="#application.config.DSN#">
		select gGroupID, gIdentifier, gRestrict, gAuthenticate
		from groups
		where gAuthenticate in (0,1)  <!--- anonymous, link access groups --->
		and (gStatus = 1 or (gStatus = 2 and #createODBCDateTime(dateAdd("n",application.config.SERVER_TIME_OFFSET_MINUTES,now()))# between gTSOn and gTSOff))
		<cfif application.geoInit> <!--- only apply location restrictions if geolocator available --->
			and gGroupID not in (select g.gGroupID
									from countries cy, groups g, groups_countries gc
									where cy.cyCountryID = gc.gcCountry_ID
									and g.gGroupID = gc.gcGroup_ID)
			or gGroupID in (select g.gGroupID
									from countries cy, groups g, groups_countries gc
									where cy.cyCountryID = gc.gcCountry_ID
									and g.gGroupID = gc.gcGroup_ID
									and cy.cyCountryCode = '#anuser.countryCode#')
		</cfif>
		order by gListOrder DESC;
	</cfquery>
	<!--- list of user authorized groups, used for global access permissions --->
	<cfloop index="i" from="1" to="#q.recordCount#">
		<!--- test for valid country --->
		<cfquery name="q2" username="#application.config.DSN_USERNAME#" password="#application.config.DSN_PASSWORD#" datasource="#application.config.DSN#">
			select cy.cyCountryCode
			from countries cy, groups g, groups_countries gc
			where cy.cyCountryID = gc.gcCountry_ID
			and g.gGroupID = gc.gcGroup_ID
			and g.gGroupID = #q.gGroupID[i]#;
		</cfquery>



because in not that sure i did it Ok on the Helm CP :/
Was This Post Helpful? 0
  • +
  • -

#9 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1926
  • View blog
  • Posts: 3,471
  • Joined: 13-January 08

Re: Help ! Unable to initialize Assert NX exception !

Posted 20 April 2010 - 06:27 AM

Quote

Yes, i have been trying to contact my dev for a long time, but he doesnt answer any mail and it looks like he already change his phone number so i think im on my own


Atrum, I did a bit more digging through the zip file you posted up. The entire source for this originates with a product called AssetNow. It would appear that you have a copy of the "NX" version of their product. What would probably serve you best is to contact them through their support folks and/or take a moment to look over their documentation.

If your developer claimed he wrote this and is now nowhere to be found then he most likely stole this code and was reselling it to people like you. I doubt a guy who simply disappears once the site is delivered is going to be on the up and up so you may be out of luck on this. Try speaking with the AssetNow people and see what they can do for you. You may be able to purchase a legal copy of their software for a reduced price when you tell them your tale (companies sometimes take pity on people who have been duped like this). If you can, as you say, rewrite this in PHP in a matter of couple of months, then perhaps that is also an avenue you might explore.

Good luck with that.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1