ColdFusion Initializes a Java object method that requires an external configuration file

I hit my head several times about this, it seems that I could not find worthy answers or explanations for these errors. I use the third-party JAR "PropHandler.jar", I try to call the getMessageList method, it takes 3 arguments and requires a configuration file.

<cfset configFile = 'C:\data\getMsgListCONFIG.xml'>
<cfset Obj = createObject("java","client.PropHandler") />
<cfdump var="#Obj#">


Everything is fine here, my dump returns a list of methods. Now I need to get my configuration file in the method and pass my arguments, without love here, I tried this:

<cfset x = Obj.getMessageList.init(configFile)>

and

<cfset x = Obj.getMessageList().init(configFile)>

and

<cfset x = Obj.getMessageList('identifier', 'greaterthan', '2012-05-18T12:00:00-04:00').init(configFile)>

And even tried to initialize by creating an object:

<cfset Obj = createObject("java","client.PropHandler").getMessageList('identifier', 'greaterthan', '2012-05-18T12:00:00-04:00').init(configFile)>

All Return the same error:

Object Creation Exception

Java . . , , init (args). : client.PropertyHandler

3 , , init, .

, JAVA, . JAR fine BAT , , XML SOAP...

Java:

PropertyHandler

public PropertyHandler(java.lang.String propFile) throws java.lang.Exception

. , .

:

  • propFile - XML

:

  • java.lang.Exception

getMessageList

public services.[...].GetResponseTypeDef getMessageList(java.lang.String par1,
                  java.lang.String comp_Op1,
                  java.lang.String parValue1 )

X_Properties, , , .

:

  • par1 - enum
  • comp_Op1 - CompOp
  • parValue1 -

:

, . null, .

+4
1

:

<cfset Obj = createObject("java","client.PropHandler") />   
<cfset Meth = Obj.init(argfile).getMessageList(arg1,arg2,arg3)>

argfile - XML, . () , argfile .

cf_getMsgs2ecfm497532872.runPage(E:\Inetpub\wwwroot_getMsgs.cfm: 24) cf_getMsgs2ecfm497532872.runPage(E:\Inetpub\wwwroot_getMsgs.cfm: 24)

java.lang.reflect.InvocationTargetException sun.reflect.NativeConstructorAccessorImpl.newInstance0 ( )    sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)    java.lang.reflect.Constructor.newInstance(Constructor.java:513)   at coldfusion.runtime.java.JavaProxy.CreateObject(JavaProxy.java:156)   at coldfusion.runtime.java.JavaProxy.invoke(JavaProxy.java:63) coldfusion.runtime.CfJspPage._invoke (CfJspPage.java:2272) cf_getMsgs2ecfm497532872.runPage(E:\Inetpub\wwwroot_getMsgs.cfm: 24)   at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)    coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)   at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)   at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)   at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)    jrun.servlet.FilterChain.doFilter(FilterChain.java:86) coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)    coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)    jrun.servlet.FilterChain.doFilter(FilterChain.java:94) jrun.servlet.FilterChain.service(FilterChain.java:101) jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)    jrunx.scheduler.ThreadPool $DownstreamMetrics.invokeRunnable(ThreadPool.java:320)    jrunx.scheduler.ThreadPool $ThreadThrottle.invokeRunnable(ThreadPool.java:428)    jrunx.scheduler.ThreadPool $UpstreamMetrics.invokeRunnable(ThreadPool.java:266)   at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) : java.io.FileNotFoundException:..\data\APIproperties.xml( )java.io.FileInputStream.open( ) java.io.FileInputStream. (FileInputStream.java:106) java.io.FileInputStream. (FileInputStream.java:66) client.PropertyHandler. (PropertyHandler.java:133)

@Ligh @imthepitts

+2

All Articles