ColdFusion - Ayuda con exception en ColdFusion

   
Vista:

Ayuda con exception en ColdFusion

Publicado por Miguel Alcocer (1 intervención) el 18/04/2010 23:59:35
Saludos !

Necesito un poco de ayuda con coldfusion, resulta que un amigo me pidio ayuda para subir su sitio web a un hosting y accedi, por lo que me baje el coldfusion 8 para realizar pruebas y logre que corra el sitio sin problemas de manera local, por lo que procedimos a comprar un hosting.

Recien compramos el hosting y subi el sitio, configure el dsn y la base de datos. Sin embargo al intentar correr el sitio en el hosting me aparece la siguiente excepcion :

Message Unable to initialize AssetNow NX
StackTrace 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\rivieramayarent.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(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)

Yo no conozco nada del lenguaje por lo que no tengo mucha idea de que puede ser, puesto que hice lo mismo que de manera local y no funciono, alguien tiene alguna idea de que pueda ser??? en google no encuentro nada.

Gracias por la ayuda

P.d. el hosting usa coldfusion 9
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
información
Otras secciones de LWP con contenido de ColdFusion
- Cursos de ColdFusion
información
Cursos y Temas de ColdFusion
- Manual de Cold Fusion versión 4.5

RE:Ayuda con exception en ColdFusion

Publicado por Miguel Alcocer (3 intervenciones) el 20/04/2010 02:39:17
Saludos.Estuve revisando mi codigo y parece que encontre el error original, parece ser unos problemas con inicialziaciones de variables en sesion miren el error:

Message Element ANUSER.USERID is undefined in SESSION.
Resolvedname SESSION

estuve revisando la inicializacion de la variable y no veo donde podria estar el error, pego el codigo por partes porque no cabe en 1 mensaje

Si alguien tiene alguna idea se lo agradeceria mucho. Por cierto en mi localhost con CF8 application server funciona bien, el host donde puse el sitio tiene la version 9 y ahi es donde me marca el error, sera por algo de las versiones?

Gracias de antemano
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Ayuda con exception en ColdFusion

Publicado por Miguel Alcocer (3 intervenciones) el 20/04/2010 02:40:19
[code]
<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>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Codigo parte 2

Publicado por Miguel Alcocer (3 intervenciones) el 20/04/2010 02:40:45
<!--- 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>
[/code]
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar