From: HornsandTail on 31 Oct 2006 14:28 I am having the same trouble. What is the exact error or trouble you are having? My code throws a RuntimeException - Any Ideas? java.lang.RuntimeException: CFCServlet must be initialized at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:67) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:50) at JavaCall.invoke(JavaCall.java:23) at JavaCall.main(JavaCall.java:12)
From: tzimmerman on 31 Oct 2006 15:32 Ben's article mentions that the CFCInvoker class has to be in the Coldfusion class path. If you have the standard installation go into the CF Administrator and under Server Settings > Java and JVM enter the path to the class in the "Coldfusion Class Path" text area. So if your CFCInvoker.class was in a folder on your c:\ drive name cfusionclasses you would enter C:/cfusionclasses. Then restart the CF Application server. Ted Zimmerman
From: Aboromo on 31 Oct 2006 17:21 Hi HornsandTail, I've got it working now but I can't remember exactly what errors I was having when I first started. Some things that set me straight though may help you. When creating your invoker java class: 1. Ensure that your directory paths have no spaces in them. Ditto with the function names, no spaces. 2. When you compile, make sure you're using the same Java version as CFMX. Default install of CFMX uses 1.4.2_05, I believe. 3. Also make sure your class path contains whatever objects you are importing. What exactly are you trying to do? If you were trying to create an 3-tiered application purely with CF but using a faster transport than XML-based web services, then that's exactly what I did. Effectively I now have an 3-tiered CF application using binary-based RMI for remoting rather than XML-based Web Services. Performance-wise, it's 3x faster than using web services for remoting and development time is far quicker than having to code your middle tier in Java. If that's what you're after, then maybe I ought to publish my code somewhere with instructions. Abes
From: HornsandTail on 3 Nov 2006 18:04 I am trying to execute a Coldfusion CFC from a method on a previously running Java Service. We have a Java Service that keeps an open socket connection and we need to call some coldfusion cfc to process the data receive on the socket. I emailed Ben Forta, and he said that the only way to do this would be to invoke coldfusion from the java service if run from the same JVM. I am uncertain how to run them from the same JVM so I believe we will be using Webservices to communication between Java and ColdFusion
From: Aboromo on 3 Nov 2006 19:56 When Ben says your Java class needs to run in the same JVM, here's how you can do it. Put all your class files and/or jar files for your Java app into one folder. Add that folder into the Coldfusion class path through the ColdFusion Administrator. Restart Coldfusion. Once it's in there, you need to create a coldfusion page to instantiate your Java application. You can instantiate any class inside that folder using the CFOBJECT tag. So effectively, you will be starting your Java socket listener from a Coldfusion page. Sound weird? Yep. It is. But now, your Java socket listener is in the "same JVM" as coldfusion. That means you can pretty much import any coldfusion object into your listener - including the CFCproxy class.
|
Pages: 1 Prev: guru challenge! Next: Verity Collection Unabled to Create Anything |