application.cfc中的orm配置与coldspring冲突

时间:2015-03-31 04:38:09

标签: coldfusion application.cfc coldfusion-11 coldspring

我面临application.cfc的问题,它包含orm和coldspring配置。 问题是,它们中的任何一个都可以工作,但不能同时工作。

请帮忙

以下是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>

当应用程序运行时,它会抛出以下错误

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)

1 个答案:

答案 0 :(得分:2)

错误非常明确:突出显示的代码行中出现语法错误。你看了吗

61 :        <cfset var method = 
62 :                    CreateObject('component','coldspring.aop.Method')init(variables.target, arguments.methodName, arguments.args) />

您在对象创建和方法调用之间缺少点运算符。

提示:请注意CF提供给您的错误消息。他们通常会解释问题所在。