4 Replies Latest reply on Feb 15, 2012 7:10 PM by catthedd2

    cfobject .net problem


      Having a lot of trouble getting any .net DLL to be called via CFOBJECT...


      This code from the docs (see below) should return a ping, but I get an error:  coldfusion.runtime.dotnet.ProxyGenerationException


      This happens with any .net object.  I found this thread on google which seems related: 



      It seems to have something to do with the dotnetcoreproxy.jar file being created the first time.  I cannot figure out how to get around this.....


      I am running windows server 2007, CF 9.01 standard.  32 bit.  I've installed the 9.01 .net patch. 




      <!--- This function pings the specified host. --->

      <cffunction name="Ping" returntype="string" output="false">

          <cfargument name="host" type="string" required="yes">


          <!--- Local variables --->

          <cfset var pingClass="">

          <cfset var pingReply="">


          <!--- Get Ping class --->

          <cfobject type=".NET" name="pingClass" class="System.Net.NetworkInformation.Ping">




          <!--- Perform synchronous ping (using defaults) --->

          <cfset pingReply=pingClass.Send(Arguments.host)>


          <!--- Return result --->

          <!-- <cfreturn pingReply.Get_Status().ToString()> -->

          <cfreturn pingReply.Status.ToString()>






      <h3>Ping Test</h3>


          localohost PING Status: #Ping("")#<br>





      full error:


      The error occurred in C:\inetpub\wwwroot\foo\z_ken5.cfm: line 1


      1 : <cfobject type=".NET" name="proc" class="System.Diagnostics.Process">


      stack trace

      at cfz_ken52ecfm2071484578.runPage(C:\inetpub\wwwroot\parkmedicalcenters\z_ken5.cfm:1)



          at coldfusion.runtime.dotnet.ProxyGenerator._executeProxyGen(ProxyGenerator.java:192)

          at coldfusion.runtime.dotnet.ProxyGenerator.executeProxyGen(ProxyGenerator.java:149)

          at coldfusion.runtime.dotnet.ProxyGenerator.generateProxy(ProxyGenerator.java:118)

          at coldfusion.runtime.dotnet.Assembly.generateProxy(Assembly.java:299)

          at coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:250)

          at coldfusion.runtime.dotnet.Assembly.loadClass(Assembly.java:225)

          at coldfusion.runtime.dotnet.DotNetProxyFactory.getProxy(DotNetProxyFactory.java:78)

          at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65)

          at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:5002)

          at coldfusion.tagext.lang.ObjectTag.doStartTag(ObjectTag.java:427)

          at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)

          at cfz_ken52ecfm2071484578.runPage(C:\inetpub\wwwroot\parkmedicalcenters\z_ken5.cfm:1)

          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.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)

          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)

        • 1. Re: cfobject .net problem
          -==cfSearching==- Level 4

               >  I am running windows server 2007, CF 9.01 standard.  32 bit.


          Are both are 32-bit or just CF?


                 > I've installed the 9.01 .net patch.


          Did you uninstall the old version first?


          Which version of .net do you have installed 2, 3.5, ...4?

          • 2. Re: cfobject .net problem
            catthedd2 Level 1

            The server and CF are both 32 bit.  I have .net version 4 installed.


            I found a workaround - I contacted the guy who had the identical issue mentioned in the thread here:  http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:62305


            I copied the dotnetcoreproxy.jar file from his server (his file was created by doing a 64 bit .dll call initially).  When I copied that file over to my server, everything worked fine.


            So it seems if the dotnetcoreproxy.jar file that gets created is flawed somehow if it is created initially with a 32 bit .dll call.  No idea why. Of anyone else runs into this issue, I would be happy to send you the file which solves the issue (or you can apparently just complie a 64 bit .dll and call it yourself, but I didn't know how to do this). 

            • 3. Re: cfobject .net problem
              -==cfSearching==- Level 4

              Interesting. I thought it only applied when running on a 64 bit server. I am surprised uninstalling and deleting the cached jars, as mentioned in that thread,  did not do the trick. But anyway .. great that you have things up and running now (and thanks for posting the resolution).

              • 4. Re: cfobject .net problem
                catthedd2 Level 1

                I did try clearing out the cached jars, uninstalling the CF .NET, reinstalling 9.01, rebooting....actually ran through that a couple times in every permutation I could think of.  No matter what I tried, as soon as I called the simplest .net DLL (even the ones from the documentation examples), the .jar file that got created just plain did not work.  Very, very odd!


                I'm keeping a copy of the "good" .jar around somewhere safe, because I can see needing this down the road if we ever move to another server!