I am trying to deconstruct an array loop created by some one and they had instructions on how to call but if I do that value, I am being ended up in an error
Here is the code
<cfloop from="1" to="#ArrayLen(variables.elementObjectsArray[e].items)#" index="o">
<option
<cfif ArrayLen(variables.elementObjectsArray[e].items[o]) eq 3>
class="#variables.elementObjectsArray[e].items[o][3]#"
</cfif>
value="#variables.elementObjectsArray[e].items[o][1]#"
<cfif session.form[e] EQ "#variables.elementObjectsArray[e].items[o][1]#">
selected="selected"
</cfif>
>
#variables.elementObjectsArray[e].items[o][2]#
</option>
</cfloop>
and they mention it to call it this way
// a 2-d array of items if type=select: ["optionValue","optionText","optionClass"]
here is dump of the array (variables.elementObjectsArray[e].items) (from comments)
i did that way, but i am always ending up in error, anyone can guide what i am missing here
This is the error in stack
<td class="struct" onClick="cfdump_toggleRow(this);" style="cursor:pointer;" title="click to collapse">StackTrace</td>
<td>
coldfusion.runtime.NonArrayException: Object of type class java.lang.String cannot be used as an array
at coldfusion.runtime.Cast._List(Cast.java:1388)
at coldfusion.runtime.CFPage.ArrayLen(CFPage.java:705)
at cfForm2ecfc910767489$funcSHOWFORM._factor2(C:\ColdFusion2016\cfusion\wwwroot\water\cfcs\common\Form.cfc:289)
at cfForm2ecfc910767489$funcSHOWFORM._factor3(C:\ColdFusion2016\cfusion\wwwroot\water\cfcs\common\Form.cfc:264)
at cfForm2ecfc910767489$funcSHOWFORM._factor4(C:\ColdFusion2016\cfusion\wwwroot\water\cfcs\common\Form.cfc:259)
at cfForm2ecfc910767489$funcSHOWFORM._factor5(C:\ColdFusion2016\cfusion\wwwroot\water\cfcs\common\Form.cfc:258)
at cfForm2ecfc910767489$funcSHOWFORM.runFunction(C:\ColdFusion2016\cfusion\wwwroot\water\cfcs\common\Form.cfc:235)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:493)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:389)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:340)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:235)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:654)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:443)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:413)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3247)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3224)
at cfregistration2ehtml927971521.runPage(C:\ColdFusion2016\cfusion\wwwroot\water\registration.html:53)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:254)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:743)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3851)
at cfsystem2ehtml2885719.runPage(C:\ColdFusion2016\cfusion\wwwroot\water\system.html:7)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:254)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:743)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:3851)
at cfindex2ehtml2139074217.runPage(C:\ColdFusion2016\cfusion\wwwroot\water\index.html:237)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:254)
at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:743)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:573)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:484)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:153)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:223)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1634)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
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)
</td>
figured out it should go as: items = [['M,'M'],['F','F']]
Related
I'm trying to do a simple login code flow from an Angular client with WSO2 Identity Server 5.10.
Service Provider is configured with Oauth/OpenID Connect Configuration.
First of all my client calls the /oauth2/authorize endpoint:
https://myplatform.com/oauth2/authorize?response_type=code&client_id=...
Then i get redirected to the login form page:
https://myplatform.com/authenticationendpoint/login.do?client_id=...
After entering username and password the user gets authenticated as I can see from logs (I also tried to log in with a wrong password and i get the Login Failed! message), but then I get an HTTP 500 message.
These are the network calls I see in the browser upon credentials submit:
1) https://myplatform.com/logincontext?sessionDataKey=a886baf0-2d20-4327-80c0-de723e14a420&relyingParty=i69JjSmHPUpQBJC3QDIzjltTHbQa&tenantDomain=carbon.super&_=1633447226722
2) https://poc.smartcityplatform.it/commonauth
3) https://poc.smartcityplatform.it/oauth2/authorize?sessionDataKey=d9948a51-80bf-4438-b0dc-be8eaefc1f56
WSO2IS logs:
java.lang.IllegalArgumentException: Passed URL is empty.
at org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils.buildURLWithQueryParams(FrameworkUtils.java:1665)
at org.wso2.carbon.identity.oauth.endpoint.util.EndpointUtil.getErrorPageURL(EndpointUtil.java:413)
at org.wso2.carbon.identity.oauth.endpoint.expmapper.InvalidRequestExceptionMapper.buildErrorResponseConsentHandlingFailure(InvalidRequestExceptionMapper.java:174)
at org.wso2.carbon.identity.oauth.endpoint.expmapper.InvalidRequestExceptionMapper.toResponse(InvalidRequestExceptionMapper.java:138)
at org.wso2.carbon.identity.oauth.endpoint.expmapper.InvalidRequestExceptionMapper.toResponse(InvalidRequestExceptionMapper.java:56)
at org.apache.cxf.jaxrs.utils.ExceptionUtils.convertFaultToResponse(ExceptionUtils.java:84)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.convertFaultToResponse(JAXRSUtils.java:1660)
at org.apache.cxf.jaxrs.JAXRSInvoker.handleFault(JAXRSInvoker.java:362)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:210)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:103)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:216)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:301)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:276)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.wso2.carbon.webapp.mgt.filter.AuthorizationHeaderFilter.doFilter(AuthorizationHeaderFilter.java:85)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:126)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:86)
at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:110)
at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:75)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49)
at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:145)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
at org.wso2.carbon.tomcat.ext.valves.RequestEncodingValve.invoke(RequestEncodingValve.java:49)
at org.wso2.carbon.tomcat.ext.valves.RequestCorrelationIdValve.invoke(RequestCorrelationIdValve.java:119)
Any idea of what is happening?
Thank you!
UPDATE
I added more logging as suggested by user #Sajith, surprisingly I discovered that a table was missing in a DEBUG statement. I used deployment scripts from https://github.com/wso2/kubernetes-is where statements about consent management tables are actually missing.
[2021-10-06 06:48:34,320] [921d87de-2dec-46c6-b1f5-84397fb2f8ad] DEBUG {org.wso2.carbon.identity.oauth.endpoint.expmapper.InvalidRequestExceptionMapper} - System Error while handling consent: org.wso2.carbon.identity.oauth.endpoint.exception.ConsentHandlingFailedException: Error while handling user consent for claim for user: sysadmin#carbon.super for client_id: i69JjSmHPUpQBJC3QDIzjltTHbQa of tenantDomain: carbon.super
....
at
Caused by: org.wso2.carbon.consent.mgt.core.exception.ConsentManagementServerException: Error while searching receipts.
at org.wso2.carbon.consent.mgt.core.util.ConsentUtils.handleServerException(ConsentUtils.java:64)
at org.wso2.carbon.consent.mgt.core.dao.impl.ReceiptDAOImpl.searchReceipts(ReceiptDAOImpl.java:303)
at org.wso2.carbon.consent.mgt.core.ConsentManagerImpl.searchReceipts(ConsentManagerImpl.java:637)
at org.wso2.carbon.consent.mgt.core.ConsentManagerImpl.searchReceipts(ConsentManagerImpl.java:607)
at org.wso2.carbon.consent.mgt.core.PrivilegedConsentManagerImpl$22.execute(PrivilegedConsentManagerImpl.java:562)
at org.wso2.carbon.consent.mgt.core.PrivilegedConsentManagerImpl$22.execute(PrivilegedConsentManagerImpl.java:558)
at org.wso2.carbon.consent.mgt.core.model.ConsentInterceptorTemplate.executeWith(ConsentInterceptorTemplate.java:56)
at org.wso2.carbon.consent.mgt.core.PrivilegedConsentManagerImpl.searchReceipts(PrivilegedConsentManagerImpl.java:558)
at org.wso2.carbon.consent.mgt.core.InterceptingConsentManager.searchReceipts(InterceptingConsentManager.java:79)
at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.consent.SSOConsentServiceImpl.getReceiptListOfUserForSP(SSOConsentServiceImpl.java:761)
at org.wso2.carbon.identity.application.authentication.framework.handler.request.impl.consent.SSOConsentServiceImpl.getConsentReceiptOfUser(SSOConsentServiceImpl.java:375)
... 73 more
Caused by: org.wso2.carbon.database.utils.jdbc.exceptions.DataAccessException: Error in performing Database query: '%s'SELECT R.CONSENT_RECEIPT_ID, R.LANGUAGE, R.PII_PRINCIPAL_ID, R.PRINCIPAL_TENANT_ID, R.STATE,RS.SP_DISPLAY_NAME,RS.SP_DESCRIPTION FROM CM_RECEIPT R INNER JOIN CM_RECEIPT_SP_ASSOC RS ON R.CONSENT_RECEIPT_ID=RS.CONSENT_RECEIPT_ID WHERE PII_PRINCIPAL_ID LIKE ? AND PRINCIPAL_TENANT_ID=? AND SP_NAME LIKE ? AND SP_TENANT_ID = ? AND STATE LIKE ? ORDER BY ID ASC LIMIT ? OFFSET ?
at org.wso2.carbon.database.utils.jdbc.JdbcTemplate.executeQuery(JdbcTemplate.java:169)
at org.wso2.carbon.consent.mgt.core.dao.impl.ReceiptDAOImpl.searchReceipt(ReceiptDAOImpl.java:338)
at org.wso2.carbon.consent.mgt.core.dao.impl.ReceiptDAOImpl.searchReceipts(ReceiptDAOImpl.java:290)
... 82 more
Caused by: java.sql.SQLSyntaxErrorException: Table 'WSO2IS_IDENTITY_DB.CM_RECEIPT' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
at jdk.internal.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy57.executeQuery(Unknown Source)
at
org.wso2.carbon.database.utils.jdbc.JdbcTemplate.executeQuery(JdbcTemplate.java:154)
... 84 more
Adding more logs, I found that a database table was missing. Strange that this came out from a DEBUG statement:
Caused by: java.sql.SQLSyntaxErrorException: Table 'WSO2IS_IDENTITY_DB.CM_RECEIPT' doesn't exist
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
at jdk.internal.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
at com.sun.proxy.$Proxy57.executeQuery(Unknown Source)
at
I used Kubernetes to setup WSO2IS and used this script to initialize my database: https://github.com/wso2/kubernetes-is/blob/master/simple/mysql-k8s/mysql-conf-db.yaml. Actually Consent tables are missing, they are available at WSO2IS folder installation, under <WSO2IS_HOME>/dbscripts/consent path.
I am facing issue with application.cfc which contains both orm and coldspring configurations.
The problem is, either of them work but not both.
Please help
Following are contains of application.cfc
<cfset this.Name = "AppCFC" />
<cfset this.ApplicationTimeout = CreateTimeSpan( 0, 0, 1, 0 ) />
<cfset this.SessionManagement = true />
<cfset this.SetClientCookies = false />
<cfset this.mappings[ "/coldspring" ] = expandpath("../../coldspring")/>
<cfset this.mappings[ "/api" ] = expandpath("../../api") />
<cfset this.datasource = "loginSystem" />
<cfset this.ormEnabled = true/>
<cfset this.invokeImplictAccessor = true/>
<cfsetting
requesttimeout="20"
showdebugoutput="false"
enablecfoutputonly="false"
/>
<cffunction
name="OnApplicationStart"
access="public"
returntype="boolean"
output="false"
hint="Fires when the application is first created.">
<cfset timestamp = now()/>
<cfset application.beanFactory = createObject("coldspring.beans.DefaultXmlBeanFactory").init()/>
<cfset application.beanFactory.loadBeansFromXmlFile("../../config/beans.xml",true)/>
<!--- Return out. --->
<cfreturn true />
</cffunction>
When Application runs it throws following error
The error occurred in C:/ColdFusion11/cfusion/coldspring/aop/framework/tmp/bean_5907DE3ED856ED15DF7F7894FCA28C57.cfc: line 62
60 : <cfset var methodInvocation = 0 />
61 : <cfset var method =
62 : CreateObject('component','coldspring.aop.Method')init(variables.target, arguments.methodName, arguments.args) />
coldfusion.compiler.ParseException: Invalid CFML construct found on line 62 at column 77.
at coldfusion.compiler.cfml40.generateParseException(cfml40.java:13795)
at coldfusion.compiler.cfml40.jj_consume_token(cfml40.java:13666)
at coldfusion.compiler.cfml40.endOrEmptyTag(cfml40.java:420)
at coldfusion.compiler.cfml40.cfset(cfml40.java:478)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4726)
at coldfusion.compiler.cfml40.cffunction(cfml40.java:4113)
at coldfusion.compiler.cfml40.cfml(cfml40.java:4744)
at coldfusion.compiler.cfml40.start(cfml40.java:5054)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:620)
at coldfusion.compiler.NeoTranslator.parsePage(NeoTranslator.java:601)
at coldfusion.compiler.NeoTranslator.parseAndTransform(NeoTranslator.java:441)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:391)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:160)
at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:461)
at coldfusion.util.LruCache.get(LruCache.java:180)
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:387)
at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:642)
at coldfusion.runtime.MetadataUtils.getBasicComponentMetadata(MetadataUtils.java:173)
at coldfusion.orm.mapping.CFPropertyBinder.<init>(CFPropertyBinder.java:115)
at coldfusion.orm.hibernate.HibernateConfiguration.generateHbmDocFromCFCs(HibernateConfiguration.java:1128)
at coldfusion.orm.hibernate.HibernateConfiguration.generateAndLoadHBMFilesFromCFCs(HibernateConfiguration.java:781)
at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:673)
at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:210)
at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:183)
at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:67)
at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:184)
at coldfusion.orm.hibernate.HibernateProvider.onPageRequestStart(HibernateProvider.java:147)
at coldfusion.filter.ApplicationFilter.firePageRequestStart(ApplicationFilter.java:644)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:449)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
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)
The error is very clear: there's a syntax error in the highlighted line of code. Did you look at it?
61 : <cfset var method =
62 : CreateObject('component','coldspring.aop.Method')init(variables.target, arguments.methodName, arguments.args) />
You're missing a dot operator between the object creation and the method call.
Tip: pay attention to the error messages CF presents to you. They generally explain what the problem is.
I am getting the following error on my browser:
Exceptions
11:05:30.030 - Application Exception - in C:\mypath\myfile.cfm : line 14
JSON parsing failure: Unexpected end of JSON string
Where Line #14 is where I am deserializing the JSON like the following:
<cfset incomingData = toString(getHttpRequestData().content) />
line #14:
<cfset djs = DeserializeJSON(incomingData)/>
What does the Application Exception means?
The Stacktrace after dumping variable djs is as follows:
coldfusion.runtime.JSONUtils$JSONParseOverflowException: JSON parsing failure: Unexpected end of JSON string at coldfusion.runtime.JSONUtils$ParserState.currentChar(JSONUtils.java:1835) at coldfusion.runtime.JSONUtils.parseObject(JSONUtils.java:949) at coldfusion.runtime.JSONUtils.parseJSON(JSONUtils.java:922) at coldfusion.runtime.JSONUtils.deserializeJSON(JSONUtils.java:162) at coldfusion.runtime.CFPage.DeserializeJSON(CFPage.java:6723) at cfgetIncoming2ecfm1847112669.runPage(C:\Websites\ebmdevii\Event-Based-Messaging\public\response\email\getIncoming.cfm:14) 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:381) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) 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:62) 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)
Note: The same file when I run on different Coldfusion 8 Server located at different IP doesn't throw any error.
The error message is very clear: JSON parsing failure: Unexpected end of JSON string
You're trying to parse a string as JSON, and the string isn't JSON.
Put a try/catch around the erroring line, and in the catch dump out the string you're trying to deserialise. You will undoubtedly see that the string isn't JSON. Hence the error saying it can't be parsed as such.
This worked for me:
<cfset requestBody = toString(getHttpRequestData().content)>
<cfset requestBody = REReplaceNoCase(requestBody,"[\s+]"," ","ALL")>
<cfset requestBody = Trim(requestBody)>
<cftry>
<cfset requestBody = DeserializeJSON(requestBody)>
<cfcatch>
<cfdump var="#requestBody#" />
</cfcatch>
</cftry>
Are there any known issues with deleting sheet from an excel? My code does not allow me to delete first sheet, but do so for any other sheet.
<cfspreadsheet action="read" src="courses.xls" name="spreadSheetVar">
<cfset spreadsheetRemoveSheet(spreadsheetVar,"first")>
<cfspreadsheet action="write" filename="courses.xls" name="spreadsheetVar" overwrite="true" >
Courses.xls has two sheets named first & second. If I try to delete "second" it deletes, but while trying deleting "first" it throw error.
environment: coldfusion dev edition 9,0,2,282541
in built IIS, running on window 7 pro
Following is the error it throw
java.lang.IllegalArgumentException: Sheet index (1) is out of range
(0..0) at
org.apache.poi.hssf.usermodel.HSSFWorkbook.validateSheetIndex(HSSFWorkbook.java:413)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getSheetName(HSSFWorkbook.java:542)
at coldfusion.excel.Excel.removeSheet(Excel.java:179) at
coldfusion.runtime.CFPage.SpreadSheetRemoveSheet(CFPage.java:6912) at
cftest12ecfm402095173.runPage(C:\ColdFusion9\wwwroot\Test_Apps\test1.cfm:3)
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:381)
at
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at
coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at
coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27) at
coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
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:62) 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.http.WebService.invokeRunnable(WebService.java:172)
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 know this is not the answer, I was looking for. It is just a workaround, if some is stuck and no way forward. It looks like CF treats first sheet as Active sheet and is not able to delete it.
Making any other sheet as active will allow the first sheet to be deleted.
<cfset SpreadsheetSetActiveSheetNumber(spreadsheetVar, N)>
Where N is anything other than 1.
As I said, until someone who have good hold on java and native POI being used in spreadsheet functions, does not answer this question, this is is the workaround.
Our web admins applied some hotfixes (don't know which ones) over the weekend and it seems to have killed <cffeed>. The error we get is below. We have the <cffeed> tag inside of a <cftry> but it still produces the error. Any thoughts on what would be causing the error or or how to circumvent without rewriting all our code?
ROOT CAUSE:
java.lang.NoClassDefFoundError: Could not initialize class coldfusion.syndication.FeedDateParser
at coldfusion.tagext.io.FeedTag.<init>(FeedTag.java:64)
at sun.reflect.GeneratedConstructorAccessor555.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at coldfusion.runtime.NeoPageContext$TagSet.getTagHandlerInstance(NeoPageContext.java:2284)
at coldfusion.runtime.NeoPageContext.getTagHandlerInstance(NeoPageContext.java:2192)
at coldfusion.runtime.CfJspPage._initTag(CfJspPage.java:1789)
at cfindex2ecfm2002820310.runPage(D:\WEB\ROOT\itap\index.cfm:156)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:483)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:288)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
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.CfmServlet.service(CfmServlet.java:198)
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$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
It looks like this is a sandbox issue. We have security sandboxing turned on. When the hot fixes were put into place, the path to /WEB-INF/cfusion/lib/ needed to be added to the sandbox. So far the only thing we have found that this affects is cffeed. Also, ColdFusion had to be restarted when the changes were made.