Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CFEXECUTE and java class

42 views
Skip to first unread message

adavea

unread,
Jan 20, 2005, 4:03:33 PM1/20/05
to
Hell all,

I am having trouble executing a java class via CFEXECUTE.

I am trying to run the command:
java -classpath .;.\classes111.zip DataLoader66

When I open a command prompt, switch to the DataLoader66.class's directory,
and run the command, the program opens up a file like it is supposed to, and
does its thing like it should, and outputs a bunch of lines to the file over a
period of about four minutes.

When trying to run the program from a coldfusion page it seems to terminate
prematurely (timeout?). I am using this line in the coldfusion page:
<CFEXECUTE name="java.exe" arguments="-classpath .;.\classes111.zip
DataLoader66" timeOut="0"></CFEXECUTE>

After loading the coldfusion page, it runs the DataLoader66 class as expected,
but it appears to be done loading the page almost instantly, and the java app
appears to be terminating just as quickly. I know the DataLoader is running at
least a little because it creates a new file every time I load the coldfusion
page. It only writes about 5 lines to this file though, where there should be
several hundred.

When running from the command line, there is a wait period of between one to
two or so minutes before any more output appears / is written to the file.
Could it be timing out because of the wait?

I tried to set the CFEXECUTE's timeout to different things, as well as using
this name value pair after the page name-> ?requestTimeout=1800 and using
<cfsetting requestTimeout="1800">, but the page and the app still kept
terminating almost instantly.

Any suggestions?

Thanks for your help!

Bill Sahlas

unread,
Feb 22, 2005, 10:27:52 AM2/22/05
to
What happens if you put that command and arguments in a batch file or shell
script and try the execution? Does you program include logging?


"adavea" <webfor...@macromedia.com> wrote in message
news:csp6b5$3ir$1...@forums.macromedia.com...

byron1021

unread,
Feb 24, 2005, 12:10:37 AM2/24/05
to
Depending on the .exe that is run from cfexecute, alot of the time it does not
wait to return all the data from the output stream. The .exe finishes and CF
will stop the process before the output gets back. THis is pretty common. Not
sure what your class does, but can you just invoke it as a native Java object
using createObject('java', 'dataloader66'), all you would need to do is put
your class files into the cfmx classpath.

0 new messages